Skip to content

Get yards and cylinder counts for a stock take

GET
/stock-takes/context
curl --request GET \
--url 'https://example.com/stock-takes/context?locationId=019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f' \
--cookie __Host-bottle.session_token=<__Host-bottle.session_token>
locationId

UUID v7

string format: uuid

Example

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

UUID v7

Yards, products and last stock take

Media typeapplication/json
object
yards
required
Array<object>
object
id
required

UUID v7

string format: uuid
name
required
string
postcode
required
string
products
required
Array<object>
object
id
required

UUID v7

string format: uuid
name
required
string
shortCode
required
string | null
sku
required
string | null
full
required
integer
empty
required
integer
latest
required
object
id
required

UUID v7

string format: uuid
locationId
required

UUID v7

string format: uuid
locationName
required
string
byUserId
required
string | null
byName
required
string | null
createdAt
required
string format: date-time
note
required
string | null
lines
required
Array<object>
object
productId
required

UUID v7

string format: uuid
productName
required
string
shortCode
required
string | null
expectedFull
required
integer
expectedEmpty
required
integer
full
required
integer | null
<= 1000000
empty
required
integer | null
<= 1000000
damagedFull
integer
0 <= 1000000
damagedEmpty
integer
0 <= 1000000
damageRecordingSupported
required
boolean

Example

{
"yards": [
{
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"
}
],
"products": [
{
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"
}
],
"latest": {
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"locationId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"lines": [
{
"productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"damagedFull": 0,
"damagedEmpty": 0
}
]
}
}

Sign in

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Not allowed to take stock in this business

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Yard or product unavailable

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Check the counts

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