Skip to content

List batches being scanned

GET
/assets/batch-intake/drafts
curl --request GET \
--url https://example.com/assets/batch-intake/drafts \
--cookie __Host-bottle.session_token=<__Host-bottle.session_token>

Batch intakes open now, one per yard and product, the most recently used first, with how many serials each has. A batch left unused for 7 days is removed. scanning says whether the phone may read serials with its camera.

Open batches

Media typeapplication/json
object
items
required
Array<object>
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
references
required
object
key
additional properties
string
expected
required
integer | null
> 0
count
required
integer
updatedAt
required
string format: date-time
expiresAt
required
string format: date-time
scanning
required
boolean

Example

{
"items": [
{
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"yard": {
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"
},
"product": {
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"
}
}
]
}

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
Allowed values: validation
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string

Example

{
"error": "validation",
"issues": [
{
"path": "email",
"message": "Invalid email"
}
]
}