---
title: "Update an order"
method: PATCH
path: "/merchants/{merchantId}/terminalOrders/{orderId}"
tags: ["Terminal orders - merchant level"]
---

# Update an order

`PATCH /merchants/{merchantId}/terminalOrders/{orderId}`

Updates the terminal products order identified in the path.
Updating is only possible while the order has the status **Placed**.

The request body only needs to contain what you want to change. 
However, to update the products in the `items` array, you must provide the entire array. For example, if the array has three items:
 To remove one item, the array must include the remaining two items. Or to add one item, the array must include all four items.

To make this request, your API credential must have the following [role](https://docs.adyen.com/development-resources/api-credentials#api-permissions):
* Management API—Terminal ordering read and write

In the live environment, requests to this endpoint are subject to [rate limits](https://docs.adyen.com/point-of-sale/automating-terminal-management#rate-limits-in-the-live-environment).

## Path parameters

- `merchantId` string, required
- `orderId` string, required

## Request body

- TerminalOrderRequest
  - `billingEntityId` string — The identification of the billing entity to use for the order. > When ordering products in Brazil, you do not need to include the `billingEntityId` in the request.
  - `customerOrderReference` string — The merchant-defined purchase order reference.
  - `items` OrderItem[] — The products included in the order.
    - `id` string — The unique identifier of the product.
    - `installments` integer — The number of installments for the specified product `id`.
    - `name` string — The name of the product.
    - `quantity` integer — The number of items with the specified product `id` included in the order.
  - `orderType` string — Type of order
  - `shippingLocationId` string — The identification of the shipping location to use for the order.
  - `taxId` string — The tax number of the billing entity.

## Response `200`

OK - the request has succeeded.

- TerminalOrder
  - `billingEntity` BillingEntity
    - `address` Address
      - `city` string — The name of the city.
      - `companyName` string — The name of the company.
      - `country` string — The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
      - `postalCode` string — The postal code.
      - `stateOrProvince` string — The state or province as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Applicable for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States
      - `streetAddress` string — The name of the street, and the house or building number.
      - `streetAddress2` string — Additional address details, if any.
    - `email` string — The email address of the billing entity.
    - `id` string — The unique identifier of the billing entity, for use as `billingEntityId` when creating an order.
    - `name` string — The unique name of the billing entity.
    - `taxId` string — The tax number of the billing entity.
  - `customerOrderReference` string — The merchant-defined purchase order number. This will be printed on the packing list.
  - `id` string — The unique identifier of the order.
  - `items` OrderItem[] — The products included in the order.
    - `id` string — The unique identifier of the product.
    - `installments` integer — The number of installments for the specified product `id`.
    - `name` string — The name of the product.
    - `quantity` integer — The number of items with the specified product `id` included in the order.
  - `orderDate` string — The date and time that the order was placed, in UTC ISO 8601 format. For example, "2011-12-03T10:15:30Z".
  - `shippingLocation` ShippingLocation
    - `address` Address
      - `city` string — The name of the city.
      - `companyName` string — The name of the company.
      - `country` string — The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
      - `postalCode` string — The postal code.
      - `stateOrProvince` string — The state or province as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Applicable for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States
      - `streetAddress` string — The name of the street, and the house or building number.
      - `streetAddress2` string — Additional address details, if any.
    - `contact` Contact
      - `email` string — The individual's email address.
      - `firstName` string — The individual's first name.
      - `infix` string — The infix in the individual's name, if any.
      - `lastName` string — The individual's last name.
      - `phoneNumber` string — The individual's phone number, specified as 10-14 digits with an optional `+` prefix.
    - `id` string — The unique identifier of the shipping location, for use as `shippingLocationId` when creating an order.
    - `name` string — The unique name of the shipping location.
  - `status` string — The processing status of the order.
  - `trackingUrl` string — The URL, provided by the carrier company, where the shipment can be tracked.

## Other responses

- `204` — No Content - the request has been successfully processed, but there is no additional content.
- `400` — Bad Request - a problem reading or understanding the request.
- `401` — Unauthorized - authentication required.
- `403` — Forbidden - insufficient permissions to process the request.
- `422` — Unprocessable Entity - a request validation error.
- `500` — Internal Server Error - the server could not process the request.

---

[API](https://skmtc.net/adyen/apis/management-api.md) · [All operations](https://skmtc.net/adyen/apis/management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/adyen/management-api/versions/1089ade06e17/schema)
