Location transfers
Transfers of goods between store locations: a posted document with lines. A mistake is undone by a reverse transfer.
Location transfers
Objects
LocationTransfer
idintegerrequiredID of the record, unique among records of its kind in the store.
numberstringrequiredTransfer number in the store.
source_location_idintegerrequiredID of the location the goods left (/v1/locations).
destination_location_idintegerrequiredID of the location the goods arrived at (/v1/locations).
originstring or nullrequiredWhere the transfer came from when no person created it: location_drain — stock moved out when a location was switched off; reversal — return of a posted transfer. null — created by a staff member.
- Values:
location_drainreversalnull
reverses_location_transfer_idinteger or nullrequiredID of the transfer this one returns; null for an ordinary transfer.
commentstring or nullrequiredStaff comment; null if there is none.
linesarray of objectrequiredTransfer lines: what moved and how much. The stock movements of the transfer are an outflow at the source and an inflow at the destination with document.type = location_transfer.
Fields · 4
idintegerrequiredID of the record, unique among records of its kind in the store.
variant_idintegerrequiredProduct variant ID (/v1/variants).
lot_idinteger or nullrequiredLot ID (/v1/lots); null for goods without lots.
quantitystringrequiredQuantity moved, as a decimal string in the variant unit.
executed_atstring (date-time)requiredWhen the transfer was posted.
created_atstring (date-time)requiredWhen the record was created.
updated_atstring (date-time)requiredWhen the record last changed.
Endpoints
Transfers of goods between locations with their lines, changed since a given moment
get/location-transfers
Scope: inventory: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})$
source_location_idintegerOnly transfers that took goods out of this location.
- Minimum:
- 1
destination_location_idintegerOnly transfers that brought goods to this location.
- Minimum:
- 1
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/location-transfers" \
-H "Authorization: Bearer $SALEYA_API_TOKEN"{
"data": [
{
"id": 0,
"number": "string",
"source_location_id": 0,
"destination_location_id": 0,
"origin": "location_drain",
"reverses_location_transfer_id": 0,
"comment": "string",
"lines": [
{
"id": 0,
"variant_id": 0,
"lot_id": 0,
"quantity": "string"
}
],
"executed_at": "2026-01-15T12:00:00Z",
"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"
}Location transfer
get/location-transfers/{location_transfer}
Scope: inventory:read
Parameters
Path
location_transferintegerrequiredLocation transfer ID.
Responses
200Success
application/json
Returns LocationTransfer
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/location-transfers/{location_transfer}" \
-H "Authorization: Bearer $SALEYA_API_TOKEN"{
"id": 0,
"number": "string",
"source_location_id": 0,
"destination_location_id": 0,
"origin": "location_drain",
"reverses_location_transfer_id": 0,
"comment": "string",
"lines": [
{
"id": 0,
"variant_id": 0,
"lot_id": 0,
"quantity": "string"
}
],
"executed_at": "2026-01-15T12:00:00Z",
"created_at": "2026-01-15T12:00:00Z",
"updated_at": "2026-01-15T12:00:00Z"
}