---
id: change-order
title: Change an order
hide_title: true
description: "Management API - Use case - Change order"
---

import Ingress from '../../../../src/components/ingress/ingress.react';

<Ingress title="Change an order">
Use this request to change an order before it has been shipped to the customer
</Ingress>

## Use case

The customer contacted you prior to shipping the order and you want to change the order so the customer is charged correctly.
This could for example be due to a discount not being applied, an article that was not in stock anymore or that the customer wanted another quantity of an item.

In some cases the change might be rejected because we cannot extend the original order amount.
This might be the case for a direct payment method like Swish or card, but it can also be true if the customer is not allowed the new amount within the current credit check.

## Endpoints used

[Re-authorize order](/docs/manage/orders/reauthorize)

## Example

The following request will update the order with id `abcdef-12345-1234-5555-6666`.

:::info Send the items even though they are optional
The customer sees what changed on the order. Without the items, they only see a new amount.
:::

```http
POST /manage/orders/abcdef-12345-1234-5555-6666/reauthorize HTTP/1.1
Host: api.uat.walleydev.com // Test environment. Production uses a different hostname.
Authorization: Bearer {{accessToken}}
Walley-Idempotency: 03304b06-cb33-4f78-bcea-86cb4b202ba0
Content-Type: application/json

{
  "amount": 285.0,
  "actionReference": "this-will-be-shown-on-reconciliation-reports",
  "items": [
    {
      "id": "10001",
      "description": "Shoes",
      "unitPrice": 95,
      "quantity": 1
    },
    {
      "id": "10002",
      "description": "T-Shirt",
      "unitPrice": 95,
      "quantity": 2
    }
  ]
}

```
