Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
CDPCloud Portal
Sitecore CDP Developer Documentation
  • Developing with Sitecore CDP
    • Base URL
    • Response codes
    • REST API Guest v2.1
    • REST API Guest data extension v2.1
    • REST API Order v2.1
    • REST API Order contact v2.1
    • REST API Order consumer v2.1
    • REST API Order data extension v2.1
    • REST API Order item data extension v2.1
    • REST API Audience export
            • Create an order item (legacy)
            • Retrieve order item references (legacy)
            • Retrieve an order item (legacy)
            • Update an order item (legacy)
            • Delete an order item (legacy)
  1. REST API Order item v2 (legacy)
  1. Sitecore CDP Developer Documentation
  2. REST APIs

Create an order item (legacy)

Important

A newer version of this REST API (v2.1) is available. If you're new to this REST API, use the new version. Alternatively, if you're already using the old version, read about the differences between v2 and v2.1 so you can upgrade.

POST /v2/orders/<orderRef>/orderItems

Creates an order item.

AttributeTypeDescriptionExample
orderRefstringThe reference of the order.

If you do not know the order reference, first retrieve orders.
d680c9be-4c07-4731-857e-9602034b15f2

At a minimum, you must provide the following required attributes in the request body:

AttributeTypeDescriptionExample
currencyCodestring (uppercase ISO 4217)The organization’s currency code for the order item."EUR", "NZD","USD"
pricenumber (currency)The organization’s price for the order item.50, 30.6
statusstring enum (uppercase)The status of the order item.Must be one of:

"RESERVED", "PENDING", "DECLINED", "CONFIRMED", "CANCELLED", "REFUNDED", "PURCHASED", "UNKNOWN"
typestring enum (uppercase with underscore if more than one word)The type of order item.Must be one of:

"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"
productIdstringThe ID of the product."DUB-LAS"
referenceIdstringAn ID generated by the client to reference the order item."B94TXY-1"

In the response, ref contains the order item reference.

curl -X POST '<baseURL>/v2/orders/0840ff0d-685a-41c8-8f29-4dd9fa2e3245/orderItems' \
-u '<username>:<password>' \
-H 'Accept: application/json' \
--data-raw '{
    "type": "FLIGHT",
    "productId": "DUB-LAS",
    "orderedAt": "2026-07-23T16:`17:16`.000Z",
    "quantity": 1,
    "price": 100.00,
    "currencyCode": "EUR",
    "originalPrice": 112.00,
    "originalCurrencyCode": "USD",
    "referenceId": "B94TXY-1",
    "status": "PURCHASED",
    "name": "Flight DUB-LAS",
    "description": "Flight DUB-LAS",
    "vendor": "unknown",
    "channel": "WEB",
    "language": "EN",
    "passengerTypeCode": "ADT",
    "flightSegments": [{
        "id": "1234",
        "origin": "DUB",
        "destination": "LHR",
        "originDestination": "DUB-LHR",
        "departureDateTime": "2026-08-15T16:`00:00`.000Z",
        "arrivalDateTime": "2026-08-15T17:`30:00`.000Z",
        "fareClass": "Economy",
        "fareFamily": "Plus",
        "bookingClass": "Y",
        "carrier": "BX",
        "flightNumber": "459",
        "operatingCarrier": "BX",
        "operatingFlightNumber": "1459"
    },
    {
        "id": "1235",
        "origin": "LHR",
        "destination": "LAS",
        "originDestination": "LHR-LAS",
        "departureDateTime": "2026-08-15T19:`00:00`.000Z",
        "arrivalDateTime": "2026-08-15T21:`30:00`.000Z",
        "fareClass": "Economy",
        "fareFamily": "Plus",
        "bookingClass": "Y",
        "carrier": "BX",
        "flightNumber": "460",
        "operatingCarrier": "BX",
        "operatingFlightNumber": "1460"
    }]
}'
{
    "type": "FLIGHT",
    "href": "<baseURL>/v2/orderItems/7737242c-1ec4-4644-b4be-ca8a3882fba9",
    "ref": "7737242c-1ec4-4644-b4be-ca8a3882fba9",
    "order": {
        "href": "<baseURL>/v2/orders/0840ff0d-685a-41c8-8f29-4dd9fa2e3245"
    },
    "createdAt": "2026-11-08T22:`00:37`.075Z",
    "modifiedAt": "2026-11-08T22:`00:37`.075Z",
    "orderedAt": "2026-07-15T16:`00:00`.000Z",
    "productId": "DUB-LAS",
    "price": 100,
    "currencyCode": "EUR",
    "originalPrice": 112,
    "originalCurrencyCode": "USD",
    "referenceId": "B94TXY-1",
    "vendor": "unknown",
    "status": "PURCHASED",
    "language": "EN",
    "name": "Flight DUB-LAS",
    "description": "Flight DUB-LAS",
    "quantity": 1,
    "channel": "WEB",
    "flightSegments": [
        {
            "id": "1234",
            "origin": "DUB",
            "destination": "LHR",
            "departureDateTime": "2026-08-15T16:`00:00`.000Z",
            "arrivalDateTime": "2026-08-15T17:`30:00`.000Z",
            "flightNumber": "459",
            "fareClass": "Economy",
            "fareFamily": "Plus",
            "carrier": "BX",
            "originDestination": "DUB-LHR",
            "bookingClass": "Y",
            "operatingCarrier": "BX"
        },
        {
            "id": "1235",
            "origin": "LHR",
            "destination": "LAS",
            "departureDateTime": "2026-08-15T19:`00:00`.000Z",
            "arrivalDateTime": "2026-08-15T21:`30:00`.000Z",
            "flightNumber": "460",
            "fareClass": "Economy",
            "fareFamily": "Plus",
            "carrier": "BX",
            "originDestination": "LHR-LAS",
            "bookingClass": "Y",
            "operatingCarrier": "BX"
        }
    ],
    "passengerTypeCode": "ADT",
    "consumerTypeCode": "ADT",
    "sku": "DUB-LAS"
}
If you have suggestions for improving this article, let us know!

Documentation Assistant

This assistant uses AI to generate responses based on Sitecore documentation. While it has access to official sources, answers may be incomplete or inaccurate and should not be considered official advice or support.
Powered by
k
kapa.ai
Protected by reCAPTCHA

© Copyright 2026, Sitecore A/S or a Sitecore affiliated company.
All rights reserved.

Privacy policySitecore Trust CenterTerms of use