industry-department-solutions
latest
false
- Overview
- API Resources
Supply Chain & Retail Solutions API guide
Overview
The tax resource represents tax rates for products at specific locations. This resource stores Value Added Tax (VAT) or other tax information applicable to product-location combinations.
Resource Endpoint
/api/v2/ingest/object/{prefix}TAX{suffix}
/api/v2/ingest/object/{prefix}TAX{suffix}
Supported Methods
| Method | Return Type | Description |
|---|---|---|
| POST | Response | Ingest (create/update) tax records via UPSERT operation |
Request Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Your Personal Access Token (PAT) from platform.peak.ai |
Content-Type | Yes | Must be application/json |
Properties
Primary Keys
- product_id (string) - Foreign key reference to products
- location_id (string) - Foreign key reference to locations
- created_at (timestamp) - Timestamp when the tax record was created — included in the PK so successive tax updates for the same product/location pair are distinct rows
Attributes
About Required + Nullable: every attribute key must appear in each payload (Required: Yes). Nullable: Yes means the value can be null when you don't have data; Nullable: No means a non-null value is required. See Schema definition structure for the underlying rules.
| Attribute | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
product_id | string | Yes | No | Product identifier (Primary Key, Foreign Key) |
location_id | string | Yes | No | Location identifier (Primary Key, Foreign Key) |
created_at | timestamp | Yes | No | Timestamp when the record was created (Primary Key) |
vat | float | Yes | Yes | VAT or tax rate (typically as a decimal, e.g., 0.20 for 20%) |
updated_at | timestamp | Yes | Yes | Timestamp when the record was last updated |
Relationships
Outbound References
None
Inbound References
- location - Foreign key
location_idreferences location - product - Foreign key
product_idreferences product
JSON Representation
{
"solutionName": "QP_OOTB",
"data": [
{
"location_id": "LOC-UK-001",
"product_id": "PROD-001",
"created_at": "2025-01-10T08:00:00Z",
"vat": 0.20,
"updated_at": "2025-01-28T10:00:00Z"
}
],
"operationType": "UPSERT"
}
{
"solutionName": "QP_OOTB",
"data": [
{
"location_id": "LOC-UK-001",
"product_id": "PROD-001",
"created_at": "2025-01-10T08:00:00Z",
"vat": 0.20,
"updated_at": "2025-01-28T10:00:00Z"
}
],
"operationType": "UPSERT"
}
Example Request
curl -X POST \
'https://ingestion.peak.ai/api/v2/objects/QP_TAX_OOTB' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"solutionName": "QP_OOTB",
"data": [
{
"location_id": "LOC-UK-001",
"product_id": "PROD-001",
"created_at": "2025-01-10T08:00:00Z",
"vat": 0.20,
"updated_at": "2025-01-28T10:00:00Z"
}
],
"operationType": "UPSERT"
}'
curl -X POST \
'https://ingestion.peak.ai/api/v2/objects/QP_TAX_OOTB' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"solutionName": "QP_OOTB",
"data": [
{
"location_id": "LOC-UK-001",
"product_id": "PROD-001",
"created_at": "2025-01-10T08:00:00Z",
"vat": 0.20,
"updated_at": "2025-01-28T10:00:00Z"
}
],
"operationType": "UPSERT"
}'
Important Notes
- Foreign Key Dependencies: Requires valid
product_idandlocation_idto exist in their respective tables - Tax Rate Format: VAT is typically stored as a decimal (e.g., 0.20 represents 20% tax)
- Location-Specific: Tax rates can vary by location due to different jurisdictions
- Product-Specific: Some products may have different tax rates (e.g., reduced rates for essentials)
- Pricing Calculations: Used to calculate final prices including tax
- Custom Attributes: Additional custom attributes can be added using the
/TAX/add-attributeendpoint - Data Validation: All attributes are validated according to their defined data types
Related Resources
- product - Product information
- location - Location details
- product_pricing_daily - Pricing data used with tax rates
- sale - Sales transactions with applied tax