文档中心 > Miravia Open Platform

Miravia - DBS Order fulfillment process

更新时间:2023/02/20 访问次数:1631

Note:DBS (Delivery By Seller) feature is not available to all sellers.Only open to some sellers or brands

This tutorial will show you how to identify DBS type orders and use the Miravia fulfillment API to ship them.

The flow of API calls

1. Get OrderID and OrderItemID of new order

You can use GetOrders to retrieve a list of new orders and the order details. With Order ID of new order, you can use GetOrderItems to retrieve the product information of the order.

Response example (GetOrderItems)

{
    "data": [
        {
            ......
            "order_item_id": 33247176004,
            ......
            "order_id": 33247076004,
            "status": "pending",
            "warehouse_code": "dropshipping",
            "shipping_type": "Dropshipping",
            "created_at": "2022-08-01 14:47:30 +0800",
            "delivery_option_sof": 1,
            "updated_at": "2022-08-01 14:48:46 +0800",
            "currency": "EUR",
            "shipping_provider_type": "seller_own_fleet".
            ......
        }
    ],
    "code": "0",
    "request_id": "21038f5516593373640451144"
}

Tips :

  • Check the "delivery_option_sof" field in the response of GetOrderItems to confirm whether the item can be shipped using the DBS method, if the value of 1 means that the order item can be shipped in the DBS method, if the value is 0, the process cannot be used.
  • Use the “CreatedAfter” parameter to filter newly created orders.
  • Use the “Limit” and “Offset” parameters to set the number of orders returned.
  • Save the order IDs.

2. Packaged orders

Use the order item ids and order ids obtained in the first step to call the Pack API to pack the order item ids into a package.

Request example

{
    "pack_order_list": [
        {
            "order_item_list": [
                33247176004,33247176005
            ],
            "order_id": 33247076004
        }
    ],
    "delivery_type": "dropship",
    "shipping_allocate_type": "TFS"
}

Response example

{
    "result": {
        "data": {
            "pack_order_list": [
                {
                    "order_item_list": [
                        {
                            "order_item_id": 33247176004,
                            "item_err_code": "0",
                            "tracking_number": "SOF_33247076004",
                            "shipment_provider": "Delivered by Seller",
                            "package_id": "FP0900221001",
                            "retry": false
                        },
                        {
                            "order_item_id": 33247176005,
                            "item_err_code": "0",
                            "tracking_number": "SOF_33247076004",
                            "shipment_provider": "Delivered by Seller",
                            "package_id": "FP0900221001",
                            "retry": false
                        }
                    ],
                    "order_id": 33247076004
                }
            ]
        },
        "success": true
    },
    "code": "0",
    "request_id": "21038f5516593376367631145"
}

Tips :

  • Please fill in the shipping_allocate_type field with TFS.
  • The delivery_type field can only be filled with dropship.
  • DBS type orders do not require the "shipping_provider_code" field in this step, so please do not use this field.

3. Get shipping provider and Tracking number

You would need to call GetDBSShipmentProviders API to get the DBS shipping provider list to update the actual shipping provider of each parcel. Because you use the DBS method of shipping, the Miravia system will not automatically sense your package information.

Request example

{"sellerId":4000000176001}

Tips :

  • You can call the GetSeller API to get the seller id

Response example

{
    "result": {
        "data": {
            "shipment_providers": [
                {
                    "name": "Correos EXPRESS",
                    "provider_code": "DBSSP100000016"
                },
                {
                    "name": "SF3",
                    "provider_code": "DBSSP100000009"
                }
            ]
        },
        "success": true
    },
    "code": "0",
    "request_id": "211b500616593381296471086"
}

Tips :

4. Update shipping provider and Tracking number

Call the UpdateTrackingInfo API to upload your actual tracking number and shipping provider.

Request example

{
    "update_packages": [
        {
            "tracking_number": "9356463170722110",
            "package_id": "FP0900221001",
            "shipment_provider_code": "DBSSP100000016"
        }
    ]
}

Tips :

  • The package id can be obtained by checking the response of the second step or by calling GetOrderItems API

Response example

{
    "result": {
        "data": {
            "packages": [
                {
                    "item_err_code": "0",
                    "package_id": "FP0900221001",
                    "retry": false
                }
            ]
        },
        "success": true
    },
    "code": "0",
    "request_id": "211b500616593388491761088"
}

 

5. Set the order to RTS(Ready to ship) status

Call ReadyToShip API to update the order to RTS status.

Request example

{"packages":[{"package_id":"FP0900221001"}]}

Tips :

  • The package id can be obtained by checking the response of the second step or by calling GetOrderItems.
  • Once the order status is updated to RTS, the order will not be cancelled.
  • This API can be called only after the third step is completed.

Response example

{
    "result": {
        "data": {
            "packages": [
                {
                    "item_err_code": "0",
                    "package_id": "FP0900221001",
                    "retry": false
                }
            ]
        },
        "success": true
    },
    "code": "0",
    "request_id": "211b500616593408382921092"
}

6. Set the order to delivery or failed delivery status.

After your shipping provider have delivered the DBS parcels and buyers have accepted them , then you need to trigger parcels as delivered status through ConfirmDeliveryForDBS API .

If your shipping provider fail delivery the DBS parcels , then you need to trigger the parcels as failed delivered stauts through FailedDeliveryForDBS API.

Request example

{"packages":[{"package_id":"FP0900221001"}]}

Response example

{
    "result": {
        "data": {
            "packages": [
                {
                    "item_err_code": "0",
                    "package_id": "FP0900221001",
                    "retry": false
                }
            ]
        },
        "success": true
    },
    "code": "0",
    "request_id": "211b500616593408382921092"
}

Tips :

  • After calling the ConfirmDeliveryForDBS API, the order will be updated to shipped status and will be automatically updated to delivered status after 7 days.
  • This operation is not reversible, so please be careful calling these two APIs.
  • When using ConfirmDeliveryForDBS or FailedDeliveryForDBS calls, if the following error is returned "Package logistics information is tracked by ARISE and cannot be updated manually!" ,the reason is that: If our platform can identify the tracking number and can track it,in order to make the logistics status more accurate, then the platform will not allow you to delivered and the platform will update the order status based on the tracking number. Which can be understood as follows:
    DBS parcels,
    -if the platform can not track logistics information, it can be delivered or failed deliveried by seller themselves.
    -if the platform can track logistics information, it can not be delivered or failed deliveried by seller themselves.

FAQ

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