Order

An order object is the parent for all other objects and contains attributes that are common to the entire order. The Order REST API matches orders that have the same referenceId values and have orderedAt values (purchase dates) within two days of another.

Create an order

Request

Creates an order.

In the response, ref contains the order reference. Use the order reference to interact with a specific order, for example, to retrieve it, update it, or create a data extension for it.

Security
BasicAuth
Bodyapplication/json
currencyCodestring, (3 letter ISO 4217)required

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

Example:"EUR"
orderedAtstring, (date-time)required

The date and time when the order was made.

Example:"2024-01-01T16:17:16Z"
pricenumber, (number (currency))required

The amount paid for the order.

Example:50
referenceIdstring, (string)required

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

Example:"B94TXY-1"
createdAtstring, (date-time)

The date and time when the resource was created in Sitecore CDP.

Example:"2024-01-01T16:17:16Z"
modifiedAtstring, (date-time)

The date and time when the resource was updated in Sitecore CDP.

Example:"2024-01-01T16:17:16Z"
paymentTypestring, (string (title case recommended))

The method of payment for the order.

Example:"Card"
cardTypestring, (string (title case recommended))

The card type used to pay for the order.

Example:"Visa"
pointOfSalestring, (string (predefined by the client))

The point of sale used in the order.

Example:"home"
channelstring

The channel used in the order.

Enum:"WEB""MOBILE_WEB""MOBILE_APP""CALL_CENTER""AIRPORT_KIOSK""BRANCH""KIOSK""OFFLINE""GDS""OTA"
Example:"WEB"
statusstring

The status of the order.

Enum:"BROWSED""CANCELLED""CONFIRMED""DECLINED""PARTIALY_CONFIRMED""PARTIALY_REFUNDED""PAYMENT_PENDING""PENDING""PURCHASED""REFUNDED"
Example:"PURCHASED"
curl -i -X POST \
  -u '<username>:<password>' \
  https://api-engage-ap.sitecorecloud.io/v2.1/orders \
  -H 'Content-Type: application/json' \
  -d '{
    "createdAt": "2024-01-01T16:17:16Z",
    "modifiedAt": "2024-01-01T16:17:16Z",
    "orderedAt": "2024-01-01T16:17:16Z",
    "currencyCode": "EUR",
    "price": 50,
    "referenceId": "B94TXY-1",
    "paymentType": "Card",
    "cardType": "Visa",
    "pointOfSale": "home",
    "channel": "WEB",
    "status": "PURCHASED"
  }'

Responses

Resource successfully created

Bodyapplication/json
refstring, (UUID)

The order reference. This is a unique identifier of the order record. Use the order reference to interact with a specific order, for example, to retrieve it, update it, or create a data extension for it.

Example:"2d7de9df-45a2-45ea-872c-30e45139007d"
hrefstring

The link to the order.

Example:"https://api-engage-eu.sitecorecloud.io/v2.1/orders/2d7de9df-45a2-45ea-872c-30e45139007d"
createdAtstring, (date-time)

The date and time when the resource was created in Sitecore CDP.

Example:"2024-01-01T16:17:16Z"
modifiedAtstring, (date-time)

The date and time when the resource was updated in Sitecore CDP.

Example:"2024-01-01T16:17:16Z"
orderedAtstring, (date-time)

The date and time when the order was made.

Example:"2024-01-01T16:17:16Z"
currencyCodestring, (3 letter ISO 4217)

The currency the guest used to complete a purchase.

Example:"EUR"
pricenumber, (number (currency))

The amount paid for the order.

Example:50
referenceIdstring, (string)

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

Example:"B94TXY-1"
paymentTypestring, (string (title case recommended))

The method of payment for the order.

Example:"Card"
cardTypestring, (string (title case recommended))

The card type used to pay for the order.

Example:"Visa"
pointOfSalestring, (string (predefined by the client))

The point of sale used in the order.

Example:"home"
channelstring

The channel used in the order.

Enum:"WEB""MOBILE_WEB""MOBILE_APP""CALL_CENTER""AIRPORT_KIOSK""BRANCH""KIOSK""OFFLINE""GDS""OTA"
Example:"WEB"
statusstring

The status of the order.

Enum:"BROWSED""CANCELLED""CONFIRMED""DECLINED""PARTIALY_CONFIRMED""PARTIALY_REFUNDED""PAYMENT_PENDING""PENDING""PURCHASED""REFUNDED"
Example:"PURCHASED"
contactsobject(OrderContactResponse)

Contact details, containing a list of items.

consumersobject(OrderConsumerResponse)

Consumer details, containing a list of items.

orderItemsobject(OrderItemResponse)

Order item details, containing a list of items.

Response
{ "ref": "2d7de9df-45a2-45ea-872c-30e45139007d", "href": "https://api-engage-eu.sitecorecloud.io/v2.1/orders/2d7de9df-45a2-45ea-872c-30e45139007d", "createdAt": "2024-01-01T16:17:16Z", "modifiedAt": "2024-01-01T16:17:16Z", "orderedAt": "2024-01-01T16:17:16Z", "currencyCode": "EUR", "price": 50, "referenceId": "B94TXY-1", "paymentType": "Card", "cardType": "Visa", "pointOfSale": "home", "channel": "WEB", "status": "PURCHASED", "contacts": { "items": [] }, "consumers": { "items": [] }, "orderItems": { "items": [] } }