Using the locate order item function in Sitecore CDP REST API

Abstract

Provides a cURL command to locate an order item in Sitecore CDP REST API (Data model 2.0).

You can use the Order REST API to perform a locate order item function to locate an order item. The response returns the referenceId of the Order Item(s) which you can use when you retrieve an order item.

To locate an order item in the Sitecore CDP, use the following:

GET: https://apiEndpoint/v2/orders/orderRef/orderItems

Attribute

Description

Type

orderRef

The reference of the order.

string

$ curl -H "Accept: application/json" \
        "https://{apiEndpoint}/v2/orders/056621C2-C955-492D-B7EE-C77C6BDDFDEE/orderItems"

The following is a 200 response:

{
    "href": "https://{apiEndpoint}/v2/orders/056621C2-C955-492D-B7EE-C77C6BDDFDEE/orderItems",
    "offset": 0,
    "limit": 10,
    "items": [{
        "href": "https://{apiEndpoint}/v2/orderItems/FECBB7ED-6DFE-4E8C-85A9-B894B17EF4F3"
    }]
}