Get a batch being scanned
GET
/assets/batch-intake/drafts/{id}
const url = 'https://example.com/assets/batch-intake/drafts/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f';const options = { method: 'GET', headers: {cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/assets/batch-intake/drafts/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token>The batch with its serials in the order they were added, who added each and whether from the office or a phone. Read again when the live stream says something under this path changed.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
UUID v7
string format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Responses
Section titled “Responses”The batch
Media typeapplication/json
object
id
required
UUID v7
string format: uuid
yard
required
object
id
required
UUID v7
string format: uuid
name
required
string
product
required
object
id
required
UUID v7
string format: uuid
name
required
string
shelfLifeMonths
required
integer | null
references
required
object
key
additional properties
string
expected
required
integer | null
serials
required
Array<object>
object
serial
required
string
addedBy
required
object
id
required
string
name
required
string
addedFrom
required
Office: typed or scanned on the office’s Batch intake screen. phone: from the driver app.
string
addedAt
required
string format: date-time
fields
required
Array<object>
object
id
required
UUID v7
string format: uuid
name
required
string
valueType
required
string
createdBy
required
object
id
required
string
name
required
string
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
expiresAt
required
string format: date-time
releasedAt
required
string | null format: date-time
released
required
object
released
required
integer
filled
required
integer
added
required
integer
unchanged
required
integer
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
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, another cylinder already has that detail, or a batch release needs confirming
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" } ]}