UiPath Documentation
industry-department-solutions
latest
false
Supply Chain & Retail Solutions API guide
  • Overview
  • API Resources

Customer

customer API resource representing customer entities in the B2B pricing application, including categorization and pricing list assignments.

Overview

The customer resource represents customer entities in the B2B pricing application. This resource stores customer information including categorization and pricing list assignments.

→ For business context (purpose, usage notes, how this resource is used in the solution), see Customers dataset in the User Guide.

Resource Endpoint

/api/v2/ingest/object/{prefix}CUSTOMER{suffix}
/api/v2/ingest/object/{prefix}CUSTOMER{suffix}

Supported Methods

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

Request Headers

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

Properties

Primary Keys

  • customer_id (string) - Unique identifier for the customer
  • updated_at (datetime) - Timestamp of when the record was last updated

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.

AttributeData TypeRequiredNullableDescription
customer_idstringYesNoUnique identifier for each customer. Used to join customer metadata to quotations and sales for model training.
updated_atdatetimeYesYesTimestamp when the record was updated. Used to identify the most up-to-date data in the UI and to match customer metadata to the date of each quote in model training.
customer_namestringYesNoCustomer name. Used in the UI to identify customers.
customer_categorystringYesYesCustomer category. Used in model training as a feature to determine the optimal quote price.
customer_subcategorystringYesYesCustomer sub-category. Used in model training as a feature to determine the optimal quote price.
customer_price_list_idstringYesYesReference to the price list assigned to this customer.
sourceenumYesYesSource of creation of the customer entry. Enum values: peak (created by Peak application) or customer (customer-provided data).

Relationships

Outbound References

This resource has relationships to:

  • quote_line - Customers can be associated with multiple quote lines
  • sale - Customers can have multiple sales records

Inbound References

None

JSON Representation

{
  "solutionName": "QP_OOTB",
  "data": [
    {
      "customer_id": "CUST-001",
      "updated_at": "2025-01-28T10:00:00Z",
      "customer_name": "Acme Corporation",
      "customer_category": "Enterprise",
      "customer_subcategory": "Technology",
      "customer_price_list_id": "PL-ENT-001",
      "source": "ERP"
    }
  ],
  "operationType": "UPSERT"
}
{
  "solutionName": "QP_OOTB",
  "data": [
    {
      "customer_id": "CUST-001",
      "updated_at": "2025-01-28T10:00:00Z",
      "customer_name": "Acme Corporation",
      "customer_category": "Enterprise",
      "customer_subcategory": "Technology",
      "customer_price_list_id": "PL-ENT-001",
      "source": "ERP"
    }
  ],
  "operationType": "UPSERT"
}

Example Request

curl -X POST \
  'https://ingestion.peak.ai/api/v2/objects/QP_CUSTOMER_OOTB' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "solutionName": "QP_OOTB",
    "data": [
      {
        "customer_id": "CUST-001",
        "updated_at": "2025-01-28T10:00:00Z",
        "customer_name": "Acme Corporation",
        "customer_category": "Enterprise",
        "customer_subcategory": "Technology",
        "customer_price_list_id": "PL-ENT-001",
        "source": "ERP"
      }
    ],
    "operationType": "UPSERT"
  }'
curl -X POST \
  'https://ingestion.peak.ai/api/v2/objects/QP_CUSTOMER_OOTB' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "solutionName": "QP_OOTB",
    "data": [
      {
        "customer_id": "CUST-001",
        "updated_at": "2025-01-28T10:00:00Z",
        "customer_name": "Acme Corporation",
        "customer_category": "Enterprise",
        "customer_subcategory": "Technology",
        "customer_price_list_id": "PL-ENT-001",
        "source": "ERP"
      }
    ],
    "operationType": "UPSERT"
  }'

Important Notes

  • Custom Attributes: Additional custom attributes can be added using the /CUSTOMER/add-attribute endpoint
  • Data Validation: All attributes are validated according to their defined data types
  • merchant - Related business entities
  • quote_line - Quote line items referencing customers
  • sale - Sales records associated with customers

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated