Skip to content
PharmaFlow Knowledgebase
Esc
↑↓navigate↵open⌘Jpreview

Register a till

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
Authorization
AuthorizationBearer token (JWT) · headerrequired

JWT from POST /api/v1/auth/login sent as Authorization Bearer.

Request body
requiredapplication/json
device_idstring
branch_idstring
labelstring
Responses
200

The device was already registered

device_idstringrequired
branch_idstringrequired
labelstringrequired
201

Device registered

device_idstringrequired
branch_idstringrequired
labelstringrequired
401

Not authenticated

detailstringrequired
404

Branch not found

detailstringrequired
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST 'http://localhost:8000/api/v1/sync/devices/register' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "device_id": "string",
  "branch_id": "string",
  "label": "string"
}'
Response
{
  "device_id": "string",
  "branch_id": "string",
  "label": "string"
}