/v1/retail-items/{item_id}/facilities/{facility_id}/stockAuthentication
Bearer API key or Facily session, subject to permissions and facility scope.
Authentication and scopeRequest example
Replace bracketed path values with real IDs from your environment. The body, where shown, is generated from the schema and uses illustrative values.
curl --request POST \
--url 'https://api.staging.facily.ai/v1/retail-items/<ITEM_ID>/facilities/<FACILITY_ID>/stock' \
--header "Authorization: Bearer $FACILY_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"kind": "received",
"counted": 0,
"note": "string",
"quantity": 0
}'Parameters
item_idpath · stringrequiredFormat: uuid
facility_idpath · stringrequiredFormat: uuid
Request body
application/json · Required
countedinteger | nullUnits counted. Required for count.
Minimum: 0
Show counted schema
integer | nullUnits counted. Required for count.
Variant 1: integer
integerVariant 2: null
nullkindstringrequiredreceived adds stock that arrived; count sets stock to a physical count.
Values: "received", "count"
notestring | nullA note. Required for count.
Max length: 1000
Show note schema
string | nullA note. Required for count.
Variant 1: string
stringVariant 2: null
nullquantityinteger | nullUnits received. Required for received.
Show quantity schema
integer | nullUnits received. Required for received.
Variant 1: integer
integerVariant 2: null
nullResponses
Expand a status to inspect its schema. Generated examples show structure and synthetic values.
201Successful Response
{
"data": {
"movement": {
"created_at": "2026-10-29T12:00:00Z",
"facility_id": "00000000-0000-4000-8000-000000000001",
"id": "00000000-0000-4000-8000-000000000001",
"item_id": "00000000-0000-4000-8000-000000000001",
"kind": "string",
"note": "string",
"on_hand_after": 0,
"quantity": 0
}
},
"meta": {
"request_id": "string"
}
}application/json
dataStockResultResponserequiredShow data schema
movementStockMovementResponse | nullrequiredThe movement recorded; null when a count matched the stock on hand and nothing changed.
Show movement schema
StockMovementResponse | nullThe movement recorded; null when a count matched the stock on hand and nothing changed.
Variant 1: StockMovementResponse
created_atstringrequiredWhen the stock changed.
Format: date-time
facility_idstringrequiredThe facility whose stock changed.
Format: uuid
idstringrequiredUnique identifier for this movement.
Format: uuid
item_idstringrequiredThe item whose stock changed.
Format: uuid
kindstringrequiredopening, received, adjusted, sold or voided.
notestring | nullrequiredThe note recorded with the change, or null.
Show note schema
string | nullThe note recorded with the change, or null.
Variant 1: string
Variant 2: null
on_hand_afterintegerrequiredUnits in stock after the change.
quantityintegerrequiredThe change in units; negative when stock fell.
Variant 2: null
nullmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired400Validation error
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired401Unauthenticated
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired403Permission denied
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired404Not found
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired409Business logic error
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired503Temporary failure
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired