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
            • Differences between v2 and v2.1
            • Create an order (legacy)
            • Retrieve orders (legacy)
            • Retrieve an order (legacy)
            • Update an order (legacy)
  1. Order REST API v2 (legacy)
  1. REST APIs
  2. Legacy REST APIs
  3. Order REST API v2 (legacy)
  4. Create an order (legacy)

Create an order (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

Creates an order.

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

Attribute

Type

Description

Example

pointOfSale

string

The point of sale used in the order.

"spinflight.com", "spinair.com"

currencyCode

string (uppercase ISO 4217)

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

"EUR", "NZD","USD"

price

number (currency)

The amount paid for the order.

50, 30.6

orderedAt

string (ISO 8601)

The date and time the order was made.

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

referenceId

string

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

"B94TXY-1"

In the response, ref contains the order reference.

curl -X POST <baseURL>/v2/orders' \
-u '<username>:<password>' \
-H 'Accept: application/json' \
--data-raw '
{
    "pointOfSale": "spinair.com/france",
    "channel": "WEB",
    "currencyCode": "EUR",
    "price": 12,
    "orderedAt": "2025-12-19T12:07:18.149Z",
    "referenceId": "B94TXY-1",
    "paymentType": "Card",
    "cardType": "Visa",
    "status": "PURCHASED"
}'
{
    "href": "<baseURL>/v2/orders/15d0417e-75a8-4340-9052-51b9ca36aab0",
    "ref": "15d0417e-75a8-4340-9052-51b9ca36aab0",
    "createdAt": "2025-12-19T12:19:01.268Z",
    "modifiedAt": "2025-12-19T12:19:01.268Z",
    "orderedAt": "2025-12-19T12:07:18.149Z",
    "currencyCode": "EUR",
    "price": 12,
    "referenceId": "B94TXY-1",
    "paymentType": "Card",
    "cardType": "Visa",
    "pointOfSale": "spinair.com/france",
    "channel": "WEB",
    "status": "PURCHASED",
    "contacts": {
        "items": [...]
    },
    "consumers": {
        "items": [...]
    },
    "orderItems": {
        "items": [...]
    }
}
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