UiPath Documentation
industry-department-solutions
latest
false
  • Overview
    • Introduction
    • Getting Started
    • API Guide
    • Customizations
    • Data Onboarding Checklist
  • API Resources
UiPath logo, featuring letters U and I in white

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

MethodReturn TypeDescription
POSTResponseIngest (create/update) sales records via UPSERT operation

Request Headers

HeaderRequiredDescription
AuthorizationYesYour Personal Access Token (PAT) from platform.peak.ai
Content-TypeYesMust be application/json

Properties

Primary Keys

  • sale_id (string) - Unique identifier for the sale
  • product_id (string) - Foreign key reference to products

Attributes

AttributeData TypeRequiredDescription
sale_idstringYesUnique identifier for each sale. Used to identify each unique sale.
product_idstringYesUnique identifier for each product. Used to join product metadata to the table and to understand which products were sold.
customer_idstringNoUnique identifier for each customer. Used to join customer metadata to the table.
merchant_idstringNoUnique identifier for each merchant. Used to join merchant metadata to the table.
quote_idstringNoUnique identifier for each quote. Used to identify which quotations have converted into sales.
sold_atdatetimeNoTimestamp of sale. Used in model training to understand seasonal effects on the optimal quote price.
quantityintegerNoQuantity of the product sold. Used to understand how much of a product was sold for KPI calculations and model training.
selling_pricefloatNoSelling 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_id references product
  • customer - Foreign key customer_id references customer
  • merchant - Foreign key merchant_id references merchant
  • quote_line - Foreign key quote_id references 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_id field 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-attribute endpoint
  • Data Validation: All attributes are validated according to their defined data types

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated