Skip to content

Look up serial numbers before receiving them

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

For each value of the unique detail, such as the serial number, the cylinder that carries it now and where it was last recorded, or null when it is not in the register yet. Nothing is saved.

Media typeapplication/json
object
productId
required

UUID v7

string format: uuid

Example

019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f
values
required
Array<string>
>= 1 items <= 500 items

Each value, with its cylinder or null

Media typeapplication/json
object
items
required
Array<object>
object
value
required
string
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
lastMovedAt
required
string format: date-time
createdAt
required
string format: date-time

Example

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