Skip to main content

Edit order

Only uncaptured order lines can be edited. Increasing the total order amount might trigger a new credit check. Whether the edit order action is available on the order or not, can be determined by inspecting the availableActions array on the suborder chunk. This can be retrieved from the GET order response.

curl -X POST \
-H 'authorization: Bearer v4.public.eyJpc3MiOiJs...' \
-H 'content-type: application/json' \
-H 'Idempotency-Key: da7ca8f9-915b-472b-b5f0-81945bff9e4a' \
-d '{
"orderLines": [
{
"description": "Coffee Machine X200",
"quantity": 9,
"reference": "111-222-333",
"totalAmount": 450000,
"totalVatAmount": 90000,
"type": "physical",
"unitDiscountAmount": 0,
"unitPrice": 50000,
"vat": 2500
},
{
"description": "Shipping fee",
"quantity": 1,
"reference": "444-555-666",
"totalAmount": 10000,
"totalVatAmount": 2000,
"type": "shippingFee",
"unitDiscountAmount": 0,
"unitPrice": 10000,
"vat": 2500
}
],
"totalOrderAmount": 510000,
"totalOrderAmountExclVat": 408000,
"totalOrderVatAmount": 102000
}'
https://api.sandbox.ledyer.com/v1/orders/:orderId

Request Headers

Idempotency-Key

stringOptional

By providing a unique value for this header, the idempotency of the operation will be guaranteed. This means that retries of requests will be safe to apply in case of network errors, socket errors and timeouts, etc. We recommend using UUID version 4 for the key.

Path parameters

orderId

The order ID string that was obtained when the order session was created.

Request body

orderLines

array of orderlines

An array of order lines.

totalOrderAmount

integer

Total order amount in minor units.

totalOrderAmountExclVat

integer

Total order amount excl. VAT in minor units.

totalOrderVatAmount

integer

Total order VAT amount in minor units.