industry-department-solutions
latest
false
Supply Chain & Retail Solutions API guide
- Overview
- API Resources
location API resource representing physical locations in the B2C pricing application, with geographic details and hierarchical relationships.
Overview
The location resource represents physical locations in the B2C pricing application. This resource stores location information including geographic details and hierarchies.
Resource Endpoint
/api/v2/ingest/object/{prefix}LOCATION{suffix}
/api/v2/ingest/object/{prefix}LOCATION{suffix}
Supported Methods
| Method | Return Type | Description |
|---|---|---|
| POST | Response | Ingest (create/update) location 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
- location_id (string) - Unique identifier for the location
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 |
|---|---|---|---|---|
location_id | string | Yes | No | Unique location identifier (Primary Key) |
country | string | Yes | No | Country where the location is situated |
currency | string | Yes | Yes | ISO currency code used at this location (e.g. GBP, USD, EUR) |
name | string | Yes | Yes | Display name of the location |
region | string | Yes | Yes | Regional classification or zone |
created_at | timestamp | Yes | Yes | Timestamp when the record was created |
updated_at | timestamp | Yes | Yes | Timestamp when the record was last updated |
Relationships
Outbound References
This resource has relationships to:
- product_pricing_daily - Locations can have daily pricing data
- purchase_order - Locations can have purchase orders
- sale - Locations can have sales transactions
- stock - Locations can have stock levels
- tax - Locations can have tax rates
Inbound References
None
JSON Representation
{
"solutionName": "MP_OOTB",
"data": [
{
"location_id": "LOC-UK-001",
"country": "United Kingdom",
"currency": "GBP",
"name": "London Distribution Center",
"region": "South East",
"created_at": "2025-01-15T08:00:00Z",
"updated_at": "2025-01-15T08:00:00Z"
}
],
"operationType": "UPSERT"
}
{
"solutionName": "MP_OOTB",
"data": [
{
"location_id": "LOC-UK-001",
"country": "United Kingdom",
"currency": "GBP",
"name": "London Distribution Center",
"region": "South East",
"created_at": "2025-01-15T08:00:00Z",
"updated_at": "2025-01-15T08:00:00Z"
}
],
"operationType": "UPSERT"
}
Example Request
curl -X POST \
'https://ingestion.peak.ai/api/v2/objects/MP_LOCATION_OOTB' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"solutionName": "MP_OOTB",
"data": [
{
"location_id": "LOC-UK-001",
"country": "United Kingdom",
"currency": "GBP",
"name": "London Distribution Center",
"region": "South East",
"created_at": "2025-01-15T08:00:00Z",
"updated_at": "2025-01-15T08:00:00Z"
}
],
"operationType": "UPSERT"
}'
curl -X POST \
'https://ingestion.peak.ai/api/v2/objects/MP_LOCATION_OOTB' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"solutionName": "MP_OOTB",
"data": [
{
"location_id": "LOC-UK-001",
"country": "United Kingdom",
"currency": "GBP",
"name": "London Distribution Center",
"region": "South East",
"created_at": "2025-01-15T08:00:00Z",
"updated_at": "2025-01-15T08:00:00Z"
}
],
"operationType": "UPSERT"
}'
Important Notes
- Primary Key: This resource uses
location_idas the primary key - Geographic Hierarchy: Supports multi-level geographic organization (country, region)
- Central Entity: Location is referenced by many other B2C entities (pricing, sales, stock, tax)
- Custom Attributes: Additional custom attributes can be added using the
/LOCATION/add-attributeendpoint - Data Validation: All attributes are validated according to their defined data types
Related Resources
- product_pricing_daily - Daily pricing by location
- purchase_order - Purchase orders for locations
- sale - Sales transactions at locations
- stock - Stock levels by location
- tax - Tax rates by location