Record a cylinder you already have
const url = 'https://example.com/assets';const options = { method: 'POST', headers: { cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"productId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f","holder":{"kind":"place","id":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"},"condition":"full","state":"active","references":{"additionalProperty":"example"},"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 \ --header 'Content-Type: application/json' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token> \ --data '{ "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "holder": { "kind": "place", "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" }, "condition": "full", "state": "active", "references": { "additionalProperty": "example" }, "note": "example" }'Names a cylinder that is already in a yard, on a vehicle, with a customer or a supplier, or lost. No stock moves: it is already counted where it is. The product must be set to track each cylinder.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fobject
UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fActive: 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
Responses
Section titled “Responses”Recorded
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
object
UUID v7
object
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
UUID v7
object
UUID v7
Example
{ "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" } ], "journey": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "kind": "registered", "from": { "kind": "place", "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" }, "to": { "kind": "place", "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" }, "condition": "full", "state": "active", "references": [ { "definitionId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ], "orderId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ], "referenceHistory": [ { "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" } ]}