# Update an order item

Updates an order item.

Endpoint: PUT /v2.1/orderItems/{orderItemRef}
Version: v2.1
Security: BasicAuth

## Path parameters:

  - `orderItemRef` (string, required)
    The order item reference. This is a unique identifier of the order item. Automatically generated when you created the order item. If you don't know the order item reference, first list order items.
    Example: "2d7de9df-45a2-45ea-872c-30e45139007d"

## Request fields (application/json):

  - `currencyCode` (string, required)
    The organization's currency code for the order item.
    Example: "EUR"

  - `name` (string, required)
    The name of the order item. Free text value. Maximum character limit: 128
    Example: "Mobile AZ10"

  - `price` (number, required)
    The organization's price for the order item.
    Example: 105

  - `status` (string, required)
    The status of the order item.
    Example: "CONFIRMED"

  - `type` (string, required)
    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"

  - `description` (string)
    The description of the order item.
    Example: "Mobile AZ10 description"

  - `productId` (string)
    The ID of the product.
    Example: "1233-44"

  - `originalPrice` (number)
    The unit price of the order item before conversion to the organization's currency.
    Example: 110

  - `originalCurrencyCode` (string)
    The original currency code for the order item.
    Example: "USD"

  - `referenceId` (string)
    An ID generated by the client to reference the order item.
    Example: "AAAAA-134"

  - `vendor` (string)
    The organization that is selling the order item.
    Example: "Vendor XYZ"

  - `language` (string)
    The language used when making the order.
    Example: "EN"

  - `quantity` (integer)
    The number or quantity of the order item.
    Example: 1

  - `channel` (string)
    The channel used in the order.
    Example: "WEB"

## Response 200 fields (application/json):

  - `ref` (string)
    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"

  - `href` (string)
    The link to the order item.
    Example: "https://api-engage-eu.sitecorecloud.io/v2.1/orderItems/2d7de9df-45a2-45ea-872c-30e45139007d"

  - `name` (string)
    The name of the order item. Free text value. Maximum character limit: 128
    Example: "Mobile AZ10"

  - `description` (string)
    The description of the order item.
    Example: "Mobile AZ10 description"

  - `createdAt` (string)
    The date and time when the resource was created in Sitecore CDP.
    Example: "2024-01-01T16:17:16Z"

  - `modifiedAt` (string)
    The date and time when the resource was updated in Sitecore CDP.
    Example: "2024-01-01T16:17:16Z"

  - `orderedAt` (string)
    The date and time when the order item was made.
    Example: "2024-01-01T16:17:16Z"

  - `type` (string)
    The type of order item.
    Example: "MOBILE"

  - `productId` (string)
    The ID of the product.
    Example: "1233-44"

  - `price` (number)
    The organization's price for the order item.
    Example: 105

  - `currencyCode` (string)
    The organization's currency code for the order item.
    Example: "EUR"

  - `originalPrice` (number)
    The unit price of the order item before conversion to the organization's currency.
    Example: 110

  - `originalCurrencyCode` (string)
    The original currency code for the order item.
    Example: "USD"

  - `referenceId` (string)
    An ID generated by the client to reference the order item.
    Example: "AAAAA-134"

  - `vendor` (string)
    The organization that is selling the order item.
    Example: "Vendor XYZ"

  - `status` (string)
    The status of the order item.
    Example: "CONFIRMED"

  - `language` (string)
    The language used when making the order.
    Example: "EN"

  - `quantity` (integer)
    The number or quantity of the order item.
    Example: 1

  - `channel` (string)
    The channel used in the order.
    Example: "WEB"

  - `order` (object)
    The request's first list of orders URL.

  - `order.href` (string)
    Example: "https://api-engage-eu.sitecorecloud.io/v2.1/orders?guestRef=2d7de9df-45a2-45ea-872c-30e45139007d&offset=1&limit=10"

## Response 401 fields (application/json):

  - `status` (string)
    The HTTP request status.
    Example: "UNAUTHORIZED"

  - `code` (integer)
    The HTTP response status code.
    Example: 401

  - `message` (string)
    Error description.
    Example: "Authentication credentials are required to access the resource. All requests must be authenticated."

  - `moreInfoUrl` (string)
    URL to get more information about the error.
    Example: "https://support.sitecore.com"


