文档中心 > Miravia Open Platform

3. Order Cancelation

更新时间:2023/10/05 访问次数:223

3. Order Cancelation

Update: Miravia will support user to initiate an order cancellation request after the order status "ready to ship". This tutorial will describe which APIs to call to cancel unshipped orders for seller reasons.


Flow:

image

3.1. Step 1. Call the GetOrderItems or GetMultipleOrderItems API


API documentation

Call the GetOrderItems or or GetMultipleOrderItems API with the parameter ‘status’:

  • When status=to_respond, the order cancellation request is waiting seller to respond.
  • When status=rejected, the order cancellation request has been rejected by seller.
  • When status=canceled, the order cancellation request has been agreed by seller.

3.2. Step 2: Call the OrderCancelValidate API


API documentation

Before canceling an order, you also need to confirm whether the current order can be cancelled and what are the available reasons for cancellation, so you need to call the OrderCancelValidate API.

If the status of the order item you need to cancel is not Pending\Packed\ReadyToShip, then you cannot cancel the order item.


Response demo:


{

    "data": {

        "tip_content": "SKU stock may be set to 0* after cancellation due to reasons: ‘out of stock’ or ‘incorrect pricing’, to prevent new orders while you adjust your stock/pricing. You can adjust your stock back up at any time. This adjustment will not impact existing orders. Note that cancellations can impact your ability to sell on Lazada if not managed carefully.\n\n*For more information, please view Seller Cancellation Policy page",

        "reason_options": [

            {

                "reason_name": "Sourcing Delay",

                "reason_id": "10000019"

            },

            {

                "reason_name": "Out of Stock",

                "reason_id": "10000021"

            },

            {

                "reason_name": "Wrong Price or Pricing Error",

                "reason_id": "10000023"

            }

        ],

        "tip_type": "warning"

    },

    "code": "0",

    "request_id": "2101069616872400092505868"

}


3.3. Step 3: Process order cancellation request: canApplyCancellationForSeller


API documentation

If you want to cancel an order, you need to use this method in advance to determine whether the current order status and fulfillment order status support cancellation. If fulfillment order is before RTS(ready to ship) , you can cancel the order directly without calling this method. If fulfillment order is RTS, you need call this service.

1When you operate the request of agreeing to cancel the order, you will call interface: /order/reverse/canApplyCancellationForSeller,whose parameters of canCancel is true.


2When you operate the request of refusing to cancel the order, you will use the same interface: /order/reverse/canApplyCancellationForSeller, whose parameters of canCancel is false.


When you operate the request of refusing to cancel an order, you need to pass in the reason for the rejection. To get reasons of rejection uses the interface: /order/reverse/reason/list.


Response:


{
  "code": "0",
  "data": {
    "tradeOrderId": "1",
    "canCancellationTradedOrderLines": [
      {
        "tradeOrderLineId": "1",
        "canCancel": "true"
      }
    ]
  },
  "request_id": "0ba2887315178178017221014"
}


FAQ

关于此文档暂时还没有FAQ
返回
顶部