Products
Manage your product catalogue via the Products API.
Base path: /v1/products
Product Fields
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Unique product identifier |
name | string | Product display name |
model | string | Model number or name |
variant | string | Variant descriptor (e.g., "Blue / L") |
sku | string | Stock Keeping Unit |
gtin | string | Global Trade Item Number (14 digits) |
upc | string | Universal Product Code |
ean | string | European Article Number |
batchNumber | string | Production batch/lot number |
serialNumber | string | Individual serial number |
size | string | Size descriptor |
color | string | Color descriptor |
weight | number | Numeric weight value |
weightUnit | string | Unit of weight (e.g., kg, g, lb) |
category | string | Product category slug |
createdAt | string (ISO 8601) | Creation timestamp |
updatedAt | string (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