Register shifts
Register shifts with cash drawer reconciliation for each currency: opening float, expected, counted, difference and float left behind.
Register shifts
Objects
PosShift
idintegerrequiredID of the record, unique among records of its kind in the store.
numberstring or nullrequiredShift number in the register log, for example Z-0044; null for shifts older than numbering.
location_idintegerrequiredID of the store location.
register_idintegerrequiredRegister ID at the location. The API has no register directory: for accounting, group shifts by location.
statusstringrequiredopen — the shift is running; closed — the drawer was counted and the shift closed.
- Values:
openclosed
opened_atstring (date-time)requiredWhen the shift was opened.
closed_atstring (date-time) or nullrequiredWhen the shift was closed; null while open.
notesstring or nullrequiredNote left by whoever closed the shift; null if none.
drawersarray of objectrequiredOne cash drawer per currency that has been in it; the store currency first. Expected cash is opening_float plus the movements in that currency signed by direction.
Fields · 7
idintegerrequiredDrawer ID: the money journal posts a foreign-currency drawer difference with a source of type pos_shift_drawer and this ID.
currencystringrequiredDrawer currency, ISO 4217 code: drawer amounts are in its minor units.
- Values:
ARSUSDBRLCLPCOPMXNPENRUB
opening_floatintegerrequiredOpening float.
expectedinteger or nullrequiredHow much the drawer should have held at closing; null while the shift is open.
countedinteger or nullrequiredHow much was counted at closing; null while the shift is open.
differenceinteger or nullrequiredDifference: counted minus expected — an overage is positive, a shortage negative. The money journal posts it with the shift as the document. null while the shift is open.
carried_floatinteger or nullrequiredLeft in the drawer as float for the next shift; dropped to the safe — counted minus carried_float. null while open and for shifts closed before safe tracking.
created_atstring (date-time)requiredWhen the record was created.
updated_atstring (date-time)requiredWhen the record last changed.
Endpoints
Register shifts changed since a given moment: cash drawer reconciliation for each currency
get/pos-shifts
Scope: finance:read
Parameters
Query
limitintegerPage size: up to 250 records; 50 by default.
- Minimum:
- 1
- Maximum:
- 250
cursorstringOpaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it.
- Max length:
- 4096
updated_sincestring (date-time)Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor.
- Pattern:
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,6})?(Z|[+-]\d{2}:\d{2})$
include_deletedbooleantrue — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync.
Responses
200Success
application/json
Records of the page.
deletedarray of objectrequiredRecords erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor.
Fields · 2
idintegerrequiredID of the erased record.
deleted_atstring (date-time)requiredWhen the record was erased.
next_cursorstring or nullrequiredCursor of the next page; null on the last page.
has_morebooleanrequiredtrue when there is a next page.
sync_cursorstring or nullrequiredOn the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages.
401The token is missing, invalid, expired or revoked
Headers
WWW-AuthenticatestringrequiredAuthentication scheme (RFC 6750).
- Example:
Bearer
application/problem+json
Returns Problem
403The plan, the IP address or the token scopes do not allow the request
Headers
WWW-AuthenticatestringAuthentication scheme (RFC 6750).
- Example:
Bearer error="insufficient_scope", scope="locations:read"
application/problem+json
Returns ForbiddenProblem
410The sync cursor is older than the deletion retention period or was issued before the database was restored
application/problem+json
Returns Problem
422A parameter is invalid or unknown
application/problem+json
Returns ValidationProblem
429The rate limit is exhausted
Headers
Retry-AfterintegerrequiredSeconds to wait before retrying.
- Minimum:
- 0
application/problem+json
Returns RateLimitProblem
503The store is temporarily unavailable
Headers
Retry-AfterintegerSeconds to wait before retrying.
- Minimum:
- 0
application/problem+json
Returns Problem
Errors of this endpoint
Common errors such as token, access, input validation and rate limit can come from any endpoint; they are listed in the catalog: Errors
curl "https://api.saleya.app/v1/pos-shifts" \
-H "Authorization: Bearer $SALEYA_API_TOKEN"{
"data": [
{
"id": 0,
"number": "string",
"location_id": 0,
"register_id": 0,
"status": "open",
"opened_at": "2026-01-15T12:00:00Z",
"closed_at": "2026-01-15T12:00:00Z",
"notes": "string",
"drawers": [
{
"id": 0,
"currency": "ARS",
"opening_float": 0,
"expected": 0,
"counted": 0,
"difference": 0,
"carried_float": 0
}
],
"created_at": "2026-01-15T12:00:00Z",
"updated_at": "2026-01-15T12:00:00Z"
}
],
"deleted": [
{
"id": 0,
"deleted_at": "2026-01-15T12:00:00Z"
}
],
"next_cursor": "string",
"has_more": true,
"sync_cursor": "string"
}Register shift
get/pos-shifts/{shift}
Scope: finance:read
Parameters
Path
shiftintegerrequiredRegister shift ID.
Responses
200Success
application/json
Returns PosShift
401The token is missing, invalid, expired or revoked
Headers
WWW-AuthenticatestringrequiredAuthentication scheme (RFC 6750).
- Example:
Bearer
application/problem+json
Returns Problem
403The plan, the IP address or the token scopes do not allow the request
Headers
WWW-AuthenticatestringAuthentication scheme (RFC 6750).
- Example:
Bearer error="insufficient_scope", scope="locations:read"
application/problem+json
Returns ForbiddenProblem
404The object does not exist or is not available to the app
application/problem+json
Returns Problem
422A parameter is invalid or unknown
application/problem+json
Returns ValidationProblem
429The rate limit is exhausted
Headers
Retry-AfterintegerrequiredSeconds to wait before retrying.
- Minimum:
- 0
application/problem+json
Returns RateLimitProblem
503The store is temporarily unavailable
Headers
Retry-AfterintegerSeconds to wait before retrying.
- Minimum:
- 0
application/problem+json
Returns Problem
Common errors such as token, access, input validation and rate limit can come from any endpoint; they are listed in the catalog: Errors
curl "https://api.saleya.app/v1/pos-shifts/{shift}" \
-H "Authorization: Bearer $SALEYA_API_TOKEN"{
"id": 0,
"number": "string",
"location_id": 0,
"register_id": 0,
"status": "open",
"opened_at": "2026-01-15T12:00:00Z",
"closed_at": "2026-01-15T12:00:00Z",
"notes": "string",
"drawers": [
{
"id": 0,
"currency": "ARS",
"opening_float": 0,
"expected": 0,
"counted": 0,
"difference": 0,
"carried_float": 0
}
],
"created_at": "2026-01-15T12:00:00Z",
"updated_at": "2026-01-15T12:00:00Z"
}