---
title: "Update order line"
method: PATCH
path: "/orders/{orderId}/lines/{orderlineId}"
tags: ["Orders API"]
deprecated: true
---

# Update order line

`PATCH /orders/{orderId}/lines/{orderlineId}`

> **Deprecated.**

**⚠️ We no longer recommend using the Orders API. Please refer to the [Payments API](payments-api) instead.**

Update an order line belonging to an order. Only lines with status `created`, `pending`, or `authorized` can be updated.

This endpoint is useful for cases where specific details of an order line are changed. For example, if a customer changes a red shirt for a blue one of the same model. In this case only specific properties of the order line need to be updated, such as the `name`, the `imageUrl`, and perhaps the `amount`.

To swap out an order line for an entirely new order line, use the [Manage order lines](manage-order-lines) endpoint instead.

For an in-depth explanation of each parameter, refer to the `lines` parameter of the [Create order](create-order) endpoint.

> 🔑 Access with
>
> [API key](/reference/authentication)
>
> [Advanced access token with **orders.write**](/reference/authentication)
>
> [OAuth access with **orders.write**](/reference/authentication)

## Request body

- object
  - `name` string — A description of the line item. For example *LEGO 4440 Forest Police Station*.
  - `imageUrl` string — A link pointing to an image of the product sold.
  - `productUrl` string — A link pointing to the product page in your web shop of the product sold.
  - `sku` string — The SKU, EAN, ISBN or UPC of the product sold.
  - `metadata` union — Provide any data you like, for example a string or a JSON object. We will save the data alongside the entity. Whenever you fetch the entity with our API, we will also include the metadata. You can use up to approximately 1kB.
    - string
    - number
    - object
    - string[]
  - `quantity` integer — Required when a `unitPrice`, `discountAmount`, `totalAmount`, `vatAmount`, or `vatRate` is also provided in the same request.
  - `unitPrice` object — Required when a `quantity`, `discountAmount`, `totalAmount`, `vatAmount`, or `vatRate` is also provided in the same request.
    - `currency` string, required — A three-character ISO 4217 currency code.
    - `value` string, required — A string containing an exact monetary amount in the given currency.
  - `discountAmount` object — In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
    - `currency` string, required — A three-character ISO 4217 currency code.
    - `value` string, required — A string containing an exact monetary amount in the given currency.
  - `totalAmount` object — Required when a `quantity`, `unitPrice`, `discountAmount`, `vatAmount`, or `vatRate` is also provided in the same request.
    - `currency` string, required — A three-character ISO 4217 currency code.
    - `value` string, required — A string containing an exact monetary amount in the given currency.
  - `vatAmount` object — Required when a `quantity`, `unitPrice`, `discountAmount`, `totalAmount`, or `vatRate` is also provided in the same request.
    - `currency` string, required — A three-character ISO 4217 currency code.
    - `value` string, required — A string containing an exact monetary amount in the given currency.
  - `vatRate` string — Required when a `quantity`, `unitPrice`, `discountAmount`, `totalAmount`, or `vatAmount` is also provided in the same request.
  - `testmode` boolean — Whether the entity was created in test mode or live mode. This field does not update the mode of the entity. Most API credentials are specifically created for either live mode or test mode, in which case this parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting `testmode` to `true`.

## Response `200`

The updated order object.

## Other responses

- `404` — No entity with this ID exists.
- `422` — The request contains issues. For example, if you are trying to update an order line that can no longer be updated.
- `429` — Rate Limit has been reached.

---

[API](https://skmtc.net/mollie/apis/accepting-payments.md) · [All operations](https://skmtc.net/mollie/apis/accepting-payments/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mollie/accepting-payments/revisions/4b45df3039ef/schema)
