Receive full cylinders into a yard, by serial number
POST
/assets/receive
const url = 'https://example.com/assets/receive';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","yardId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f","quantity":1,"serials":["example"],"references":{},"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/receive \ --header 'Content-Type: application/json' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token> \ --data '{ "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "yardId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "quantity": 1, "serials": [ "example" ], "references": {}, "note": "example" }'Stock goes up by the quantity at the yard. Each serial is named on the movement: serials not in the register are added to it. The fill’s details (batch, fill date, expiry) are set on every named cylinder, and the previous fill’s stay searchable. Any of the quantity not named is left to name later.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
productId
required
UUID v7
string format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fyardId
required
UUID v7
string format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fquantity
required
integer
serials
required
Array<string>
references
object
key
additional properties
string
note
string | null
Responses
Section titled “Responses”Received
Media typeapplication/json
object
received
required
integer
added
required
integer
unnamed
required
integer
Example generated
{ "received": 1, "added": 1, "unnamed": 1}Not signed in
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Missing scope or role, or the plan does not open Assets
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Not found, or Assets is not available to this business
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Assets is switched off, or another cylinder already has that detail
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
Media typeapplication/json
object
error
required
string
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}