Using the retrieve order contact function in Sitecore CDP REST API

Abstract

Provides a cURL command to retrieve the order contact in Sitecore CDP REST API (Data model 2.0).

You can use the Order Contact REST API to perform the retrieve order contact function to retrieve the primary contact on an order. To do this, you need the orderContactRef which you can get when you locate the order contact.

To retrieve an order contact in the Sitecore CDP, use the following:

GET: https://apiEndpoint/v2/orderContacts/orderContactRef

Attribute

Description

Type

orderContactRef

The reference of the contact on the order.

string

$ curl -H "Accept: application/json" \
        "http://{apiEndpoint}/v2/orderContacts/F8D1F0D5-365D-46B7-BECF-D041E93A5705

The following is a 200 response:

{
  "href": "https://{apiEndpoint}/v2/orderContacts/F8D1F0D5-365D-46B7-BECF-D041E93A5705",
  "ref": "F8D1F0D5-365D-46B7-BECF-D041E93A5705",
  "createdAt": "2014-08-15T16:00:55.554Z",
  "modifiedAt": "2014-08-21T16:00:51.882Z",
  "title": "Mr",
  "firstName": "Jack",
  "lastName": "Smith",
  "gender": "male",
  "dateOfBirth": "1976-10-28T00:00:00.000Z",
  "emails": [
      "jack.smith@boxever.com"
  ],
  "phoneNumbers": [
      "+353161123345",
      "+353861123345"
  ],
  "nationality": "Irish",
  "passportNumber": "PZ4A9565",
  "guest": {
    "href": "https://{apiEndpoint}/v2/guests/9d94ee11-7043-4b71-980c-a777d00a7b46"
  },
  "order": {
    "href": "https://{apiEndpoint}/v2/orders/056621C2-C955-492D-B7EE-C77C6BDDFDEE"
  }
}