Skip to content

Receive full cylinders into a yard, by serial number

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

Stock goes up by the quantity at the yard. Each serial is named on the movement: serials not in the register are added to it. The fill’s details (batch, fill date, expiry) are set on every named cylinder, and the previous fill’s stay searchable. Any of the quantity not named is left to name later.

Media typeapplication/json
object
productId
required

UUID v7

string format: uuid

Example

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

UUID v7

string format: uuid

Example

019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f
quantity
required
integer
> 0 <= 1000
serials
required
Array<string>
<= 1000 items
references
object
key
additional properties
string
<= 200 characters
note
string | null
<= 500 characters

Received

Media typeapplication/json
object
received
required
integer
added
required
integer
unnamed
required
integer

Example generated

{
"received": 1,
"added": 1,
"unnamed": 1
}

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