Order feature V2

How to manage your order

API order Feature

This feature allows you to manage the orders received on Cdiscount and Octopia sales channels.
You will be able to :

  • Retrieve the orders using filters

  • Get the deatils of the order

  • Ship orders

  • Cancel orders

Endpoint

What is an order ?

In order to understand what "order" means for Octopia you can read the help center documentation. You will find :

  1. How to manage your orders

  2. How to ship your orders

  3. How to cancel your orders

Help center documentation

How it works

The Orders API enables you to manage your orders received from the different Octopia sales channel you subscribed to. It offers 5 services :

  • retrieve a list of orders using a set of filters

  • retrieve a specific orders using the orderId

  • validate an order (if necessary)

  • ship an order

  • cancel an order

Pre-requesites : In order to retrieve and update orders, you need a valid access token

Order Lifecycle

Upon receiving a new order, Octopia Order Management proceeds to a set of controls to ensure the order is valid. This includes for instance enriching the order with the appropriate data such as the logistic supply mode and commission fees, or controlling the stock and offer status. If and only if all controls are valid will the order be made available to you.

The order will then move through the different states below, according to the actions you perform and the order's supply mode:

Picture

The supply mode helps identifying the logistic funnel processing the order :

  • it may be a logistic partner of your choice connected to Octopia, in which case the supply mode value is "Fulfillment" : the status updates will then be provided by the partner itself

  • it may be yourself or logistic partner of your choice not connected to Octopia,  in which case the supply mode value is "Seller" : the status updates will then be provided by you

  • it may require a shipment of the products to an intermediary warehouse belonging to the sales channel, in which case the supply mode value is "Xdock" : the status updates will then be provided by the sales channel warehouse

Each order state has the following meaning:

  • WaitingAcceptance : if you chose to validate yourself your orders, you will first have to validate or refuse to fulfill the order 

  • Refused :  you refused to fulfill the order

  • Accepted : you validated your order and the information will be forwarded to the sales channel

  • inPreparation : this status is only available on Octopia orders with a "fulfillment" or "xdock" supply mode. It informs you your order is being prepared by the warehouse. For Cdiscount orders, they go to InPreparation when they are accepted by the seller and payment is OK. You must therefore dispatch Cdiscount orders with this status.

  • Shipped : it indicates the order has been collected by the carrier and is on its way to your customer

  • Delivered : the order has been delivered to your customer (please note that this status is not available yet)

  • CancelRequest : a cancelation request has been made on the order and is being processed by the system - it may be rejected, in which case the order state will be reset to its previous state

  • Cancelled : an order may be refunded at any time during its lifecycle, resulting into a "cancelled" status. A cancelation may be triggered because of logistic troubles, upon customer request raised through a discussion (see Discussion Management) or by the sales channel's Customer Services Department. 

Please note: not all sales channels allow manual acceptance, therefore the states "WaitingAcceptance" and "Refused" won't be available on all orders.

Order line management 

The Order Management  feature allows you to manage your orders at the item level according to the sales channel configuration.

For instance, if the sales channel allows order line management and you receive an order containing 2 items from this sales channel, you may ship one the item on a Monday and the second item the following day. You may also refuse only one of both items.

However, not all sales channels are capable of managing orders on item level yet and they may prefer to disable this feature. In which case, updates on item level are not allowed. This means you may only ship a complete order.

Please note: this sales channel configuration is not reversible. Once a sales channel decides to activate this feature, it will be active for all future status updates.

Picture

Order cancellation reasons

Important : In case of an order with a Fullfilment or Xdock line(s) the cancellation will be rejected.

You can find bellow a table sumarizing the cancellation reasons :

Order invoices

As a seller, you are in charge to create invoices for your customers, you might wonder how to share those invoices with your clients.

Now, the Sellers can upload directly invoices from the order section in the seller zone,

By the API POST/order-invoice-imports (bulk) or POST /orders/ {orderId}/invoice-documents (unitary).

Then, an asynchronous report to share an invoice upload status of success / reject will be available by API using GET/order-invoice/imports (bulk) or GET/order-invoice-imports/{importId} (unitary).

Endpoints

Get an order by identifier GET /orders/{orderid}

Response attributes : order id ; reference ; order line id ; sales channel id ; currency code ; adresses ; price ; taxes ; status ; delivery mode ; parcels numbers ; ...

Recommandations call frequency : As much as you want + Adapt your recovery filters according to your needs

Search orders using a set of filters GET /orders/"filters"

Response attributes : list of [ order id ; reference ; order line id ; sales channel id ; currency code ; adresses ; price ; taxes ; status ; delivery mode ; parcels numbers ; ...]

Recommandations call frequency : As much as you want + Adapt your recovery filters according to your needs

Ship an order or order lines POST /orders/{orderId}/shipments

Call attributes : parcelNumber ; carrierName ; trackingUrl ; orderLineIds (optional)

Response attributes : type ; status ; trace id ; errors

Recommandations call frequency : When needed

Request validation order
POST /orders/{orderNumber}/validate

Call attributes : "request": "Accepted"

Response attributes : type ; status ; trace id ; errors

Recommandations call frequency : when needed

Get cancellation reasons
GET /cancellation-reasons

Response attributes : type ; title ; status ; detail ; instance

Recommandations call frequency : Occasionally

Get existing total and partial cancellation GET /order-cancellation-requests

Call attributes : order id ; line id ; offer id ; sales channel ; pages

Response attributes : orderRequestType ; order id ; status ; lineId ; offerId ; shippingCostRefund ; raison ; salesChannel ; userType ; userid

Recommandations call frequency : When needed

Create a new total cancellation request
POST /order-cancellation-requests

Call attributes : order id ; reason ; shippingCostRefund

Response attributes : type ; status ; trace id ; errors

Recommandations call frequency : When needed