latestOpenAPI 3.0.32026-08-193973220.1 KB

6a1303364143

Orders

Update a specific order

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.

post/ws/orders/{order_id}

Path parameters

order_idinteger required

The order identifier

Request body

order_idinteger

Unique ID of the order. Specify the same order_id in the URL and in the body

new_state0 | 9 | 8 | 1 | 2 | 3 | 4 | 5 | 6 | 7 required

Orderline state.

StateDescriptionPossible next states
0New orderline. The merchant has to wait for payment confirmation.Not possible
9Orderline is on hold. It needs to be validated by our partner before being accepted by the merchant.Not possible
8Orderline is pending. The customer has ordered but still have time to pay. Merchant has to wait for payment.Not possible
1Orderline is paid. The merchant has received the payment and must validate or cancel the orderline.2 or 4
2Orderline is accepted by the merchant, who must now prepare the product for shipment.3 or 5
3The merchant has delivered the orderline to the shipping company. The package delivery is in progress.6
4Orderline is cancelled. The customer will be refunded for the orderline.Not possible
5Orderline is refunded before shipping.Not possible
6Orderline is refunded after shipping. The customer made a refund request.Not possible
7Orderline is not paid. The payment has been refused by the bank.Not possible
skustring

Merchant unique identifier of the listing, enables to match an orderline

imeistring

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_numberstring

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_numberstring

Tracking number of the package.

Required if new_state is 3.

tracking_urlstring url

Tracking Url of the package.

Optional and processed if new_state is 3.

vat_type'REGULAR' | 'MARGINAL'
date_shippingstring date-time

Date of shipping.

Optional and processed if new_state is 3.

shipperstring

Shipper designated.

Shipper can be replaced if new_state is 3.

return_reason0 | 1 | 11 | 12 | 13 | 21 | 22 | 23 | 24 | 25

Reason for the return.

ValueDescription
0Stock mistake
1Withdrawal during the legal 14 day period
11Does not live at provided address
12The parcel did not reach its destination
13Lost parcel
21Faulty product on opening of the package
22Failure during first use
23Failure during warranty period
24Non-compliant product
25Other
return_messagestring

Message sent to the customer for a cancellation or a refund.

Optional and processed if new_state is 6.

Example request

{
  "order_id": 5978,
  "new_state": 1,
  "sku": "IPHONE416GONLIB0",
  "imei": "01141500934XXXX",
  "tracking_number": "my_tracking_number",
  "tracking_url": "http://www.colissimo.fr/my_tracking_url",
  "vat_type": "MARGINAL",
  "date_shipping": "2022-04-29T09:35:24Z",
  "return_message": "We're sorry an error occurred with the order. You'll be reimbursed soon."
}

Response

Return the order with the specified id

order_idinteger

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.
delivery_notestring url

Document to add in package which contains useful information for the customer, related to his order.

expected_dispatch_datestring date-time

The shipment expected dispatch date (only applicable for orders not already SENT).

tracking_numberstring

Tracking number of the package

tracking_urlstring url

Tracking Url of the package

shipper_displaystring

Name of the shipper

is_backshipboolean

True if the shipper of the order is backship

date_creationstring date-time

Date of order

date_modificationstring date-time

Date of last modification

date_shippingstring date-time

Date of shipping

date_paymentstring date-time

Date of payment

state0 | 10 | 1 | 3 | 8 | 9

Order state.

StateDescription
0New order. Payment validation is pending. We are doing verifications to check the customer identity. The orders in this state must not be shipped.
10Order 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.
1Payment is checked and validated. The merchant has to process (accept or cancel) the orderlines.
3Order 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.
8Order is not paid. Payment process has failed, and the merchant must ignore this order.
9Order processed. The merchant has shipped the package.
pricestring

The total price of the order (including taxes) without the shipping price

shipping_pricestring

Total shipping price (including taxes)

currencystring

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_referencestring nullable

Paypal reference ID

installment_paymentboolean

Whether the customer chose a payment in multiple increments

payment_methodstring

The customer payment method (Eg: CARD, PAYPAL)

sales_taxesstring

Sales taxes (country/state dependent)

Example response

{
  "order_id": 5978,
  "delivery_mode": "HOME_DELIVERY",
  "shipping_address": {
    "id": 1,
    "country": "FR",
    "city": "Paris",
    "postalCode": "75003",
    "firstName": "Victor",
    "lastName": "Hugo",
    "company": "backmarket",
    "phoneNumber": "+33639981234",
    "state": "California",
    "street": "3, Imaginary Street",
    "street2": "Apartement X"
  },
  "billing_address": {
    "id": 1,
    "country": "FR",
    "city": "Paris",
    "postalCode": "75003",
    "firstName": "Victor",
    "lastName": "Hugo",
    "company": "backmarket",
    "phoneNumber": "+33639981234",
    "state": "California",
    "street": "3, Imaginary Street",
    "street2": "Apartement X"
  },
  "delivery_note": "https://example.com/delivery_note/1519221434.69.pdf",
  "expected_dispatch_date": "2022-04-29T09:35:24",
  "tracking_number": "my_tracking_number",
  "tracking_url": "http://www.colissimo.fr/my_tracking_url",
  "shipper_display": "Colissimo",
  "date_creation": "2022-04-29T09:35:24.123456Z",
  "date_modification": "2022-04-29T09:35:24Z",
  "date_shipping": "2022-04-29T09:35:24.123456Z",
  "date_payment": "2022-04-29T09:35:24.123Z",
  "state": 1,
  "orderlines": [
    {
      "id": 37195,
      "date_creation": "2022-04-29T09:35:24.123456Z",
      "state": 1,
      "price": "229.0",
      "shipping_price": "0.00",
      "shipping_delay": 48,
      "currency": "EUR",
      "listing": "IPHONE416GONLIB0",
      "listing_id": 142,
      "orderline_fee": "22.9",
      "product": "Apple Iphone 4 16 Go - Noir - D\\u00e9bloqu\\u00e9",
      "quantity": 2,
      "brand": "apple",
      "product_id": 141,
      "backcare": true,
      "backcare_price": 500,
      "sales_taxes": "25.8",
      "imei": "011415009346880",
      "condition": 10
    }
  ],
  "price": "299.25",
  "shipping_price": "5.99",
  "currency": "EUR",
  "country_code": "fr-fr",
  "payment_method": "PAYPAL",
  "sales_taxes": "25.8"
}