Sitecore CDP order consumer data model for REST API

Abstract

Provides attribute definitions for using the Sitecore CDP order consumers data model for REST API (Data model 2.0).

An order consumer is the guest 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, it then has a quantity representing the number of order consumers.

The following table describes the order consumer attributes:

Attribute

Description

Type

Example(s)

title

The title of the order consumer.

string (title case)

"Br", "Brigadier", "Capt", "Colonel", "Dame", "Dr", "Elder", "Fr", "General", "Hon", "Judge", "Lord", "Master", "Miss", "Mr", "Mrs", "Ms", "Mstr", "Prof", "Rabbi", "Rev", "Shaikha", "Sheikh", "Sir", "Sister", "Sr"

firstName

The first name of the order consumer.

string (title case recommended)

"John"

lastName

The last name of the order consumer.

string (title case recommended)

"Doe"

gender

The gender of the order consumer.

string (lowercase)

“male”, “female”, “unknown”

dateOfBirth

The date of birth of the order consumer.

ISO 8601 Date UTC

"1985-12-24T00:00Z"

emails

The email address of the order consumer.

array of strings (lowercase recommended)

"["john.doe@gmail.com", "johnny.doe@hotmail.com"]"

phoneNumbers

The phone number of the order consumer.

A JSON array of strings.

N/A

nationality

The nationality of the order consumer.

string (title case recommended)

"Irish", "British", "Spanish", "French"

country

The country where the order consumer is currently living.

2 letter ISO 3166-1 Alpha-2 country code (uppercase)

"IE", "GB", "ES", "FR"

passportNumber

The passport number for the order consumer.

string

"PZ4A9565"

passportExpiry

The expiry date for the order consumer's passport.

ISO 8601 Date UTC

"2019-01-01T00:00:00.000Z"

identifiers

The list of identifiers for the guest.

A JSON array of JSON objects.

N/A

guest

The guest resource linked to this resource.

object

N/A

orderItems

A list of one or more order items that are associated with this order consumer.

A JSON array of JSON objects

N/A

order

The reference ID for the order.

string

“B94TXY-1”

The following are identifier model attributes:

Attribute

Description

Type

Example(s)

provider

The identifier provider.

string

"ProfileSystem"

id

The identifier ID.

string

"B7524AE6-CF1C-440F-B1A2-0C9D42F5CB41"

expiryDate

The expiry date of the identifier.

ISO 8601 Date/Time UTC

"2015-01-01T16:17:16.000Z"

The following are the standard response attributes:

Attribute

Description

Type

Example(s)

href

The resource fully qualified location Uniform Resource Identifier (URI).

string

"https://{apiEndpoint}/v2/{resourceName}/{resourceRef}"

ref

The reference of the resource.

string UUID

"9d94ee11-7043-4b71-980c-a777d00a7b46"

createdAt

Date and time when the resource was created in Sitecore CDP.

ISO 8601 Date/Time UTC

"2015-01-01T16:17:16.000Z"

modifiedAt

Date and time when the resource was updated in Sitecore CDP.

ISO 8601 Date/Time UTC

"2015-01-01T16:17:16.000Z"

The following is a JSON example of using the order consumer data model.

{
    "href": "http://{apiEndpoint}/v2/orderConsumers/C439E8B9-53F3-48BB-BD98-EE3657416FBE",
    "ref": "C439E8B9-53F3-48BB-BD98-EE3657416FBE",
    "createdAt": "2014-08-15T16:00:55.554Z",
    "modifiedAt": "2014-08-21T16:00:51.882Z",
    "title": "Mr",
    "firstName": "Tom",
    "lastName": "Smith",
    "gender": "male",
    "guest": {
        "href": "http://{apiEndpoint}/v2/guests/567A697E-4E79-4F2C-96D1-A7249A44744F"
    },
    "orderItems": {
        "items": [{
                "href": "http://{apiEndpoint}/v2/orderItems/FECBB7ED-6DFE-4E8C-85A9-B894B17EF4F3"
            }]
    },
    "order": {
       "href": "http://{apiEndpoint}/v2/orders/056621C2-C955-492D-B7EE-C77C6BDDFDEE"
    }
}