Skip to main content

Sitecore CDP order data model for REST API

Abstract

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

An order object is the parent object for all other objects and contains attributes that are common to the entire order.

For airlines, an order is a one-to-one mapping to a reservation. The Order REST API matches orders that have the same referenceId values, for example, the Passenger Number Record (PNR), and have orderedAt values (purchase dates) within two days of another.

The following table describes the attributes for an order object:

Attribute

Description

Type

Example(s)

referenceId

A unique ID generated by your organization to reference the order. For flight orders, this is often the PNR.

string

"B94TXY-1"

channel

The channel used in the order.

string

"AIRPORT_KIOSK", "BRANCH", "CALL_CENTER", "GDS", "KIOSK", "MOBILE_APP", "MOBILE_WEB", "OFFLINE", "OTA", "OTHER", "WEB"

pointOfSale

The point of sale used in the order.

string (predefined by the client)

"spinflight.com", "spinair.com"

status

The status of the order.

string (uppercase)

“RESERVED”, “PAYMENT_PENDING”, “DECLINED”, “PURCHASED”, “PENDING”, “CONFIRMED”, “PARTIALY_CONFIRMED”, “CANCELLED”, “REFUNDED”, “PARTIALY_REFUNDED”, “UNKNOWN”

orderedAt

The date and time the order was made.

ISO 8601 Date/Time UTC

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

currencyCode

The currency the guest used to complete a purchase. Set this to the organization’s default currency.

3 letter ISO 4217

"EUR", "NZD","USD"

price

The amount paid for the order.

number (currency)

50, 30.6

paymentType

The method of payment for the order.

string (title case recommended)

“Card”, “Paypal”, “Voucher”, “ATM”, “Cash”, “Other”

cardType

The card type used to pay for the order.

string (title case recommended)

“Mastercard”, “Visa”, “Diners”, “American Express”

contact

The contact associated with the order.

JSON object

N/A

consumers

A list of consumers associated with the order.

JSON array of JSON objects

N/A

orderItems

A list of one or more items in the order.

JSON array of JSON objects

N/A

The following is a JSON example of an order:

{
    "orderedAt": "2014-08-15T16:00:55.554Z",
    "price": 100.00,
    "currencyCode": "EUR",
    "referenceId": "B94TXY",
    "paymentType": "Card",
    "cardType": "Visa",
    "pointOfSale": "default",
    "channel": "WEB",
    "status": "PURCHASED"
}

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"