Sitecore CDP Order REST API (v2.1)

Use the Order REST API to create, retrieve, update, and delete order data in Sitecore CDP.

This REST API lets you interact with the following objects:

  • Order - the parent for all other objects, containing attributes common to the entire order.
  • Order item - something that has been purchased as part of the order.
  • Order contact - the primary contact person for an order.
  • Order consumer - the person that consumes the order item.
  • Order data extension - any key-value pairs you want to add to the order object.
  • Order item data extension - any key-value pairs you want to add to the order item object.

Note the following:

  • To use this REST API, you must authenticate your API requests.
  • All API requests are made in your production environment.
  • This reference documentation describes Sitecore CDP functionality for data model 2.1.

For more information, see the official Sitecore CDP developer documentation, including examples of order items and order item data extensions.

Authentication

The Order REST API uses basic authentication. Basic authentication involves sending a user name and a password with every request. To find your user name and password, in Sitecore CDP, on the navigation pane, click Settings > API access:

  • The user name is the Client key.
  • The password is the API token.

You must include the user name and password in every request you make. For example:

curl -X GET '{baseURL}/v2.1/orders' \ 
-u '{YOUR_USERNAME}:{YOUR_PASSWORD}' \ 
-H 'Accept: application/json' 

Get started

To create your first order and find it in Sitecore CDP:

  1. Create an order. The response contains the order reference.
  2. Create an order contact using the order reference. Make sure to provide enough identity information according to your organization's identity rules. This associates a guest with the order. In the response, in guest.href, the guest reference is the string that follows the final slash.
  3. Copy the guest reference.
  4. In Sitecore CDP, click Guests. In the Search field, enter the guest reference, then click the Guest type: All filter. Then, Sitecore CDP lists the guest profile for the guest.
  5. On the Guest Profile page, click the Orders tab. The order you previously created displays.
Download OpenAPI description
Overview
License Apache 2.0
Languages
Servers
Production server AP
https://api-engage-ap.sitecorecloud.io/
Production server EU
https://api-engage-eu.sitecorecloud.io/
Production server JP
https://api-engage-jpe.sitecorecloud.io/
Production server US
https://api-engage-us.sitecorecloud.io/

Order

An order object is the parent for all other objects and contains attributes that are common to the entire order. The Order REST API matches orders that have the same referenceId values and have orderedAt values (purchase dates) within two days of another.

Operations

Order item

The order item object represents something that has been purchased as part of the order. For an airline reservation, an order item is typically one or more flight segments, or an ancillary item purchased in addition to the flight, such as excess baggage allowance or priority boarding.

Operations

Order contact

An order contact is a person who is the primary contact for an order. The same guest can be both the order contact and order consumer.

Operations

Order consumer

An order consumer represents a person who is consuming an order item. If the order item is a flight, the order consumer is the traveler or passenger of the flight segment. If more than one order consumer is consuming the same order item, the order item has a quantity representing the number of order consumers.

The same guest can be both the order contact and order consumer.

Operations

Order data extension

An order data extension is an object that lets you specify any key-value pairs you want. Order data extensions are optional and enable your organization to capture more robust information about your orders.

To get started with this API, create a data extension for the order you previously created.

Operations

Order item data extension

An order item data extension is an object that lets you specify any key-value pairs you want. Order data extensions are optional and enable your organization to capture more robust information about your order items.

To get started with this API, create a data extension for the order items you previously created.

Operations