Recommended integration flow
The Order API offers several different ways of retrieving new orders via its endpoints. The most obvious one isGET /merchant/orders/new. This endpoint has been designed specifically to provide an easy-to-use entry point to retrieving marketplace orders.
Below, a suggestion of basic workflow to retrieve orders via the API.
step 1 - Set up your request
Add query parameters:- if you let Neteven manage the automatic order validation/cancelation, add the
status=TO SHIPquery parameter - if you have activated Marketplace fulfillment features, you can chose to exclude these orders with the
include_marketplace_fulfilled_orders=falsequery parameter (default value) - only use the
marketplace_idsquery parameter if you need a separate integration process per marketplace
Get new orders
step 2 - Parse the response body
- in the
responsebody, you will be able to know how many order objects correspond to your query by looking into thereponse.metadata.total_countattribute. - If that count exceeds your limit, you can call repeatedly, using the
offsetquery parameter to browse through the results until you recuperated them all (or simply update order items and query again until you no longer have results). - Integrate orders and order items into your system
step 3 - acknowledge received orders
- Acknowledging orders does not send messages to marketplaces or customer, but simply allows the Neteven API to know that these orders no longer need to be included in the
GET /merchant/orders/newresponse. - For each individual
order_line, send aPATCH /orders/lines/ackrequest including its correspondingmerchant_order_line_id - If you do not have an internal identifier for order items, you can send any other value as the
merchant_order_line_id(example: sending theneteven order_line_id)
acknowledge order line
reponse
order_line_id: 9811700has been acknowledged. It will no longer show in the response of the GET /merchant/orders/new response.
- repeat this process until every order line is properly integrated into your system and acknowledged.
step 4 - update order line statuses
Once orders are processed on your side, you might want to confirm / cancel / ship or refund specific items.Since every Marketplace has its own restrictions in terms of order management workflow, you should design your integration with the order API in a way that allows for specific changes based on the Marketplace of origin.
- loop through open order lines on your side and send confirm / cancel / ship / refund status update requests.
- After a certain amount of time (usually 15 to 30 minutes), you can interrogate the API to get the status of the request, and have the final confirmation of the successful (or failed) attempt to update the order line status.
PATCH /merchant/orders/lines/ship on a given order_line_id 98811700:
response
- Note that every status update is actually an asynchroneous process, which is notified by the
202 AcceptedHTTP status code:
the API confirms that the status update request was properly registered, but Neteven needs to pass it on to the actual Marketplace via downstream systems before it can confirm the request was successful. - After waiting a while, you can call the GET /merchant/orders/lines/status endpoint to check if your request was accepted by the Marketplace:
check order line status request
response
- The
data.order_line_status.status_currentattribute shows the last valid status on that specific order line. It is different from the desired statusSHIPPEDbecause the status change request has yet to be accepted by the marketplace. - The
status_requestbloc in the response shows that the action is stillPENDING, which means that Neteven is awaiting confirmation from the Marketplace system that the request was accepted. - In this instance, you should wait some time and call again until
data.order_line_status.status_request.stateis equal toSUCCESSorFAILED. - If the action failed, you can have more information in the
messageattribute. - If the state ends in
SUCCESS, you can consider the action done, and in this instance the order_line asSHIPPED. Thestatus_currentvalue will be update to its new status.
refund status request if there was a customer return.
Getting Marketplace fulfilled orders
In some instances, you might want to filter in/out orders fulfilled by Marketplaces. Please find below some use case and how to solve them:- ***I want to retrieve ZFS orders (***fulfilled by Zalando) regardless of their status and regardless of whether I have already retrieved them.
-> You want to use theGET /ordersand use thefulfilment_typefilter combined with the list ofmarketplace_idscorresponding to Zalando Marketplaces
->GET /orders?fulfillment_type=FulfilledByMarketplace&marketplace_ids=37,47,... - I only want to retrieve orders that I have already shipped myself
-> You want to use theGET /ordersand use thefulfilment_typefilter combined with thestatusfilter as “SHIPPED”
->GET /orders?fulfillment_type=FulfilledByMerchant&status=SHIPPED - I want to retrieve FBA (fulfilled by Amazon) orders only once and already shipped
-> If you do not want to retrieve the same orders many time, you can still use theGET /orders, combining several filters :fulfilment_type,marketplace_ids(with Amazon marketplace ids), thestatusas “SHIPPED” and theacknowledgedfilter asfalse
->GET /orders?fulfillment_type=FulfilledByMarketplace&status=SHIPPED&acknowledged=false&marketplace_ids=7,58,29->then do a PATCH /order/line/ackon theorder_linesincluded in the response body. - I want to exclude marketplace fulfilled orders from the new orders I fetch
-> You can call the standard call with the added parameter to filter out the marketplace fulfilled_orders.GET /orders/new?fulfillment_type=FulfilledByMerchant
Important things to keep in mind
Important: Note that the order API works at the lowest level which is the
order_line. That means that if you want to update an entire order as shipped, you must update every one of its order_lines as such via the PATCH /merchant/orders/lines/ship method.This design choice was made to ensure a uniform workflow across all Marketplace orders.Although the Merchant API is build with a standardized structure regardless of the channel your account is live on, there might still be Marketplace specific workflows and content within the order management process.
You should design your integration with the Neteven API in a way that limits the unnecessary or redundant requests to the API. For example, there is no need to check the state of an order_line status change request every minute considering that the average time for the whole process (from Neteven to Marketplace including response) is usually 30 to 60 minutes long.

