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
| Method | Path | Description |
|---|---|---|
GET | /api/v1/product/traceability/stage-types | List available stage types for the traceability canvas |
GET | /api/v1/product/traceability | List journeys with pagination and facets |
GET | /api/v1/product/traceability/{id} | Get a journey with all its stages |
POST | /api/v1/product/traceability | Create 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
| Method | Path | Description |
|---|---|---|
POST | /api/v1/product/traceability/{id}/stages | Append 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 parameter | Type | Required | Notes |
|---|---|---|---|
page | number | no | 1-based page number |
limit | number | no | Max 100 |
search | string | no | Search journey names |
clientIds | uuid[] | no | Filter by client facet |
compositionIds | uuid[] | no | Filter by composition facet |
sortBy | enum | no | OpenAPI-supported sort key |
sortDirection | enum | no | asc or desc |
curl "{{BASE_URL}}/api/v1/product/traceability?page=1&limit=20&search=t-shirt"
Response 200 OK — ProductTraceabilityListResponseDto 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 OK—ProductTraceabilityDtowithprocessingStages[].404 Not Found— journey does not exist in your tenant.
POST /api/v1/product/traceability
Request body (CreateProductTraceabilityDto)
| Field | Type | Required | Description |
|---|---|---|---|
traceabilityName | string | ✅ | Human-readable name |
pfcrCalculationId | uuid | — | Link to a Product Footprint calculation |
description | string | — | Free-form description |
metadata | object | — | Arbitrary JSON |
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 Created — ProductTraceabilityDto.
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)
| Field | Type | Required | Description |
|---|---|---|---|
sequenceOrder | integer | ✅ | 1-based position in the chain |
stageName | string | ✅ | e.g. Spinning, Dyeing, Shipping |
companyType | enum | ✅ | SUPPLIER or COMPANY |
supplierId | uuid | — | Required when companyType = SUPPLIER |
companyId | uuid | — | Required when companyType = COMPANY |
internalProcess | string | — | Description of what happens at this stage |
transportMode | enum | ✅ | TRUCK, SHIP, TRAIN, PLANE |
startsFromCompany | boolean | ✅ | Whether the transport leg originates from your company |
distanceKm | number | — | Distance to the next stage (km) |
co2Emissions | number | — | CO₂ for this leg (kg CO₂eq) |
certificationsSnapshot | string | — | Certifications applicable at this stage |
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 Created — ProcessingStageDto.
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:
{"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.