Post a stock count
Applies the sheet: every counted line that disagrees with the book
becomes a count movement setting on-hand at the location to the
counted figure, all in one transaction, and the count becomes posted.
A count can be posted once: a retry answers 409 count_closed (with an
Idempotency-Key it replays the first answer instead).
Authorization
bearer_auth Authorization: Bearer <token>. Either a session access token from POST /auth/login (refresh it with POST /auth/refresh) or a store API token (mobi_st_…). A store API token works only for the store it was issued in, and can do at most what its issuing user can there, narrowed to the scopes it was issued with.
In: header
Path Parameters
Store id
uuidStock count id
uuidHeader Parameters
A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries Idempotent-Replayed: true. Reusing a key for a different request is a 422 idempotency_key_reused; retrying while the first is still running is a 409 idempotency_request_in_progress. JSON bodies up to 1 MB.
length <= 255Request Body
application/json
Optional
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/stores/497f6eca-6276-4993-bfeb-53cbbbba6f08/stock-counts/497f6eca-6276-4993-bfeb-53cbbbba6f08/post"{
"applied": 0,
"count": {
"counted_count": 0,
"created_at": "2019-08-24T14:15:22Z",
"created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
"created_by_name": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"item_count": 0,
"location_id": "46910cc3-ab41-4b80-b4a7-94dab9f1b795",
"location_name": "string",
"name": "string",
"note": "string",
"posted_at": "2019-08-24T14:15:22Z",
"posted_by": "55350649-6a2e-43fa-bf14-794387254dc5",
"status": "draft",
"store_id": "7fe87115-950c-4ae8-bd7e-970406bc9ac0",
"variance_count": 0
},
"levels": [
{
"available": 0,
"location_id": "46910cc3-ab41-4b80-b4a7-94dab9f1b795",
"movement_id": "91f31a1e-b7f2-4510-b623-c550715ad5a8",
"on_hand": 0,
"reserved": 0,
"variant_id": "8a2d415d-59aa-4132-bef3-011f97c4a0f6"
}
],
"net_delta": 0,
"skipped_uncounted": 0
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}