Get stock levels
const url = 'https://example.com/stock?yardId=019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f';const options = { method: 'GET', headers: {cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/stock?yardId=019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token>Every yard and every vehicle, with what is on each, full and empty counted apart. Summed from the movements rather than kept beside them, so a count and its workings cannot drift. Also what the whole business holds, and anything at or under the figure somebody set for it. Give yardId to see one yard and the vehicles based there; yards always lists every yard with how many of its products are low. What customers hold, and what is promised to orders, are always for the whole business.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Responses
Section titled “Responses”Where the stock is
object
object
object
UUID v7
UUID v7
object
UUID v7
object
UUID v7
UUID v7
object
UUID v7
object
UUID v7
object
UUID v7
object
UUID v7
object
UUID v7
object
UUID v7
object
UUID v7
UUID v7
object
UUID v7
UUID v7
UUID v7
object
UUID v7
object
UUID v7
UUID v7
object
UUID v7
object
UUID v7
UUID v7
Example
{ "insights": { "products": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ] }, "yardId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "yards": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ], "holders": [ { "kind": "place", "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "yardId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "counts": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ] } ], "totals": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ], "notCounted": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ], "withCustomers": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ], "unaccounted": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ], "promised": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ], "reserved": [ { "locationId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "condition": "full" } ], "inTransit": [ { "transferId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "fromLocationId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "toLocationId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "lines": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "condition": "full" } ] } ], "incoming": [ { "orderId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "locationId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "lines": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ] } ], "low": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "locationId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ]}Not signed in
object
Example
{ "error": "not_found", "message": "Customer not found"}Not a member, or without the permission this needs
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}