Check a count of one product at a yard, by serial number
const url = 'https://example.com/assets/stocktake/check';const options = { method: 'POST', headers: { cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"yardId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f","productId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f","serials":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/assets/stocktake/check \ --header 'Content-Type: application/json' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token> \ --data '{ "yardId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "serials": [ "example" ] }'Compares the serials counted at a yard with the register: found, missing (recorded there but not counted), recorded elsewhere, not in the register, and serials of another product. Also what the stock book says the yard holds. Nothing is saved.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fResponses
Section titled “Responses”What the count found
object
object
UUID v7
UUID v7
Active: in use. review: something about it needs checking. faulty: out of use until repaired. lost: not where it should be. retired: no longer used.
object
UUID v7
object
UUID v7
object
UUID v7
UUID v7
Active: in use. review: something about it needs checking. faulty: out of use until repaired. lost: not where it should be. retired: no longer used.
object
UUID v7
object
UUID v7
object
UUID v7
UUID v7
Active: in use. review: something about it needs checking. faulty: out of use until repaired. lost: not where it should be. retired: no longer used.
object
UUID v7
object
UUID v7
object
object
Example
{ "found": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "state": "active", "condition": "full", "holder": { "kind": "place", "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" }, "references": [ { "definitionId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ] } ], "missing": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "state": "active", "condition": "full", "holder": { "kind": "place", "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" }, "references": [ { "definitionId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ] } ], "elsewhere": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "state": "active", "condition": "full", "holder": { "kind": "place", "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" }, "references": [ { "definitionId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ] } ]}Not signed in
object
Example
{ "error": "not_found", "message": "Customer not found"}Missing scope or role, or the plan does not open Assets
object
Example
{ "error": "not_found", "message": "Customer not found"}Not found, or Assets is not available to this business
object
Example
{ "error": "not_found", "message": "Customer not found"}Assets is switched off, or another cylinder already has that detail
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}