Skip to content

Check serial numbers for a batch intake

POST
/assets/batch-intake/check
curl --request POST \
--url https://example.com/assets/batch-intake/check \
--header 'Content-Type: application/json' \
--cookie __Host-bottle.session_token=<__Host-bottle.session_token> \
--data '{ "yardId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "serials": [ "example" ], "references": {} }'

Where each serial stands for releasing a batch at a yard: in quarantine there, empty there (filled here), already in full stock, not in the register, or somewhere it can’t come from. Send the batch’s details to see which cylinders already carry them. Nothing is saved.

Media typeapplication/json
object
yardId
required

UUID v7

string format: uuid

Example

019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f
productId
required

UUID v7

string format: uuid

Example

019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f
serials
required
Array<string>
>= 1 items <= 1000 items
references
object
key
additional properties
string
<= 200 characters

Each serial and where it stands

Media typeapplication/json
object
items
required
Array<object>
object
serial
required
string
status
required

Quarantined: in quarantine at this yard. empty: empty at this yard, filled here. full: in full stock at this yard, not in quarantine; needs confirming. released: already in full stock here with these details. new: not in the register; added here. expected: last recorded at a supplier or nowhere; comes into this yard. elsewhere: at another yard, on a vehicle, with a customer or between yards; refused. unavailable: lost, faulty, retired or to check; refused. unknownCondition: at this yard, not recorded as full or empty; refused. otherProduct: another product; refused.

string
Allowed values: quarantined empty full released new expected elsewhere unavailable unknownCondition otherProduct
asset
required
object
id
required

UUID v7

string format: uuid
productId
required

UUID v7

string format: uuid
productName
required
string
state
required

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.

string
Allowed values: active review faulty lost retired
condition
required
string | null
Allowed values: full empty
holder
required
object
kind
required
string
Allowed values: place vehicle customer supplier nowhere transit
id
required

UUID v7

string | null format: uuid
name
required
string | null
references
required
Array<object>
object
definitionId
required

UUID v7

string format: uuid
name
required
string
value
required
string
quarantinedAt
required
string | null format: date-time
lastMovedAt
required
string format: date-time
createdAt
required
string format: date-time

Example

{
"items": [
{
"status": "quarantined",
"asset": {
"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"
}
]
}
}
]
}

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"
}
]
}