Product Traceability API

Build end-to-end product journeys composed of ordered processing stages with distances and CO₂ emissions.

A product traceability is a header (the journey) plus an ordered list of processing stages. See the Traceability concept page for the model.

Endpoints

Traceability header

MethodPathDescription
GET/api/v1/product/traceability/stage-typesList available stage types for the traceability canvas
GET/api/v1/product/traceabilityList journeys with pagination and facets
GET/api/v1/product/traceability/{id}Get a journey with all its stages
POST/api/v1/product/traceabilityCreate a new journey
PATCH/api/v1/product/traceability/{id}Partially update a journey
DELETE/api/v1/product/traceability/{id}Delete a journey (cascades to stages)

Processing stages

MethodPathDescription
POST/api/v1/product/traceability/{id}/stagesAppend a stage to a journey
PATCH/api/v1/product/traceability/stages/{stageId}Update a stage
DELETE/api/v1/product/traceability/stages/{stageId}Remove a stage (recomputes aggregates)

GET /api/v1/product/traceability

Query parameterTypeRequiredNotes
pagenumberno1-based page number
limitnumbernoMax 100
searchstringnoSearch journey names
clientIdsuuid[]noFilter by client facet
compositionIdsuuid[]noFilter by composition facet
sortByenumnoOpenAPI-supported sort key
sortDirectionenumnoasc or desc
Shell
curl "{{BASE_URL}}/api/v1/product/traceability?page=1&limit=20&search=t-shirt"

Response 200 OKProductTraceabilityListResponseDto with data, meta and facets.


GET /api/v1/product/traceability/stage-types

Lists available stage types for traceability canvas configuration.

Response 200 OK — array of StageTypeDto with id, code, label and icon.


GET /api/v1/product/traceability/{id}

Returns the full traceability including all its processing stages sorted by sequenceOrder.

  • 200 OKProductTraceabilityDto with processingStages[].
  • 404 Not Found — journey does not exist in your tenant.

POST /api/v1/product/traceability

Request body (CreateProductTraceabilityDto)

FieldTypeRequiredDescription
traceabilityNamestringHuman-readable name
pfcrCalculationIduuidLink to a Product Footprint calculation
descriptionstringFree-form description
metadataobjectArbitrary JSON
Shell
curl -X POST {{BASE_URL}}/api/v1/product/traceability \
-H "Content-Type: application/json" \
-d '{
"productId": "product-uuid…",
"traceabilityName": "T-Shirt SS26 — Supply Chain",
"description": "Full cotton-to-garment journey"
}'

Response 201 CreatedProductTraceabilityDto.


PATCH /api/v1/product/traceability/{id}

Partial update of pfcrCalculationId, traceabilityName, description, metadata and other fields exposed by UpdateProductTraceabilityDto.

DELETE /api/v1/product/traceability/{id}

Removes the journey and all its processing stages.

  • 204 No Content — deleted.
  • 404 Not Found — journey does not exist in your tenant.

POST /api/v1/product/traceability/{id}/stages

Appends a processing stage to the journey identified by {id}.

Request body (CreateProcessingStageDto)

FieldTypeRequiredDescription
sequenceOrderinteger1-based position in the chain
stageNamestringe.g. Spinning, Dyeing, Shipping
companyTypeenumSUPPLIER or COMPANY
supplierIduuidRequired when companyType = SUPPLIER
companyIduuidRequired when companyType = COMPANY
internalProcessstringDescription of what happens at this stage
transportModeenumTRUCK, SHIP, TRAIN, PLANE
startsFromCompanybooleanWhether the transport leg originates from your company
distanceKmnumberDistance to the next stage (km)
co2EmissionsnumberCO₂ for this leg (kg CO₂eq)
certificationsSnapshotstringCertifications applicable at this stage
Shell
curl -X POST {{BASE_URL}}/api/v1/product/traceability/{tracId}/stages \
-H "Content-Type: application/json" \
-d '{
"sequenceOrder": 1,
"stageName": "Cotton cultivation",
"companyType": "SUPPLIER",
"supplierId": "3f2b9a1c-…",
"transportMode": "TRUCK",
"startsFromCompany": false,
"distanceKm": 120,
"co2Emissions": 15.4,
"certificationsSnapshot": "GOTS"
}'

Response 201 CreatedProcessingStageDto.


PATCH /api/v1/product/traceability/stages/{stageId}

Partially updates a single stage. Any of the fields documented above can be changed.

DELETE /api/v1/product/traceability/stages/{stageId}

Removes the stage. The parent journey's aggregate totalCo2PerKg and totalDistanceKm are recomputed server-side.

  • 204 No Content — deleted.
  • 404 Not Found — stage does not exist in your tenant.

Traceability schema

ProductTraceabilityDto:

JSON
{
"id": "trac-uuid…",
"userId": "user-uuid…",
"productId": "product-uuid…",
"pfcrCalculationId": null,
"traceabilityName": "T-Shirt SS26 — Supply Chain",
"description": "Full cotton-to-garment journey",
"totalCo2PerKg": 2.85,
"totalDistanceKm": 11230,
"metadata": null,
"processingStages": [
{
"id": "stg-uuid…",
"traceabilityId": "trac-uuid…",
"userId": "user-uuid…",
"sequenceOrder": 1,
"stageName": "Cotton cultivation",
"companyType": "SUPPLIER",
"supplierId": "3f2b9a1c-…",
"companyId": null,
"internalProcess": null,
"transportMode": "TRUCK",
"startsFromCompany": false,
"distanceKm": 120,
"co2Emissions": 15.4,
"certificationsSnapshot": "GOTS",
"createdAt": "2026-04-21T10:00:00.000Z",
"updatedAt": "2026-04-21T10:00:00.000Z"
}
],
"createdAt": "2026-04-21T10:00:00.000Z",
"updatedAt": "2026-04-21T10:00:00.000Z"
}

Stage schema

ProcessingStageDto matches the embedded stage structure shown above.