Look up serial numbers before receiving them
POST
/assets/identify
const url = 'https://example.com/assets/identify';const options = { method: 'POST', headers: { cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"productId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f","values":["example"]}'};
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/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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
productId
required
UUID v7
string format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fvalues
required
Array<string>
Responses
Section titled “Responses”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
condition
required
string | null
holder
required
object
kind
required
string
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
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}