industry-department-solutions
latest
false
- Overview
- API Resources

Supply Chain & Retail Solutions API guide
Last updated Apr 16, 2026
Sale
Overview
The sale resource represents completed sales transactions in the B2B pricing application. This resource stores actual sales data including products sold, quantities, and final selling prices.
Resource Endpoint
/api/v2/ingest/object/{prefix}SALE{suffix}
/api/v2/ingest/object/{prefix}SALE{suffix}
Supported Methods
| Method | Return Type | Description |
|---|---|---|
| POST | Response | Ingest (create/update) sales 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
- sale_id (string) - Unique identifier for the sale
- product_id (string) - Foreign key reference to products
Attributes
| Attribute | Data Type | Required | Description |
|---|---|---|---|
sale_id | string | Yes | Unique identifier for each sale. Used to identify each unique sale. |
product_id | string | Yes | Unique identifier for each product. Used to join product metadata to the table and to understand which products were sold. |
customer_id | string | No | Unique identifier for each customer. Used to join customer metadata to the table. |
merchant_id | string | No | Unique identifier for each merchant. Used to join merchant metadata to the table. |
quote_id | string | No | Unique identifier for each quote. Used to identify which quotations have converted into sales. |
sold_at | datetime | No | Timestamp of sale. Used in model training to understand seasonal effects on the optimal quote price. |
quantity | integer | No | Quantity of the product sold. Used to understand how much of a product was sold for KPI calculations and model training. |
selling_price | float | No | Selling price for the product. Used to determine what price the product was sold for and to calculate the discount applied. |
Relationships
Outbound References
None
Inbound References
- product - Foreign key
product_idreferences product - customer - Foreign key
customer_idreferences customer - merchant - Foreign key
merchant_idreferences merchant - quote_line - Foreign key
quote_idreferences quote_line
JSON Representation
{
"solutionName": "QP_OOTB",
"data": [
{
"sale_id": "SALE-2025-001",
"product_id": "PROD-001",
"customer_id": "CUST-001",
"merchant_id": "MERCH-001",
"quote_id": "Q-2025-001",
"sold_at": "2025-01-26T11:30:00Z",
"quantity": 100,
"selling_price": 189.99
}
],
"operationType": "UPSERT"
}
{
"solutionName": "QP_OOTB",
"data": [
{
"sale_id": "SALE-2025-001",
"product_id": "PROD-001",
"customer_id": "CUST-001",
"merchant_id": "MERCH-001",
"quote_id": "Q-2025-001",
"sold_at": "2025-01-26T11:30:00Z",
"quantity": 100,
"selling_price": 189.99
}
],
"operationType": "UPSERT"
}
Example Request
curl -X POST \
'https://service.peak.ai/ingestion-api/api/v2/ingest/object/QP_SALE_OOTB' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"solutionName": "QP_OOTB",
"data": [
{
"sale_id": "SALE-2025-001",
"product_id": "PROD-001",
"customer_id": "CUST-001",
"merchant_id": "MERCH-001",
"quote_id": "Q-2025-001",
"sold_at": "2025-01-26T11:30:00Z",
"quantity": 100,
"selling_price": 189.99
}
],
"operationType": "UPSERT"
}'
curl -X POST \
'https://service.peak.ai/ingestion-api/api/v2/ingest/object/QP_SALE_OOTB' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"solutionName": "QP_OOTB",
"data": [
{
"sale_id": "SALE-2025-001",
"product_id": "PROD-001",
"customer_id": "CUST-001",
"merchant_id": "MERCH-001",
"quote_id": "Q-2025-001",
"sold_at": "2025-01-26T11:30:00Z",
"quantity": 100,
"selling_price": 189.99
}
],
"operationType": "UPSERT"
}'
Important Notes
- Foreign Key Dependencies: Can reference products, customers, merchants, and quote lines
- Quote Traceability: The
quote_idfield links sales back to their originating quotes - Actual Pricing: Captures the final selling price which may differ from quoted or list prices
- Performance Analytics: Used for sales performance analysis and pricing effectiveness
- Custom Attributes: Additional custom attributes can be added using the
/SALE/add-attributeendpoint - Data Validation: All attributes are validated according to their defined data types
Related Resources
- product - Product information
- customer - Customer information
- merchant - Merchant information
- quote_line - Originating quotes
- list_price - Reference pricing for comparison
- product_cost - Cost data for margin analysis