Skip to content

Check a count of one product at a yard, by serial number

POST
/assets/stocktake/check
curl --request POST \
--url https://example.com/assets/stocktake/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" ] }'

Compares the serials counted at a yard with the register: found, missing (recorded there but not counted), recorded elsewhere, not in the register, and serials of another product. Also what the stock book says the yard holds. 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>
<= 5000 items

What the count found

Media typeapplication/json
object
found
required
Array<object>
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
missing
required
Array<object>
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
elsewhere
required
Array<object>
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
unknown
required
Array<string>
otherProduct
required
Array<object>
object
serial
required
string
productName
required
string
book
required
object
full
required
integer
empty
required
integer

Example

{
"found": [
{
"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"
}
]
}
],
"missing": [
{
"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"
}
]
}
],
"elsewhere": [
{
"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"
}
]
}