When to use this. A sample request asks a supplier to produce a physical sample of a
style — a fit, proto, or pre-production sample — in specific sizes and colourways. Use these
endpoints to raise sample requests on a style, move them through their lifecycle (cancel,
archive, reactivate), and read the requested sizes and per-colour quantities back for an
overview or an ERP export.
The workflow
Sample requests hang off a style. You raise one (or several) against the style for a chosen sample type and size range, the request runs through the sample workflow (request → sent → received → commented), and you can transition it — cancel, archive, or reactivate — as work progresses. The requested sizes and their per-colour quantities are read from a dedicated child collection so a list response never nests three arrays deep.1
Pick the style and sample type
A sample request is created on a style (
GET /api/styles/{styleId}) for a sample type from
the brand’s library (GET /api/sample-types). Have both IDs ready.2
Request the samples
POST /api/styles/{styleId}/sample-requests with an array of requests. Each carries a
sampleTypeId, the sizeRangeId, and requestedSampleSizes — the sizes and the per-colour
quantity for each.3
Transition through the lifecycle
PUT /api/styles/{styleId}/sample-requests (per style) or PUT /api/sample-requests
(across styles) with { id, state, comment } rows to cancelled, archived, or back to
requested (reactivate a cancelled request).4
Read requests and requested sizes
GET /api/styles/{styleId}/sample-requests lists a style’s requests;
GET /api/sample-requests gives the org-wide, paginated overview. Fetch a request’s sizes
and per-colour quantities from GET /api/styles/{styleId}/sample-requests/{sampleRequestId}/sizes.Walkthrough
Create a sample request on a style, then read it back. The body is an array — one or many requests are created in a single all-or-nothing transaction.id — the
lifecycle PUTs and the sizes child collection are keyed by it. The requested sizes are not
embedded in the request representation; read them from the /sizes sub-resource.
Field reference
The fields that matter most when creating a request or reading one back:Roles & permissions
Sample requests are a style collaboration surface, so access follows the parent style. Raising and transitioning requests requires write access to the style on a designer (brand) account — typicallyCompanyAdmin or CompanyUser. Suppliers assigned to the style collaborate
on its sample requests. A style ID belonging to another organisation returns 403; a style ID
that exists nowhere returns 404.
When things go wrong
Errors use the standard envelope (status: "error", a code, and error.details[]). Bulk
create and bulk lifecycle updates are all-or-nothing and report per-item failures with [i].field
paths. See Errors & responses for the full list of codes and how to resolve
them.
What to call next
Styles
Sample requests hang off a style — create and manage the parent style first.
Sample types
Manage the fit / proto / pre-production sample types a request is raised for.
Requested sizes
Read a request’s sizes and per-colour quantities:
GET /api/styles/{styleId}/sample-requests/{sampleRequestId}/sizes.Authentication
How to get and send your
X-Auth-Token API key.