注意:以下文档只适用于TOP接口,请谨慎使用!

文档中心 > Miravia Open Platform

[New] Endpoint Orders

更新时间:2024/03/07 访问次数:482

Introduction

Update on Endpoint Order Management:

With this latest update, our endpoint management undergoes a transformative evolution, emphasizing a seamless and enriched developer experience.

We have introduced four new endpoints specifically for order handling, covering both DBS and DBM functionalities, including reverse & refund and cancel operations.

New endpoints:

  1. /v2/order/fulfill
  2. /v2/order/cancel
  3. /v2/order/returnRefund/accept
  4. /v2/order/returnRefund/reject


1. Order Fulfillment Endpoint:

    • Path: /v2/order/fulfill
    • Description: Order fulfillment endpoint.
    • This API will make the transition from "to Pack" orders to "to Handover" , and have the same behavior when you click the "pack & print" button.

image.png



1.1. Delivery by seller (DBS):


As it is currently done in the seller center, when an order is transitioned to 'Pack,' it is necessary to add the PL provider and the tracking number of the order. Therefore, in the API, it is necessary to send the same parameters:

{
  "order_id":  "3241804772774",
  "order_item_id_list": [3241804872774],
  "shipping_provider_code": "DBSSP100000358",
  "tracking_number":"3184279271540910191"
}
{
  "errorMessage": "",
  "hasSystemError": false,
  "errorCode": "",
  "data": [
    {
      "order_id": 3241804772774,
      "order_item_id": 3241804872774,
      "baseErrorList": null,
      "status": "SUCCESS",
      "package_id": "FP000611673001",
      "label_url": null
    }
  ],
  "errors": []
}

Seller center:

image

image


1.2. Delivery By Miravia (DBM)

DBM is a comprehensive logistics offering that allows Miravia to manage your online fulfillment, shipping_Provider_Code" and "tracking_Number" is not need it.

1.2.1. Example:

Request:

{
    "order_id":  "123456789",
    "order_item_id_list": ["12345", "56789"]
}

Response:

{
    "data": [
        {
            "order_item_id": 3633109072774,
            "package_id": "FP000612730016",
            "order_id": 3633108972774,
            "status": "SUCCESS"
        },
        {
            "order_item_id": 3633109172774,
            "package_id": "FP000612730016",
            "order_id": 3633108972774,
            "status": "SUCCESS"
        }
    ],
    "errors": [],
    "code": "0",
    "request_id": "21039eb717091167550512284"
}

2. Order Cancellation Endpoint:

2.1. Cancelled an order

    • Path: /v2/order/cancel
    • Description: Order cancellation endpoint.
    • Parameters:
      • OrderId
      • OrderItemIdList
      • ReasonID:
        • [18001]-There is no stock available for this item,
        • [18003]-A pricing error occurred with the item,
        • [18005]-Customer request for item cancellation,
        • [18007]- Issue with the provided delivery address
{
    "order_id": "3633108972774",
    "cancel_input_data_list": [
        {
            "order_item_id": "3633109072774",
            "reason_id": "18003"
        }
    ]
}

Response:

    "data": [
        {
            "order_item_id": 3633109072774,
            "order_id": 3633108972774,
            "status": "SUCCESS"
        }
    ],
    "errors": [],
    "code": "0",
    "request_id": "21039eb717091168351882290"
}

image.png


3. Refund & Reverse order endpoints

3.1. Reject Reverse Orders Endpoint

    • Path:/v2/order/returnRefund/reject
    • Description: This function is intended to decline refund and reservation requests, as well as cancelation requests from buyers, particularly where the order has reached the "Ready to Ship" status.


3.1.1. Reject a refund requested by buyer:

Parameters:

  • OrderId (mandatory)
  • OrderItemIdList(mandatory)
  • comment(mandatory)
  • reasonId: (mandatory)
    • ITEM_NOT_DAMAGED(1007, "Item is not damaged/defective as claimed by customer")
  • Image list(mandatory)


Request:

{
    "order_id": "3633108672774",
    "reject_input_data_list": [
        {
            "order_item_id": "3633108872774",
            "comment": "comment to let buyer know about the rejections",
            "reason_id": "1007",
            "image_list": [
                {
                    "image_name": "image name",
                    "image_url": "https://citizengo.org/sites/default/files/images/test_3.png"
                }
            ]
        }
    ]
}

Response:

{
    "data": [
        {
            "refund_amount": 47,
            "order_id": 3633108972774,
            "status": "SUCCESS"
        }
    ],
    "errors": [],
    "code": "0",
    "request_id": "21039eb717091171680592404"
}


Seller Side:

Screenshot 2024-03-05 at 11.30.22.png

image.png

3.2.1. Reject the cancellation request by buyer:

Used for responsed a buyer cancellation request. After Buyer send a cancellation request, seller can use this call to response.

Parameters:

  • OrderId (mandatory)
  • OrderItemIdList(mandatory)
  • comment
  • reasonId: (mandatory)
    • ALREADY_HAND_OVER(1019, "Already hand over to 3PL"),
    • LOGISTIC_INFO_UPDATED(1020, "Logistic information has updated"),
    • BUYER_ASK_CANCEL(1021, "Buyer ask to cancel the request"),
    • OTHERS(1022, "Others"),
  • ImageList:
    • ImageName
    • ImageUrl



Request:

{
  "order_id":  "3291401072774",
  "reject_input_data_list": [
    {
      "order_item_id": 3291401172774,
      "comment": "No ok",
      "reason_id": 1021,
      "image_list":[
        {
          "image_name":"test",
          "image_url": "https://citizengo.org/sites/default/files/images/test_3.png"
        }
      ]
    }
  ]
}


Response:

{
  "errorMessage": "",
  "hasSystemError": false,
  "errorCode": "",
  "data": [
    {
      "order_Id": 3291401072774,
      "order_Item_Id": null,
      "baseErrorList": null,
      "status": "SUCCESS",
      "refundAmount": null
    }
  ],
  "errors": []
}


3.2. Accept Reverse Orders Endpoint:

    • Path:/v2/order/returnRefund/accept
    • Description: Use to accept the Refund and reverse requested from buyers

Parameters:

  • OrderId(mandatory)
  • OrderItemIdList(mandatory)
  • refundAmount(mandatory)

3.2.1. Example

Request:

{
    "order_id": "3633108972774",
    "accept_input_data_list": [
        {
            "refund_amount": "47.5",
            "order_item": "3633109172774"
        }
    ]
}


Response:

{
    "data": [
        {
            "refund_amount": 47,
            "order_id": 3633108972774,
            "status": "SUCCESS"
        }
    ],
    "errors": [],
    "code": "0",
    "request_id": "21039eb717091171680592404"
}

3.2.1. Accept the cancellation request by buyer:


Parameters:

  • OrderId(mandatory)
  • OrderItemIdList(mandatory)
  • refundAmount(mandatory)
{
    "order_Id":  "3246302572774",
    "order_Item_Id_List": [3246302672774],
    "refundAmount": "19.46"
}
{
    "errorMessage": "",
    "hasSystemError": false,
    "errorCode": "",
    "data": [
        {
            "order_Id": 3246302572774,
            "order_Item_Id": 3246302672774,
            "baseErrorList": null,
            "status": "SUCCESS",
            "refundAmount": 19.46
        }
    ],
    "errors": []
}
Cancellation is accepted by the seller and refundis being processed:

image

FAQ

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