Using the locate orders function in Sitecore CDP REST API

Abstract

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

You can use the Guest REST API to perform the locate orders function to return the referenceId of the order(s). The response returns the referenceIds of the order(s) which you can then use when you retrieve an order.

To locate order(s) in Sitecore CDP, use the following:

GET: https://apiEndpoint/v2/orders?referenceId=referenceId

Attribute

Description

Type

referenceId

The ID of the order reference. For example, the Passenger Name Record (PNR).

string

$ curl -H "Accept: application/json" \
        "https://{apiEndpoint}/v2/orders?referenceId=B94TXY

The following is a 200 response:

{
    "href": "https://{apiEndpoint}/v2/orders?referenceId=B94TXY",
    "offset": 0,
    "limit": 10,
    "items": [{
        "href": "https://api.boxever.com/v2/orders/056621C2-C955-492D-B7EE-C77C6BDDFDEE"
    }]
}

You can use the reference.id in your search parameters.