Get current stock
/api/v2/stockCanonical CanonicalStockPosition records for the caller's own business — derived from auth, never taken from the path or query. Returns a page of stock positions; an empty data array means the business genuinely has no matching stock, distinct from a 502/504 if the warehouse system is unreachable.
Values shown like YOUR_SITE are your own configuration, not literals — substitute the values from your onboarding pack. The sandbox checks shape only, so a payload can pass there and still be rejected by the warehouse.
Request schema
The body is an array of records in this shape. Pick a scenario above to see a complete, valid payload.
Headers
AuthorizationBasic base64(businessId:apiKey)requiredHTTP Basic. Username is your businessId, password is your API key.
x-correlation-idoptionalYour own trace id for this request. Adopted for every log line Fuse writes while processing it, and returned as `correlationId` in the response body. Omitted: Fuse generates one.
Content-Typeapplication/jsonrequiredOn 200.
Content-Typeapplication/problem+jsonrequiredOn 401, 502.
Responses
application/jsonCurrent stock snapshot for the caller's own business
Body fields
- totalnumberTotal number of stock positions matching the query, across all pages
- offsetnumberZero-based offset of the first record in this page
- countnumberNumber of records in this page
- dataarray of objectThe stock positions in this page — CanonicalStockPosition records (a product's stock levels or a kit's buildable availability)
application/problem+jsonMissing or invalid API key
{
"type": "https://tools.ietf.org/html/rfc7235#section-3.1",
"title": "Unauthorized",
"status": 401,
"detail": "Unauthorized",
"instance": "/api/v2/stock"
}Body fields
- typestringA URI reference that identifies the problem type
- titlestringA short, human-readable summary of the problem type
- statusnumberThe HTTP status code generated by the origin server for this occurrence of the problem
- detailstringA human-readable explanation specific to this occurrence of the problem
- instancestringA URI reference that identifies the specific occurrence of the problem
- errorsarray of objectValidation errors (extension field for 400 Bad Request responses). For field-level validation errors (from Zod), this is an array of FieldValidationErrorDto. For batch validation errors, this is an array of RecordValidationErrorDto.
Per-customer rate limit exceeded
application/problem+jsonThe warehouse system returned an error or is unreachable
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.6.2",
"title": "Bad Gateway",
"status": 502,
"detail": "The warehouse system is currently unavailable. Please retry shortly.",
"instance": "/api/v2/stock"
}Body fields
- typestringA URI reference that identifies the problem type
- titlestringA short, human-readable summary of the problem type
- statusnumberThe HTTP status code generated by the origin server for this occurrence of the problem
- detailstringA human-readable explanation specific to this occurrence of the problem
- instancestringA URI reference that identifies the specific occurrence of the problem
- errorsarray of objectValidation errors (extension field for 400 Bad Request responses). For field-level validation errors (from Zod), this is an array of FieldValidationErrorDto. For batch validation errors, this is an array of RecordValidationErrorDto.