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 read the sample requests raised on a style, move them through the sample
workflow, record the fit measurements taken on each requested size, and read the requested
sizes and per-colour quantities back for an overview or an ERP export. Raising and archiving
sample requests is not yet part of the public API.
The workflow
Sample requests hang off a style. Each is raised against the style for a chosen sample type and size range, and runs through the sample workflow (request → sent → received → commented) 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. Once the sample arrives, the designer records its fit measurements against each requested size.1
Read requests and requested sizes
A sample request belongs to a style (
GET /api/styles/{styleId}) and is raised for a sample
type from the brand’s library (GET /api/sample-types).
GET /api/styles/{styleId}/sample-requests lists a style’s requests;
GET /api/sample-requests gives the org-wide, paginated overview, and
GET /api/styles/{styleId}/sample-requests/{id} returns a single request. Fetch a request’s
sizes and per-colour quantities from GET /api/styles/{styleId}/sample-requests/{sampleRequestId}/sizes.2
Advance the sample workflow
PATCH /api/styles/{styleId}/sample-requests/{id} with a JSON Patch on /status moves one
request along the workflow: the supplier marks it sent (with a trackingNumber), the
designer marks it received when it arrives. See
Move a request through the workflow.3
Record fit measurements
Once the sample is in hand, read its measured grid with
GET /api/styles/{styleId}/sample-requests/{sampleRequestId}/measurements and write the
designer’s measured values, the wanted values for the next round, and a per-size fit comment
back with PUT or PATCH on the same path. See Record fit measurements.Walkthrough
List the sample requests on a style. Archived requests are left out unless you passincludeArchived=true.
id: the workflow
PATCH, the measurements 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.
Move a request through the workflow
PATCH /api/styles/{styleId}/sample-requests/{id} changes one request’s status. The body is an
RFC 6902 JSON Patch document (Content-Type: application/json-patch+json) applied to the
request’s current state, so only the paths you send change. Two paths are writable: /status,
and /trackingNumber when the target status is sent.
code: "sample_request_updated"), with
lastStateChange stamped and, on a move to sent, sendDate and trackingNumber set.
- The move must be allowed from the current status, and depends on who you are. The
permitted moves mirror Delogue Classic. A supplier assigned to the style can, for example,
confirm a
requestedsample or mark itsent; the designer side can also mark itreceivedorcommented, send it back torequested, or cancel it. A move the workflow does not allow returns 422 (unprocessable_error.invalid_state_transition). trackingNumberbelongs tosentonly. Sending it with any other target status returns 400.- The status change is recorded in the request’s communication log. It sends no notifications.
Record fit measurements
When a sample arrives, the designer measures it and records the result on the sample request. Each request carries its own measured grid (one entry per requested size, one line per point of measure) separate from the style’s measurement chart. Each line’s target value,requestedMeasurement, is frozen from the style’s measurement chart when
the request is raised.
Read the grid for every requested size with
GET /api/styles/{styleId}/sample-requests/{sampleRequestId}/measurements, or for one size with
GET /api/styles/{styleId}/sample-requests/{sampleRequestId}/measurements/{sizeRangeSizeId}:
null lineId is deactivated: it is returned for display and cannot be written.
The response carries no discrepancy: compare requestedMeasurement with the measured values
yourself. A sizeRangeSizeId that is not a requested size on the request returns 404.
Only three values are writable per size: companyMeasurement and newMeasurement on each
active line, and the size’s designerComment. The read-only fields (name,
requestedMeasurement, supplierMeasurement and tolerance) are rejected in a write body
with 400. Pick the call by how much you are writing:
Record the designer’s measurements for size M and ask for a wider chest in the next round:
cURL
code: "sample_request_measurement_updated").
- Patch indexes count active lines only, in line-position order (and, on the grid-wide
PATCH, requested sizes in size order). A deactivated line is not in the patch document, so do not index by its position in theGETresponse. - A changed
newMeasurementupdates the style’s measurement chart. The wanted value is written back to that line of the style’s chart, which is re-graded in the same transaction; if the chart rejects the change, the whole write fails with 422 and nothing is saved. - The write is recorded in the request’s measurement change history, and does not change the sample request’s status or dates.
- A request in the
commentedstatus does not accept measurement writes (422). A size or line that is not on the request, or a full-replace body that misses a requested size or an active line, also returns 422.
Field reference
The fields that matter most when reading a request back:Measured values
The writable fields of a measurement write. Each measured value is a number in the size’sunit, and null clears it.
Roles & permissions
Sample requests are a style collaboration surface, so access follows the parent style. Designer (brand) accounts (typicallyCompanyAdmin or CompanyUser) work on the requests of
their own styles. Suppliers assigned to the style collaborate on its sample requests: a supplier can read the style’s requests and change their status with
PATCH /api/styles/{styleId}/sample-requests/{id}, within the moves the workflow allows the
supplier side. Changing status needs styles write access on either side. Measurements are
designer-only: reading them requires your organisation to own the style, and writing them also
needs styles write access on a brand account (CompanyAdmin or CompanyUser). A supplier
caller receives 403 from the measurement endpoints. A style ID belonging to another organisation returns 403; a
style ID that exists nowhere returns 404, as does a sample request that is not on the given
style.
When things go wrong
Errors use the standard envelope (status: "error", a code, and error.details[]). The
PATCH endpoints return 409 when a JSON Patch test operation fails and 422 for any
other operation that cannot be applied; a status change or measurement write that collides
with a concurrent change also returns 409: re-read and retry. 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.Measurement charts
The style’s graded chart that a request’s target values are frozen from.
Authentication
How to get and send your
X-Auth-Token API key.