Product
Products are the core master data entities representing types of items that can be tracked through the supply chain in TrackVision.
The product Object
Products store comprehensive information about item types including identification, physical properties, nutritional data, and packaging details.
| Field Name | Type | Description |
|---|---|---|
id | string | Primary key for the product. Auto set if using GS1 IDs. |
user_created | object | User who created the product. Read-only. Links to directus_users. |
date_created | datetime | Timestamp in ISO 8601 when the product was created. Read-only. |
user_updated | object | User who last updated the product. Read-only. Links to directus_users. |
date_updated | datetime | Timestamp in ISO 8601 when the product was last updated. Read-only. |
product_name | string | The commercial name or title of the product. |
brand | object | Related brand entity. Many products can belong to one brand. Links to brand. |
gtin | string | Global Trade Item Number (GTIN) - the globally unique identifier for the product. |
custom_id | string | Custom internal identifier for the product. |
digital_link | string | GS1 Digital Link URL for the product. Auto generated if using GS1 IDs. |
product_redirection_url | string | URL where the product should redirect when scanned. |
product_reference_document | object | Reference to a document related to this product. Links to directus_files. |
packaging_type_code | object | Reference to packaging type from standard codes. Links to ref_packaging_type_codes. |
variant_description | string | Description of product variant (e.g., size, color, flavor). |
functional_name | string | Functional or generic name of the product. |
net_weight | number | Net weight of the product. |
net_weight_unit | object | Unit of measure for net weight. Links to ref_uom. |
gross_weight | number | Gross weight of the product including packaging. |
gross_weight_unit | object | Unit of measure for gross weight. Links to ref_uom. |
third_party_product | boolean | Indicates if this is a third-party manufactured product. |
finished_product | boolean | Indicates if this is a finished product ready for sale. |
primary_image | object | Primary image file for the product. Links to directus_files. |
product_manufacturer | object | Organisation that manufactures the product. Links to organisation. |
brand_owner | object | Organisation that owns the brand. Links to organisation. |
account | object | Account associated with this product. (Multi-tenant installations only) |
net_content | number | Net content amount of the product. |
net_content_unit | object | Unit of measure for net content. Links to ref_uom. |
product_redirection_rule | object | Flow rule for product redirection logic. Links to directus_flows. |
fat_percentage_in_dry_matter | number | Percentage of fat in dry matter (for food products). |
percentage_of_alcohol_by_volume | number | Alcohol percentage by volume (for beverages). |
nutrient_basis_quantity | number | Quantity basis for nutritional information. |
nutrient_basis_quantity_type | string | Type of nutrient basis quantity. |
nutrient_basis_quantity_unit | object | Unit of measure for nutrient basis quantity. Links to ref_uom. |
serving_size | number | Recommended serving size. |
serving_size_unit | object | Unit of measure for serving size. Links to ref_uom. |
in_package_height | number | Height of the product in its packaging. |
in_package_height_unit | object | Unit of measure for package height. Links to ref_uom. |
in_package_width | number | Width of the product in its packaging. |
in_package_width_unit | object | Unit of measure for package width. Links to ref_uom. |
in_package_depth | number | Depth of the product in its packaging. |
in_package_depth_unit | object | Unit of measure for package depth. Links to ref_uom. |
country_of_origin | object | Country of origin for the product. Links to ref_country. |
parent_product | object | Reference to a parent product in a hierarchy. Links to product. |
size | string | Size of the product (apparel/footwear). |
target_consumer_gender | string | Target consumer gender (apparel/footwear). |
season_code | string | Season code for the product (apparel/footwear). |
color | string | Color description for the product (apparel/footwear). |
translations | array of objects | Translations for multi-lingual product content. |
certifications | array of objects | Certifications associated with this product. |
nutrients | array of objects | Nutritional values associated with this product. |
Sub-Objects
User Object (user_created, user_updated)
See Users for the full schema.
Account Object (account)
See Account for the full schema.
File Object (primary_image, product_reference_document)
See Files for the full schema.
Brand Object (brand)
See Brand for the full schema.
Organisation Object (product_manufacturer, brand_owner)
See Organisation for the full schema.
Unit of Measure Object (all *_unit fields)
See Unit of Measurement for the full schema.
Packaging Type Object (packaging_type_code)
| Field | Type | Description |
|---|---|---|
code | string | Packaging type code (primary key). |
packaging_type_name | string | Human-readable packaging type name. |
Country Object (country_of_origin)
See Country for the full schema.
Product Translation Object (translations)
| Field | Type | Description |
|---|---|---|
id | integer | Unique identifier of the translation record. |
languages_code | string | Language code for this translation (e.g., "en-US"). |
product_description | string | Translated product description. |
allergen_statement | string | Translated allergen statement. |
ingredient_statement | string | Translated ingredient statement. |
product_content | string | Translated product content. |
country_of_origin_statement | string | Translated country of origin statement. |
ingredients_of_concern_statement | string | Translated ingredients of concern statement. |
List Products
List existing products.
- REST
- GraphQL
GET /items/product
query {
product {
id
product_name
brand {
id
name
}
gtin
custom_id
finished_product
third_party_product
}
}
Query Parameters
Supports all global query parameters.
Returns
An array of up to limit product objects. If no items are available, data will be an empty array.
Retrieve a Product
List existing products.
- REST
- GraphQL
GET /items/product/:id
query {
product_by_id(id: "product_id") {
id
product_name
brand {
id
name
}
gtin
custom_id
digital_link
product_redirection_url
packaging_type_code {
code
description
}
variant_description
functional_name
net_weight
net_weight_unit {
code
name
}
gross_weight
gross_weight_unit {
code
name
}
third_party_product
finished_product
primary_image {
id
filename_download
}
product_manufacturer {
id
name
}
brand_owner {
id
name
}
account {
id
name
}
net_content
net_content_unit {
code
name
}
serving_size
serving_size_unit {
code
name
}
in_package_height
in_package_height_unit {
code
name
}
in_package_width
in_package_width_unit {
code
name
}
in_package_depth
in_package_depth_unit {
code
name
}
user_created {
id
first_name
last_name
}
date_created
user_updated {
id
first_name
last_name
}
date_updated
}
}
Returns
Returns a product object if a valid primary key was provided.
Create a Product
Create a new product.
- REST
- GraphQL
POST /items/product
{
"product_name": "AP-2 Bearings",
"brand": "0b789868-2863-4d41-aa6f-b2585020ae08",
"gtin": "00053893430744",
"custom_id": "HM133436FSA-90011",
"digital_link": "https://food.tvai.me/01/00053893430744",
"product_redirection_url": "https://www.company.com/",
"finished_product": true,
"third_party_product": false,
"product_manufacturer": "/417/0053893000008",
"brand_owner": "/417/0053893000008"
}
mutation {
create_product_item(data: {
product_name: "AP-2 Bearings"
brand: "0b789868-2863-4d41-aa6f-b2585020ae08"
gtin: "00053893430744"
custom_id: "HM133436FSA-90011"
digital_link: "https://food.tvai.me/01/00053893430744"
product_redirection_url: "https://www.company.com/"
finished_product: true
third_party_product: false
product_manufacturer: "/417/0053893000008"
brand_owner: "/417/0053893000008"
}) {
id
product_name
gtin
custom_id
}
}
Query Parameters
Supports all global query parameters.
Request Body
A partial product object.
Returns
Returns the product object for the created product.
Update a Product
Update an existing product.
- REST
- GraphQL
PATCH /items/product/:id
{
"product_name": "AP-2 Bearings - Updated",
"product_redirection_url": "https://www.company.com/products/bearings/",
"custom_id": "HM133436FSA-90011-V2"
}
mutation {
update_product_item(id: "/01/00053893430744", data: {
product_name: "AP-2 Bearings - Updated"
product_redirection_url: "https://www.company.com/products/bearings/"
custom_id: "HM133436FSA-90011-V2"
}) {
id
product_name
product_redirection_url
custom_id
}
}
Query Parameters
Supports all global query parameters.
Request Body
A partial product object.
Returns
Returns the product object for the updated product.
Delete a Product
Delete an existing product.
- REST
- GraphQL
DELETE /items/product/:id
mutation {
delete_product_item(id: "product_id") {
id
}
}
Returns
Empty body.