Check serial numbers for a batch intake
const url = 'https://example.com/assets/batch-intake/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"],"references":{}}'};
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/batch-intake/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" ], "references": {} }'Where each serial stands for releasing a batch at a yard: in quarantine there, empty there (filled here), already in full stock, not in the register, or somewhere it can’t come from. Send the batch’s details to see which cylinders already carry them. 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-3a2b1c0d9e8fobject
Responses
Section titled “Responses”Each serial and where it stands
object
object
Quarantined: in quarantine at this yard. empty: empty at this yard, filled here. full: in full stock at this yard, not in quarantine; needs confirming. released: already in full stock here with these details. new: not in the register; added here. expected: last recorded at a supplier or nowhere; comes into this yard. elsewhere: at another yard, on a vehicle, with a customer or between yards; refused. unavailable: lost, faulty, retired or to check; refused. unknownCondition: at this yard, not recorded as full or empty; refused. otherProduct: another product; refused.
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
Example
{ "items": [ { "status": "quarantined", "asset": { "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, another cylinder already has that detail, or a batch release needs confirming
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}