Traceability Records API

Lightweight batch-level traceability — origin, destination, certifications and compliance flag per shipment.

Use traceability records when you need a per-batch audit trail without modeling a full product journey. See the Traceability concept page for the difference between the two models.

Endpoints

MethodPathDescription
GET/api/v1/traceabilityList records, optionally filtered by productId
GET/api/v1/traceability/{id}Get a single record
POST/api/v1/traceabilityCreate a batch traceability record
PATCH/api/v1/traceability/{id}Partially update a record
DELETE/api/v1/traceability/{id}Delete a record

GET /api/v1/traceability

Query parameterTypeRequired
productIdstring—
Shell
curl "{{BASE_URL}}/api/v1/traceability?productId=SKU-001"

Response 200 OK — JSON array of TraceabilityRecordDto.


POST /api/v1/traceability

Request body (CreateTraceabilityRecordDto)

FieldTypeRequiredDescription
productIdstring✅Any product identifier (SKU, UUID, or external ref)
batchNumberstring✅Your batch reference
originstring✅Where the batch comes from
destinationstring—Where the batch is going
supplierIduuid—Linked supplier (if any)
processingFacilitystring—Facility name / description
certificationsstring—Free-form list of certifications
isCompliantboolean—Your QA compliance flag (default false)
userIduuid—Owning user (optional)
companyIduuid—Owning company (optional)
notesstring—Free-form notes
metadataobject—Arbitrary JSON
Shell
curl -X POST {{BASE_URL}}/api/v1/traceability \
-H "Content-Type: application/json" \
-d '{
"productId": "SKU-001",
"batchNumber": "B-2026-042",
"origin": "Gujarat, India",
"destination": "Milano warehouse",
"supplierId": "3f2b9a1c-…",
"processingFacility": "Ahmedabad spinning mill",
"certifications": "GOTS, OEKO-TEX",
"isCompliant": true
}'

Response 201 Created — TraceabilityRecordDto.


GET /api/v1/traceability/{id}

PATCH /api/v1/traceability/{id}

Partial update over any of the documented fields.

DELETE /api/v1/traceability/{id}

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

Record schema

TraceabilityRecordDto:

JSON
{
"id": "rec-uuid…",
"productId": "SKU-001",
"batchNumber": "B-2026-042",
"origin": "Gujarat, India",
"destination": "Milano warehouse",
"supplierId": "3f2b9a1c-…",
"processingFacility": "Ahmedabad spinning mill",
"certifications": "GOTS, OEKO-TEX",
"isCompliant": true,
"userId": null,
"companyId": null,
"notes": null,
"metadata": null,
"createdAt": "2026-04-21T10:00:00.000Z",
"updatedAt": "2026-04-21T10:00:00.000Z"
}