Release a batch of cylinders to full stock
const url = 'https://example.com/assets/batch-intake';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":{"additionalProperty":"example"},"expected":1,"confirmed":false,"note":"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/batch-intake \ --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": { "additionalProperty": "example" }, "expected": 1, "confirmed": false, "note": "example" }'Sets the batch’s details (batch number, fill date, expiry) on every cylinder listed and puts them in full stock at the yard, in one step: cylinders in quarantine are released, empties in the yard are filled, and serials not in the register are added. The previous fill’s details stay searchable. A serial at another yard, on a vehicle, with a customer, lost, or of another product is refused with 422. A count that differs from expected, or a cylinder already in full stock, answers 409 batch_count_differs or batch_in_full_stock unless confirmed. Cylinders already carrying the batch are left as they are, so repeating a release changes nothing.
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”Released
object
Example generated
{ "released": 1, "filled": 1, "added": 1, "unchanged": 1}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" } ]}