Skip to main content
Users
CloudPortalLogin
  • Powered byPowered by
Developing with Sitecore CDP
Data privacy
Before you start sending data
Integrating with Sitecore CDP
Stream API
Batch API
REST APIs
Data lake export service
  • Sitecore CDP for developers
  • Batch API
  • Batch API Offline orders
  • Order item data model

Order item data model

When you create a batch file, ensure that you follow the formatting requirements and include attributes from the following table:

Attribute

Description

Type

Example(s)

Insert

Upsert

Migration

type

The type of order item. The accepted values must be predefined for your organization in the schema.

string (uppercase)

"FLIGHT"

Required

Not supported

Not supported

productId

The ID of the product code.

string

"DUB-LAS"

Required

Not supported

Not supported

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)

"flight"

Required

Not supported

Not supported

description

A description of the order items.

string (title case recommended)

"individualSegments"

Required

Not supported

Not supported

vendor

The organization that is selling the order item.

string (title case recommended)

"Company ABC"

Required

Not supported

Not supported

orderedAt

The date and time the order item was made.

ISO 8601 Date/Time UTC

"2025-03-07T16:15:11.000Z"

Optional

Not supported

Not supported

quantity

The number or quantity of the order item.

number

2

Optional

Not supported

Not supported

price

The organization’s price for the order item.

number (currency)

50, 30.6, -45

Required

Not supported

Not supported

currencyCode

The organization’s currency code for the order item.

3 letter ISO 4217

"EUR", "NZD", "USD"

Required

Not supported

Not supported

originalPrice

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

number (currency)

100

Optional

Not supported

Not supported

originalCurrencyCode

The original currency code for the order item.

3 letter ISO 4217

"EUR", "NZD", "USD"

Optional

Not supported

Not supported

referenceId

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

string

"B94TXY-1"

Required

Not supported

Not supported

status

The status of the order item.

string (uppercase)

"PURCHASED", "CONFIRMED", "REFUNDED", "CANCELLED"

Required

Optional

Not supported

channel

The channel used in the order.

string (uppercase)

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

Optional

Not supported

Not supported

language

The language used when making the order.

2 letter ISO 639 language code (uppercase)

"EN", "FR", "DE"

Optional

Not supported

Not supported

Here's a JSON example that includes Personally Identifiable Information (PII) and uses insert mode for a flight order item:

RequestResponse
{
   "ref":"056621C2-C955-492D-B7EE-C77C6BDDFDEE",
   "schema":"order",
   "mode":"insert",
   "value":{
      "referenceId":"BXTOF9",
      "channel":"WEB",
      "pointOfSale":"spinair.com",
      "status":"PURCHASED",
      "orderedAt":"2025-03-07T16:15:11.000Z",
      "currencyCode":"EUR",
      "price":50,
      "paymentType":"Card",
      "cardType":"Visa",
      "contact":{
         "title":"Mr",
         "firstName":"John",
         "lastName":"Doe",
         "gender":"male",
         "dateOfBirth":"1985-12-24T00:00Z",
         "email":"[email protected]",
         "phoneNumbers":[
            "+353161123345",
            "+353861123311"]
},
       "orderItems":[
            {
               "type":"FLIGHT",
               "productId":"DUB-LAS",
               "name":"flight",
               "description":"individualSegments",
               "vendor":"Company ABC",
               "orderedAt":"2025-03-07T16:15:11.000Z",
               "quantity":1,
               "price":50.00,
               "currencyCode":"EUR",
               "originalPrice":100.00,
               "originalCurrencyCode":"EUR",
               "referenceId":"B94TXY-1",
               "status":"PURCHASED",
               "consumerTypeCode":"ADT",
               "flightSegments":[
                  {
                     "id":"1234",
                     "origin":"DUB",
                     "destination":"LHR",
                     "departureDateTime":"2025-08-15T16:00Z",
                     "arrivalDateTime":"2025-08-15T17:20Z",
                     "flightNumber":"459",
                     "fareClass":"Economy",
                     "fareFamily":"Plus",
                     "carrier":"FR",
                     "originDestination":"DUB-LHR"
                  },
                  {
                     "id":"1235",
                     "origin":"LHR",
                     "destination":"LAS",
                     "departureDateTime":"2025-08-15T20:00Z",
                     "arrivalDateTime":"2025-08-15T22:30Z",
                     "flightNumber":"460",
                     "fareClass":"Economy",
                     "fareFamily":"Plus",
                     "carrier":"FR",
                     "originDestination":"LHR-LAS"
                  }
               ]
            }
         ]
      }
   }

Here's a JSON example that includes the identifiers attribute and uses insert mode for an order item:

RequestResponse
{
   "ref":"056621C2-C955-492D-B7EE-C77C6BDDFDEE",
   "schema":"order",
   "mode":"insert",
   "value":{
      "referenceId":"BET_001-1",
      "channel":"WEB",
      "pointOfSale":"spinbet.com",
      "status":"PURCHASED",
      "orderedAt":"2025-03-07T16:15:11.000Z",
      "currencyCode":"EUR",
      "price":50,
      "paymentType":"Card",
      "cardType":"Visa",
      "contact":{
         "identifiers":[
            {
               "provider":"IDENTITY_SYSTEM",
               "id":"B7524AE6-CF1C-440F-B1A2-0C9D42F5CB41",
               "expiryDate":"2025-08-23T16:17:16.000Z"
            },
            {
               "provider":"CRM",
               "id":"123456789t"
            }
         ]
      },
      "orderItems":[
         {
            "type":"BET_001-1",
            "productId":"CORRECT_SCORE",
            "name":"Exact score after 90 minutes",
            "description":"footballBets",
            "vendor":"Company ABC",
            "orderedAt":"2025-03-07T16:15:11.000Z",
            "quantity":1,
            "price":50.00,
            "currencyCode":"EUR",
            "originalPrice":100.00,
            "originalCurrencyCode":"EUR",
            "referenceId":"BET_001-1",
            "status":"PURCHASED"
         }
      ]
   }
}

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2025 Sitecore