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

Purchase Order

purchase_order API resource representing purchase orders per product-location combination, tracking order details, delivery status, and fulfillment.

Overview​

The purchase_order resource represents purchase orders for products at specific locations. This resource tracks order details, delivery status, and fulfillment information.

Resource Endpoint​

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

Supported Methods​

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

Request Headers​

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

Properties​

Primary Keys​

  • order_number (string) - Unique order identifier
  • product_id (string) - Foreign key reference to products

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
order_numberstringYesNoUnique order number (Primary Key)
product_idstringYesNoProduct identifier (Primary Key, Foreign Key)
location_idstringYesNoLocation identifier (Foreign Key)
order_due_date_attimestampYesNoWhen the order is due to be delivered
ordered_attimestampYesNoWhen the order was placed
ordered_unitsintegerYesNoNumber of units ordered
purchase_order_idstringYesYesAlternative purchase order identifier
statusstringYesYesCurrent status of the order
delivered_unitsintegerYesYesNumber of units delivered
receipted_unitsintegerYesYesNumber of units receipted/confirmed
receipt_datedateYesYesDate when goods were receipted
actual_departure_attimestampYesYesActual departure timestamp
expected_departure_attimestampYesYesExpected departure timestamp
created_attimestampYesYesTimestamp when the record was created
updated_attimestampYesYesTimestamp when the record was last updated

Relationships​

Outbound References​

None

Inbound References​

  • product - Foreign key product_id references product
  • location - Foreign key location_id references location

JSON Representation​

{
  "solutionName": "MP_OOTB",
  "data": [
    {
      "order_number": "PO-2025-001",
      "product_id": "PROD-001",
      "location_id": "LOC-UK-001",
      "order_due_date_at": "2025-02-15T00:00:00Z",
      "ordered_at": "2025-01-20T10:30:00Z",
      "ordered_units": 500,
      "purchase_order_id": "PO-2025-001",
      "status": "In Transit",
      "delivered_units": 0,
      "receipted_units": 0,
      "receipt_date": null,
      "actual_departure_at": "2025-01-22T08:00:00Z",
      "expected_departure_at": "2025-01-21T08:00:00Z",
      "created_at": "2025-01-20T10:30:00Z",
      "updated_at": "2025-01-28T10:00:00Z"
    }
  ],
  "operationType": "UPSERT"
}
{
  "solutionName": "MP_OOTB",
  "data": [
    {
      "order_number": "PO-2025-001",
      "product_id": "PROD-001",
      "location_id": "LOC-UK-001",
      "order_due_date_at": "2025-02-15T00:00:00Z",
      "ordered_at": "2025-01-20T10:30:00Z",
      "ordered_units": 500,
      "purchase_order_id": "PO-2025-001",
      "status": "In Transit",
      "delivered_units": 0,
      "receipted_units": 0,
      "receipt_date": null,
      "actual_departure_at": "2025-01-22T08:00:00Z",
      "expected_departure_at": "2025-01-21T08:00:00Z",
      "created_at": "2025-01-20T10:30:00Z",
      "updated_at": "2025-01-28T10:00:00Z"
    }
  ],
  "operationType": "UPSERT"
}

Example Request​

curl -X POST \
  'https://ingestion.peak.ai/api/v2/objects/MP_PURCHASE_ORDER_OOTB' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "solutionName": "MP_OOTB",
    "data": [
      {
        "order_number": "PO-2025-001",
        "product_id": "PROD-001",
        "location_id": "LOC-UK-001",
        "order_due_date_at": "2025-02-15T00:00:00Z",
        "ordered_at": "2025-01-20T10:30:00Z",
        "ordered_units": 500,
        "purchase_order_id": "PO-2025-001",
        "status": "In Transit",
        "delivered_units": 0,
        "receipted_units": 0,
        "receipt_date": null,
        "actual_departure_at": "2025-01-22T08:00:00Z",
        "expected_departure_at": "2025-01-21T08:00:00Z",
        "created_at": "2025-01-20T10:30:00Z",
        "updated_at": "2025-01-28T10:00:00Z"
      }
    ],
    "operationType": "UPSERT"
  }'
curl -X POST \
  'https://ingestion.peak.ai/api/v2/objects/MP_PURCHASE_ORDER_OOTB' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "solutionName": "MP_OOTB",
    "data": [
      {
        "order_number": "PO-2025-001",
        "product_id": "PROD-001",
        "location_id": "LOC-UK-001",
        "order_due_date_at": "2025-02-15T00:00:00Z",
        "ordered_at": "2025-01-20T10:30:00Z",
        "ordered_units": 500,
        "purchase_order_id": "PO-2025-001",
        "status": "In Transit",
        "delivered_units": 0,
        "receipted_units": 0,
        "receipt_date": null,
        "actual_departure_at": "2025-01-22T08:00:00Z",
        "expected_departure_at": "2025-01-21T08:00:00Z",
        "created_at": "2025-01-20T10:30:00Z",
        "updated_at": "2025-01-28T10:00:00Z"
      }
    ],
    "operationType": "UPSERT"
  }'

Important Notes​

  • Foreign Key Dependencies: Can reference products and locations
  • Order Tracking: Tracks the full lifecycle from order placement to receipt
  • Fulfillment Status: Monitor ordered vs delivered vs receipted units
  • Departure Tracking: Captures both expected and actual departure times
  • Custom Attributes: Additional custom attributes can be added using the /PURCHASE_ORDER/add-attribute endpoint
  • Data Validation: All attributes are validated according to their defined data types
  • product - Product information
  • location - Delivery location
  • stock - Stock levels affected by purchase orders

Was this page helpful?

Connect

Need help? Support(opens in new window)

Want to learn? UiPath Academy(opens in new window)

Have questions? UiPath Forum(opens in new window)

Stay updated