Create an order item

Request

Creates an order item on an order.

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

Security
BasicAuth
Path
orderRefstringrequired

The order reference. This is a unique identifier of the order record. Automatically generated when you created the order. If you don't know the order reference, first list orders.

Example:2d7de9df-45a2-45ea-872c-30e45139007d
Bodyapplication/json
currencyCodestringrequired

The organization's currency code for the order item.

Example:"EUR"
namestringrequired

The name of the order item. Free text value. Maximum character limit: 128

Example:"Mobile AZ10"
pricenumberrequired

The organization's price for the order item.

Example:105
statusstringrequired

The status of the order item.

Example:"CONFIRMED"
typestringrequired

The type of order item. Must not be set to any of the following: "FLIGHT", "HOTEL", "MORTGAGE", "MORTGAGE_APPLICATION", "LOAN_APPLICATION", "PERSONAL_LOAN", "RAIL"

Example:"MOBILE"
descriptionstring

The description of the order item.

Example:"Mobile AZ10 description"
productIdstring

The ID of the product.

Example:"1233-44"
originalPricenumber

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

Example:110
originalCurrencyCodestring

The original currency code for the order item.

Example:"USD"
referenceIdstring

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

Example:"AAAAA-134"
vendorstring

The organization that is selling the order item.

Example:"Vendor XYZ"
languagestring

The language used when making the order.

Example:"EN"
quantityinteger, (int32)

The number or quantity of the order item.

Example:1
channelstring

The channel used in the order.

Example:"WEB"
curl -i -X POST \
  -u '<username>:<password>' \
  https://api-engage-ap.sitecorecloud.io/v2.1/orders/2d7de9df-45a2-45ea-872c-30e45139007d/orderItems \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Mobile AZ10",
    "description": "Mobile AZ10 description",
    "type": "MOBILE",
    "productId": "1233-44",
    "price": 105,
    "currencyCode": "EUR",
    "originalPrice": 110,
    "originalCurrencyCode": "USD",
    "referenceId": "AAAAA-134",
    "vendor": "Vendor XYZ",
    "status": "CONFIRMED",
    "language": "EN",
    "quantity": 1,
    "channel": "WEB"
  }'

Responses

Resource successfully created

Bodyapplication/json
refstring, (UUID)

The order item reference. This is a unique identifier of the order item. Use the order item reference to interact with a specific order item, 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 item.

Example:"https://api-engage-eu.sitecorecloud.io/v2.1/orderItems/2d7de9df-45a2-45ea-872c-30e45139007d"
namestring

The name of the order item. Free text value. Maximum character limit: 128

Example:"Mobile AZ10"
descriptionstring

The description of the order item.

Example:"Mobile AZ10 description"
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 item was made.

Example:"2024-01-01T16:17:16Z"
typestring

The type of order item.

Example:"MOBILE"
productIdstring

The ID of the product.

Example:"1233-44"
pricenumber

The organization's price for the order item.

Example:105
currencyCodestring

The organization's currency code for the order item.

Example:"EUR"
originalPricenumber

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

Example:110
originalCurrencyCodestring

The original currency code for the order item.

Example:"USD"
referenceIdstring

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

Example:"AAAAA-134"
vendorstring

The organization that is selling the order item.

Example:"Vendor XYZ"
statusstring

The status of the order item.

Example:"CONFIRMED"
languagestring

The language used when making the order.

Example:"EN"
quantityinteger, (int32)

The number or quantity of the order item.

Example:1
channelstring

The channel used in the order.

Example:"WEB"
orderobject(OrderLinkFirst)

The request's first list of orders URL.

Response
{ "ref": "2d7de9df-45a2-45ea-872c-30e45139007d", "href": "https://api-engage-eu.sitecorecloud.io/v2.1/orderItems/2d7de9df-45a2-45ea-872c-30e45139007d", "name": "Mobile AZ10", "description": "Mobile AZ10 description", "createdAt": "2024-01-01T16:17:16Z", "modifiedAt": "2024-01-01T16:17:16Z", "orderedAt": "2024-01-01T16:17:16Z", "type": "MOBILE", "productId": "1233-44", "price": 105, "currencyCode": "EUR", "originalPrice": 110, "originalCurrencyCode": "USD", "referenceId": "AAAAA-134", "vendor": "Vendor XYZ", "status": "CONFIRMED", "language": "EN", "quantity": 1, "channel": "WEB", "order": { "href": "https://api-engage-eu.sitecorecloud.io/v2.1/orders?guestRef=2d7de9df-45a2-45ea-872c-30e45139007d&offset=1&limit=10" } }