Skip to main content

Products

Manage your product catalogue via the Products API.

Base path: /v1/products

Product Fields

FieldTypeDescription
idstring (UUID)Unique product identifier
namestringProduct display name
modelstringModel number or name
variantstringVariant descriptor (e.g., "Blue / L")
skustringStock Keeping Unit
gtinstringGlobal Trade Item Number (14 digits)
upcstringUniversal Product Code
eanstringEuropean Article Number
batchNumberstringProduction batch/lot number
serialNumberstringIndividual serial number
sizestringSize descriptor
colorstringColor descriptor
weightnumberNumeric weight value
weightUnitstringUnit of weight (e.g., kg, g, lb)
categorystringProduct category slug
createdAtstring (ISO 8601)Creation timestamp
updatedAtstring (ISO 8601)Last update timestamp

List Products

GET /v1/products

Returns a paginated list of all products.

Query parameters: See Pagination

Request:

curl https://api.acme.trackvision.ai/v1/products \
-H "Authorization: Bearer $TV_API_KEY"

Response:

{
"products": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Organic Cotton T-Shirt",
"model": "TSHIRT-ORG",
"variant": "White / M",
"sku": "TSHIRT-001",
"gtin": "09506000134352",
"category": "apparel",
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:00:00Z"
}
],
"pagination": {
"page": 1,
"perPage": 50,
"total": 1,
"totalPages": 1
}
}

Get Product

GET /v1/products/{id}

Returns a single product by ID.

Request:

curl https://api.acme.trackvision.ai/v1/products/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer $TV_API_KEY"

Response:

{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Organic Cotton T-Shirt",
"model": "TSHIRT-ORG",
"variant": "White / M",
"sku": "TSHIRT-001",
"gtin": "09506000134352",
"upc": "",
"ean": "",
"batchNumber": "BATCH-2024-01",
"serialNumber": "",
"size": "M",
"color": "White",
"weight": 0.2,
"weightUnit": "kg",
"category": "apparel",
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:00:00Z"
}

Create Product

POST /v1/products

Creates a new product.

Request body:

{
"name": "Recycled Polyester Jacket",
"model": "JACKET-RPJ",
"variant": "Navy / L",
"sku": "JACKET-002",
"gtin": "09506000134369",
"size": "L",
"color": "Navy",
"weight": 0.8,
"weightUnit": "kg",
"category": "outerwear"
}

Request:

curl -X POST https://api.acme.trackvision.ai/v1/products \
-H "Authorization: Bearer $TV_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Recycled Polyester Jacket",
"sku": "JACKET-002",
"gtin": "09506000134369",
"category": "outerwear"
}'

Response: 201 Created with the created product object.


Update Product

PUT /v1/products/{id}

Updates an existing product. Send only the fields you want to change.

Request:

curl -X PUT https://api.acme.trackvision.ai/v1/products/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer $TV_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"variant": "White / L",
"size": "L"
}'

Response: 200 OK with the updated product object.


Delete Product

DELETE /v1/products/{id}

Permanently deletes a product and all associated DPP data.

Request:

curl -X DELETE https://api.acme.trackvision.ai/v1/products/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer $TV_API_KEY"

Response: 204 No Content