---
title: "Update a specific order"
method: POST
path: "/ws/orders/{order_id}"
tags: ["Orders"]
---

# Update a specific order

`POST /ws/orders/{order_id}`

During shipping all orderlines are gathered in the same package. It is not necessary to specify the SKU when
updating an order to state 3; indeed, every orderline of this order will be set to this state automatically.

Merchants recover an order on state 1.

## Path parameters

- `order_id` integer, required

## Request body

- UpdateOrder
  - `order_id` integer — Unique ID of the order. Specify the same order_id in the URL and in the body
  - `new_state` 0 | 9 | 8 | 1 | 2 | 3 | 4 | 5 | 6 | 7, required — Orderline state. | State | Description | Possible next states | |-------|--------------------------------------------------------------------------------------------------------------|----------------------| | 0 | New orderline. The merchant has to wait for payment confirmation. | Not possible | | 9 | Orderline is on hold. It needs to be validated by our partner before being accepted by the merchant. | Not possible | | 8 | Orderline is pending. The customer has ordered but still have time to pay. Merchant has to wait for payment. | Not possible | | 1 | Orderline is paid. The merchant has received the payment and must validate or cancel the orderline. | 2 or 4 | | 2 | Orderline is accepted by the merchant, who must now prepare the product for shipment. | 3 or 5 | | 3 | The merchant has delivered the orderline to the shipping company. The package delivery is in progress. | 6 | | 4 | Orderline is cancelled. The customer will be refunded for the orderline. | Not possible | | 5 | Orderline is refunded before shipping. | Not possible | | 6 | Orderline is refunded after shipping. The customer made a refund request. | Not possible | | 7 | Orderline is not paid. The payment has been refused by the bank. | Not possible |
  - `sku` string — Merchant unique identifier of the listing, enables to match an orderline
  - `imei` string — Identifier of product. Optional and processed if new_state is 3. Applicable to any product category. Once registered, the value cannot be corrected. Only if the order has only one orderline with a quantity of 1. The value needs to be a valid IMEI. Once registered, the value cannot be corrected.
  - `serial_number` string — Identifier of product. Optional and processed if new_state is 3. Applicable to any product category. Only if the order has only one orderline with a quantity of 1. Once registered, the value cannot be corrected.
  - `tracking_number` string — Tracking number of the package. Required if new_state is 3.
  - `tracking_url` string, url — Tracking Url of the package. Optional and processed if new_state is 3.
  - `vat_type` 'REGULAR' | 'MARGINAL'
  - `date_shipping` string, date-time — Date of shipping. Optional and processed if new_state is 3.
  - `shipper` string — Shipper designated. Shipper can be replaced if new_state is 3.
  - `return_reason` 0 | 1 | 11 | 12 | 13 | 21 | 22 | 23 | 24 | 25 — Reason for the return. | Value | Description | |-------|-------------------------------------------| | 0 | Stock mistake | | 1 | Withdrawal during the legal 14 day period | | 11 | Does not live at provided address | | 12 | The parcel did not reach its destination | | 13 | Lost parcel | | 21 | Faulty product on opening of the package | | 22 | Failure during first use | | 23 | Failure during warranty period | | 24 | Non-compliant product | | 25 | Other |
  - `return_message` string — Message sent to the customer for a cancellation or a refund. Optional and processed if new_state is 6.

## Response `200`

Return the order with the specified id

- Order
  - `order_id` integer — The unique id of the order. Used to update orderlines of a given order
  - `delivery_mode` 'HOME_DELIVERY' | 'COLLECTION_POINT' — The delivery mode associated with the shipping address of the order. - `HOME_DELIVERY`: The shipping address is a home-delivery address. - `COLLECTION_POINT`: The shipping address is a collection-point address.
  - `shipping_address` Address
    - `id` integer
    - `country` string — ISO 3166-1 alpha-2 country code.
    - `city` string
    - `postalCode` string
    - `firstName` string
    - `lastName` string
    - `company` string
    - `phoneNumber` string — E.164 formatted phone number.
    - `state` string
    - `street` string
    - `street2` string
  - `billing_address` Address
    - `id` integer
    - `country` string — ISO 3166-1 alpha-2 country code.
    - `city` string
    - `postalCode` string
    - `firstName` string
    - `lastName` string
    - `company` string
    - `phoneNumber` string — E.164 formatted phone number.
    - `state` string
    - `street` string
    - `street2` string
  - `delivery_note` string, url — Document to add in package which contains useful information for the customer, related to his order.
  - `expected_dispatch_date` string, date-time — The shipment expected dispatch date (only applicable for orders not already SENT).
  - `tracking_number` string — Tracking number of the package
  - `tracking_url` string, url — Tracking Url of the package
  - `shipper_display` string — Name of the shipper
  - `is_backship` boolean — True if the shipper of the order is backship
  - `date_creation` string, date-time — Date of order
  - `date_modification` string, date-time — Date of last modification
  - `date_shipping` string, date-time — Date of shipping
  - `date_payment` string, date-time — Date of payment
  - `state` 0 | 10 | 1 | 3 | 8 | 9 — Order state. | State | Description | |-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| | 0 | New order. Payment validation is pending. We are doing verifications to check the customer identity. The orders in this state must not be shipped. | | 10 | Order is pending. The customer has ordered but still has time to pay. The merchant has to wait for payment, and the orders in this state must not be shipped. | | 1 | Payment is checked and validated. The merchant has to process (accept or cancel) the orderlines. | | 3 | Order shipping is pending. The payment and the order (i.e. all orderlines) have been validated. The merchant has to ship the package to the customer. | | 8 | Order is not paid. Payment process has failed, and the merchant must ignore this order. | | 9 | Order processed. The merchant has shipped the package. |
  - `orderlines` OrderLine[] — List of orderlines of the order. Indexed by SKU
    - `id` integer — The orderline unique ID
    - `date_creation` string, date-time — Date of creation of the orderline
    - `state` 0 | 9 | 8 | 1 | 2 | 3 | 4 | 5 | 6 | 7 — Orderline state. | State | Description | Possible next states | |-------|--------------------------------------------------------------------------------------------------------------|----------------------| | 0 | New orderline. The merchant has to wait for payment confirmation. | Not possible | | 9 | Orderline is on hold. It needs to be validated by our partner before being accepted by the merchant. | Not possible | | 8 | Orderline is pending. The customer has ordered but still have time to pay. Merchant has to wait for payment. | Not possible | | 1 | Orderline is paid. The merchant has received the payment and must validate or cancel the orderline. | 2 or 4 | | 2 | Orderline is accepted by the merchant, who must now prepare the product for shipment. | 3 or 5 | | 3 | The merchant has delivered the orderline to the shipping company. The package delivery is in progress. | 6 | | 4 | Orderline is cancelled. The customer will be refunded for the orderline. | Not possible | | 5 | Orderline is refunded before shipping. | Not possible | | 6 | Orderline is refunded after shipping. The customer made a refund request. | Not possible | | 7 | Orderline is not paid. The payment has been refused by the bank. | Not possible |
    - `price` string — Price (including taxes) of the listing associated & warranty without the shipping price
    - `shipping_price` string — Unitary shipping price (including taxes)
    - `shipping_delay` integer — Shipping time
    - `currency` string — Currency used
    - `return_reason` 0 | 1 | 11 | 12 | 13 | 21 | 22 | 23 | 24 | 25 — Reason for the return. | Value | Description | |-------|-------------------------------------------| | 0 | Stock mistake | | 1 | Withdrawal during the legal 14 day period | | 11 | Does not live at provided address | | 12 | The parcel did not reach its destination | | 13 | Lost parcel | | 21 | Faulty product on opening of the package | | 22 | Failure during first use | | 23 | Failure during warranty period | | 24 | Non-compliant product | | 25 | Other |
    - `return_message` string — Message sent to the customer for a cancellation or a refund
    - `listing` string — SKU of the listing
    - `listing_id` integer — ID of the listing
    - `orderline_fee` string — BackMarket commission fee amount
    - `product` string — Title of the product
    - `quantity` integer — Quantity of products ordered
    - `brand` string — The brand of the product
    - `product_id` integer — The product ID
    - `backcare` boolean — True if this orderline is covered by the Backcare service
    - `backcare_price` integer — The backcare price in cents
    - `sales_taxes` string — Sales taxes (country/state dependent)
    - `imei` string — Unique product identifier
    - `serial_number` string — Unique product identifier
    - `condition` 9 | 10 | 11 | 12 — Condition of the product. | Value | Description | |-------|---------------------| | 9 | Premium condition | | 1O | Excellent condition | | 11 | Good condition | | 12 | Fair condition |
  - `price` string — The total price of the order (including taxes) without the shipping price
  - `shipping_price` string — Total shipping price (including taxes)
  - `currency` string — Currency used for the order
  - `country_code` 'fr-fr' | 'fr-be' | 'es-es' | 'de-de' | 'de-at' | 'it-it' | 'ja-jp' | 'en-au' | 'en-gb' | 'en-us' | 'nl-nl' | 'pt-pt' | 'en-ie' | 'el-gr' | 'sk-sk' | 'sv-se'
  - `paypal_reference` string, nullable — Paypal reference ID
  - `installment_payment` boolean — Whether the customer chose a payment in multiple increments
  - `payment_method` string — The customer payment method (Eg: CARD, PAYPAL)
  - `sales_taxes` string — Sales taxes (country/state dependent)

## Other responses

- `400` — Bad request
- `403` — Forbidden
- `404` — The listing doesn't exist

---

[API](https://skmtc.net/backmarket/apis/back-market-api-guidelines.md) · [All operations](https://skmtc.net/backmarket/apis/back-market-api-guidelines/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/backmarket/back-market-api-guidelines/revisions/6a1303364143/schema)
