industry-department-solutions
latest
false
- Overview
- API Resources
Supply Chain & Retail Solutions API guide
Overview
The currency_conversion resource stores exchange rates between currency pairs. The Merchandising solution uses these rates to normalise prices, sales values, and stock values to a common reporting currency when a tenant operates across multiple regions.
Resource Endpoint
/api/v2/ingest/object/{prefix}CURRENCY_CONVERSION{suffix}
/api/v2/ingest/object/{prefix}CURRENCY_CONVERSION{suffix}
Supported Methods
| Method | Return Type | Description |
|---|---|---|
| POST | Response | Ingest (create/update) currency-conversion 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
- from_currency (string) - ISO currency code being converted from
- to_currency (string) - ISO currency code being converted to
- created_at (timestamp) - Timestamp when the rate record was created — part of the PK so successive rate updates for the same 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 |
|---|---|---|---|---|
from_currency | string | Yes | No | ISO currency code the exchange rate is converting from (e.g., USD). Primary Key. |
to_currency | string | Yes | No | ISO currency code the exchange rate is converting to (e.g., GBP). Primary Key. |
exchange_rate | float | Yes | No | Exchange rate to apply — 1 from_currency = exchange_rate to_currency. |
updated_at | timestamp | Yes | Yes | Timestamp when the record was last updated. |
created_at | timestamp | Yes | No | Timestamp when the rate was recorded (Primary Key). |
Relationships
Outbound References
None
Inbound References
None
JSON Representation
{
"solutionName": "QP_OOTB",
"data": [
{
"from_currency": "USD",
"to_currency": "GBP",
"exchange_rate": 0.79,
"updated_at": "2025-01-28T10:00:00Z",
"created_at": "2025-01-28T10:00:00Z"
}
],
"operationType": "UPSERT"
}
{
"solutionName": "QP_OOTB",
"data": [
{
"from_currency": "USD",
"to_currency": "GBP",
"exchange_rate": 0.79,
"updated_at": "2025-01-28T10:00:00Z",
"created_at": "2025-01-28T10:00:00Z"
}
],
"operationType": "UPSERT"
}
Example Request
curl -X POST \
'https://ingestion.peak.ai/api/v2/objects/QP_CURRENCY_CONVERSION_OOTB' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"solutionName": "QP_OOTB",
"data": [
{
"from_currency": "USD",
"to_currency": "GBP",
"exchange_rate": 0.79,
"updated_at": "2025-01-28T10:00:00Z",
"created_at": "2025-01-28T10:00:00Z"
}
],
"operationType": "UPSERT"
}'
curl -X POST \
'https://ingestion.peak.ai/api/v2/objects/QP_CURRENCY_CONVERSION_OOTB' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"solutionName": "QP_OOTB",
"data": [
{
"from_currency": "USD",
"to_currency": "GBP",
"exchange_rate": 0.79,
"updated_at": "2025-01-28T10:00:00Z",
"created_at": "2025-01-28T10:00:00Z"
}
],
"operationType": "UPSERT"
}'
Important Notes
- Direction matters: a rate is one-way —
USD → GBPandGBP → USDare separate rows. Send both directions if your downstream needs to convert both ways. - Historical rates:
created_atis part of the primary key so you can ingest a new rate for the same pair at any time without overwriting the old rate; downstream picks the latest bycreated_at. - Currency codes: use 3-letter ISO 4217 codes (e.g.,
USD,GBP,EUR) for bothfrom_currencyandto_currency. The same code should be used in the location resource'scurrencyfield. - Custom Attributes: Additional custom attributes can be added using the
/CURRENCY_CONVERSION/add-attributeendpoint. - Data Validation: All attributes are validated according to their defined data types.
Related Resources
- location - Location's currency comes from this code set
- sale - Sales values that may need conversion to a common reporting currency
- product_pricing_daily - Prices that may need conversion to a common reporting currency