---
search:
  tags:
    - Sync
    - POST
seo:
  description: >-
    Any signed in user. Registers a device on a branch and returns its id,…
    Reference for the POST /api/v1/sync/devices/register endpoint in the
    PharmaFlow API.
sidebar:
  label: Register a till
  badge: POST
title: Register a till
type: openapi-operation
---
Any signed in user. Registers a device on a branch and returns its id, or the existing one. Only an admin may name another branch, and a retry returns the same device, not a second row.

`POST /api/v1/sync/devices/register`

**Request body** (`application/json`, required)

- `device_id` (string)
- `branch_id` (string)
- `label` (string)

Request body example:

```json
{
  "device_id": "string",
  "branch_id": "string",
  "label": "string"
}
```

**Responses**

- `200` — The device was already registered
- `201` — Device registered
- `401` — Not authenticated
- `404` — Branch not found

Response example, 200:

```json
{
  "device_id": "string",
  "branch_id": "string",
  "label": "string"
}
```
