Skip to main content

Sitecore CDP order item data model for REST API

Abstract

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

The orderItems object represents something which 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.

The following table describes the order item attributes:

Attribute

Description

Type

Example(s)

type

The type of order item.

string (uppercase with underscore if more than one word)

"FLIGHT", "HOTEL", "CAR", “BAG”, “INSURANCE”, “CAR_SEAT”, “MEAL”, “FEE”, “LOUNGE_ACCESS”, “HOTEL_WIFI”, “HOTEL_BREAKFAST”, “SEAT_UPGRADE”, “TAXI”, “PARKING”, “SEAT”, “UPGRADE”, “TRANSPORT”, “OTHER”, “INFLIGHT_ENTERTAINMENT“, “ACTIVITY“, “CARBON_OFFSET“, “PAID_SUBSCRIPTION“, “COMFORT_PACK“, “INFLIGHT_VOUCHER“, “PACKAGE“, “SMS_ITINERARY“, “SPECIAL_ASSISTANCE“, “CHARITY_DONATION“, “TRANSFER“*Deprecated:"BAGGAGE", "FEES", "SEAT_UPGRADES", "INFLIGHT_VOUCHERS"

productId

The ID of the product.

string

"DUB-LAS"

quantity

The number or quantity of the order item.

number

2

orderedAt

The date and time the order item was made.

ISO 8601 Date/Time UTC

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

price

The organization’s price for the order item.

number (currency)

50, 30.6, -45

currencyCode

The organization’s currency code for the order item.

3 letter ISO 4217

"EUR", "NZD", "USD"

originalPrice

The unit price of the order item before conversion to the organization's currency.

number (currency)

50

originalCurrencyCode

The original currency code for the order item.

3 letter ISO 4217

"EUR", "NZD", "USD"

referenceId

An ID generated by the client to reference the order item.

string

"B94TXY-1"

vendor

The organization that is selling the order item.

string (title case recommended)

"Company ABC"

status

The status of the order item.

string (uppercase)

“RESERVED”, “PENDING”, “DECLINED”, “CONFIRMED", “CANCELLED”, “REFUNDED”, “PURCHASED”, “UNKNOWN”

channel

The channel used in the order.

string (uppercase)

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

language

The language used when making the order.

2 letter ISO 639 language code (uppercase)

"EN", "FR", "DE"

name

The name of the order item. A free text value for the name of the order item. Max limit: 128

string (title case recommended)

"Insurance"

description

A description of the order items.

string (title case recommended)

"Family Insurance"

flightSegments

A list of flight segments associated with the order item. Only applicable for flight orders.

JSON array of JSON objects

N/A

Flight segment attributes:

Attribute

Description

Type

Example(s)

Required/optional

id

An ID to identify the flight segment.

string

"1234"

Required

origin

The IATA airport or city origin code of the flight segment.

IATA airport or city code (uppercase)

"DUB", "LHR", "BCN"

Required

destination

The IATA airport or city destination code of the flight segment.

IATA airport or city code (uppercase)

"DUB", "LHR", "BCN"

Required

departureDateTime

The local departure date and time of the flight segment. You must pass this value in as the local departure date/time and include the Z at the end, even though it is not UTC time.

ISO 8601 date/time

"2016-08-23T16:17Z"

Required

arrivalDateTime

The local arrival date and time of the flight segment. You must pass this value in as the local departure date/time and include the Z at the end, even though it is not UTC time.

ISO 8601 date/time

"2016-08-23T16:17Z"

Required

flightNumber

The marketing flight number for the flight segment.

string

"12345"

Required

fareClass

The fare class of the flight segment.

string (title case recommended)

"Economy", "Business", "First Class"

Required

fareFamily

The fare family of the flight segment.

string (title case recommended)

"Economy Plus"

Optional

bookingClass

The booking class of the flight segment.

string (uppercase)

"Y7 K5 M4 T6 E3"

Optional

equipmentType

The equipment type of the flight segment.

string (uppercase)

"BOEING 777"

Optional

carrier

The marketing carrier code for the flight segment.

IATA airline code (uppercase)

"EI", "FR", "BA"

Required

originDestination

The origin and destination of the flight segment.

string (uppercase)

"DUB-JFK"

Optional

operatingCarrier

The operating carrier code for the flight segment.

IATA airline code (uppercase)

"EI", "FR", "BA"

Optional

operatingFlightNumber

The operating carrier flight number for the flight segment.

string

"5678"

Optional

{
    "href": "https://{apiEndpoint}/v2/orderItems/FECBB7ED-6DFE-4E8C-85A9-B894B17EF4F3",
    "ref": "FECBB7ED-6DFE-4E8C-85A9-B894B17EF4F3",
    "createdAt": "2014-08-15T16:00:55.554Z",
    "modifiedAt": "2014-08-21T16:00:51.882Z",
    "type": "FLIGHT",
    "productId": "DUB-LAS",
    "quantity": 1,
    "price": 100.00,
    "currencyCode": "EUR",
    "originalPrice": 112.00,
    "originalCurrencyCode": "USD",
    "referenceId": "B94TXY",
    "status": "PURCHASED",
    "passengerTypeCode": "ADT",
    "flightSegments": [{
        "id": "1234",
        "origin": "DUB",
        "destination": "LHR",
        "originDestination": "DUB-LAS",
        "departureDateTime": "2016-08-15T16:00:00.000Z",
        "arrivalDateTime": "2016-08-15T19:30:00.000Z",
        "fareClass": "Economy",
        "fareFamily": "Plus",
        "bookingClass": "Y",
        "carrier": "BX",
        "flightNumber": "459",
        "operatingCarrier": "BX",
        "operatingFlightNumber": "1459" 
    },
    {
        "id": "1235",
        "origin": "LHR",
        "destination": "LAS",
        "originDestination": "DUB-LAS",
        "departureDateTime": "2016-08-15T16:00:00.000Z",
        "arrivalDateTime": "2016-08-15T19:30:00.000Z",
        "fareClass": "Economy",
        "fareFamily": "Plus",
        "bookingClass": "Y",
        "carrier": "BX",
        "flightNumber": "460",
        "operatingCarrier": "BX",
        "operatingFlightNumber": "1460"
    }],
    "order" : {
        "href": "https://{apiEndpoint}/v2/orders/056621C2-C955-492D-B7EE-C77C6BDDFDEE"
    }
}