Add serials to a batch
const url = 'https://example.com/assets/batch-intake/drafts/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/serials';const options = { method: 'POST', headers: { cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"serials":["example"],"from":"office"}'};
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/drafts/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/serials \ --header 'Content-Type: application/json' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token> \ --data '{ "serials": [ "example" ], "from": "office" }'Adds serials from the office or a phone, with who added them. A serial already in the batch, in any case, is left as it is, so sending the same serials again changes nothing. A batch holds up to 1,000 serials; past that the add is refused with 422. A released batch is refused with 409, and one removed meanwhile with 404.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Request Bodyrequired
Section titled “Request Bodyrequired”object
Office: typed or scanned on the office’s Batch intake screen. phone: from the driver app.
Responses
Section titled “Responses”The batch
object
UUID v7
object
UUID v7
object
UUID v7
object
object
object
Office: typed or scanned on the office’s Batch intake screen. phone: from the driver app.
object
UUID v7
object
object
Example
{ "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "yard": { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" }, "product": { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" }, "serials": [ { "addedFrom": "office" } ], "fields": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "valueType": "text" } ]}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" } ]}