Files
ttx-project-doc/出库单接口文档/Shopee Automation Vendor 接口json示例.md
T

73 KiB

Shopee Automation Vendor 接口json示例

入库模块接口协议

2.1 入库单据下发到Vendor

URL: /api/v2/automation/tovendor/inbound/order/create_inbound_order

Request

{
  "whs_id": "SGL",
  "task_info": {
    "task_id": "PASGL0002602040041",
    "device_id": "IBB158173",
    "source_no": "",
    "task_type": 1,
    "task_status": 20,
    "task_version": 1,
    "task_priority": 2,
    "is_urgent": 0,
    "specify_uid": 0,
    "on_hold": 0,
    "ctime": 1770189066,
    "ongoing_time": 1770189074,
    "done_time": 0,
    "sku_info_list": [
      {
        "sku_id": "1698291518489_02257",
        "batch_id": "PA81636",
        "sheet_id": "INSGL0002602040015",
        "batch_no": "2026020400006138",
        "total_qty": 10,
        "putaway_qty": 0,
        "uid_list": null
      }
    ]
  },
  "batch_info_list": [
    {
      "batch_no": "2026020400006138",
      "inbound_id": "INSGL0002602040015",
      "inbound_date": 1770163200,
      "sku_quality": 0,
      "origin_whs_id": "SGL",
      "supplier_id": "1649671406",
      "supplier_name": "Mitra Internasional Indonesia",
      "production_date": 1770076800,
      "expiration_date": 1801612800,
      "block_type": 0,
      "mbn": "",
      "ctime": 1770189063,
      "mto_block_type": 0
    }
  ]
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {}
}

2.2 WMS给Vendor下发单据变更接口

URL: /api/v2/automation/tovendor/inbound/order/update_inbound_order

Request

{
  "whs_id": "SGL",
  "new_version": 2,
  "update_type": 0,
  "task_info": {
    "task_id": "PASGL0002602040041",
    "device_id": "IBB158173",
    "source_no": "",
    "task_type": 1,
    "task_status": 20,
    "task_version": 1,
    "task_priority": 2,
    "is_urgent": 0,
    "specify_uid": 0,
    "on_hold": 0,
    "ctime": 1770189066,
    "ongoing_time": 1770189074,
    "done_time": 0,
    "sku_info_list": [
      {
        "sku_id": "1698291518489_02257",
        "batch_id": "PA81636",
        "sheet_id": "INSGL0002602040015",
        "batch_no": "2026020400006138",
        "total_qty": 8,
        "putaway_qty": 0,
        "uid_list": null
      }
    ]
  }
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {}
}

2.3 WMS向Vendor下发单据查询接口

Request

{
    "whs_id": "SGL",
    "task_id_list": [
        "PASGL0002602040041",
        "PASGL0002602040042",
        "PASGL0002602040043"
    ]
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {
        "total": 3,
        "task_list": [
            {
                "task_id": "PASGD0002603170003",
                "device_id": "B149752",
                "source_no": "",
                "task_type": 1,
                "task_status": 80,
                "task_version": 1,
                "task_priority": 1,
                "is_urgent": 0,
                "specify_uid": 0,
                "on_hold": 0,
                "ctime": 1773719847,
                "ongoing_time": 1773726970,
                "done_time": 1773729029,
                "sku_info_list": [
                    {
                        "sku_id": "3700147707_2000606317",
                        "batch_id": "PASGD0002603170003-2026031700006654",
                        "batch_no": "2026031700006654",
                        "total_qty": 2000,
                        "putaway_qty": 2000,
                        "uid_list": null
                    },
                    {
                        "sku_id": "3700147707_2000606317",
                        "batch_id": "PASGD0002603170003-2026031700006754",
                        "batch_no": "2026031700006754",
                        "total_qty": 6000,
                        "putaway_qty": 6000,
                        "uid_list": null
                    }
                ]
            },
            {
                "task_id": "PASGD0002603170004",
                "device_id": "B149751",
                "source_no": "",
                "task_type": 1,
                "task_status": 80,
                "task_version": 1,
                "task_priority": 1,
                "is_urgent": 0,
                "specify_uid": 0,
                "on_hold": 0,
                "ctime": 1773719865,
                "ongoing_time": 1773726476,
                "done_time": 1773729067,
                "sku_info_list": [
                    {
                        "sku_id": "3700147707_2000606317",
                        "batch_id": "PASGD0002603170004-2026031700006854",
                        "batch_no": "2026031700006854",
                        "total_qty": 4000,
                        "putaway_qty": 4000,
                        "uid_list": null
                    }
                ]
            },
            {
                "task_id": "PASGD0002603170023",
                "device_id": "B149745",
                "source_no": "",
                "task_type": 1,
                "task_status": 80,
                "task_version": 1,
                "task_priority": 1,
                "is_urgent": 0,
                "specify_uid": 0,
                "on_hold": 0,
                "ctime": 1773723097,
                "ongoing_time": 1773727846,
                "done_time": 1773728952,
                "sku_info_list": [
                    {
                        "sku_id": "3700147707_2000606317",
                        "batch_id": "PASGD0002603170023-2026031700005954",
                        "batch_no": "2026031700005954",
                        "total_qty": 1000,
                        "putaway_qty": 1000,
                        "uid_list": null
                    }
                ]
            }
        ]
    }
}

2.4 Vendor向WMS请求入库任务接口

URL: /api/v2/automation/toshopee/inbound/order/get_inbound_order

Request

{
  "whs_id": "SGL",
  "search_key": "IBB158174",
  "operator": "hui.zhu@shopee.com"
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {
        "task_info": {
            "task_id": "PASGL0002601290001",
            "device_id": "IBB158174",
            "source_no": "",
            "task_type": 1,
            "task_status": 20,
            "task_version": 1,
            "task_priority": 1,
            "is_urgent": 0,
            "specify_uid": 0,
            "on_hold": 0,
            "ctime": 1769668693,
            "ongoing_time": 1769668708,
            "done_time": 0,
            "sku_info_list": [
                {
                    "sku_id": "1488175_0",
                    "batch_id": "PA81509",
                    "sheet_id": "INSGL0002601290011",
                    "batch_no": "2026012900008138",
                    "total_qty": 9,
                    "putaway_qty": 0,
                    "uid_list": [
                        {
                            "unit_id": "202601290009",
                            "stock_status": 0
                        },
                        {
                            "unit_id": "202601290008",
                            "stock_status": 0
                        },
                        {
                            "unit_id": "202601290007",
                            "stock_status": 0
                        },
                        {
                            "unit_id": "202601290006",
                            "stock_status": 0
                        },
                        {
                            "unit_id": "202601290005",
                            "stock_status": 0
                        },
                        {
                            "unit_id": "202601290004",
                            "stock_status": 0
                        },
                        {
                            "unit_id": "202601290003",
                            "stock_status": 0
                        },
                        {
                            "unit_id": "202601290001",
                            "stock_status": 0
                        },
                        {
                            "unit_id": "202601290000",
                            "stock_status": 0
                        }
                    ]
                }
            ]
        },
        "batch_info_list": [
            {
                "batch_no": "2026012900008138",
                "inbound_id": "INSGL0002601290011",
                "inbound_date": 1769644800,
                "sku_quality": 0,
                "origin_whs_id": "SGL",
                "supplier_id": "1649671406",
                "supplier_name": "Mitra Internasional Indonesia",
                "production_date": 1769558400,
                "expiration_date": 1802476800,
                "block_type": 0,
                "mbn": "",
                "ctime": 1769668690,
                "mto_block_type": 0
            }
        ]
    }
}

2.5 Vendor向WMS反查入库任务接口

URL: /api/v2/automation/toshopee/inbound/order/search_inbound_order_list

Request

{
    "whs_id": "SGL",
    "task_id_list": [
        "PASGL0002602040041",
        "PASGL0002602040042",
        "PASGL0002602040043"
    ]
}

Response

{
  "total": 3,
  "task_list": [
    {
      "task_id": "PASGL0002602040041",
      "device_id": "IBB158171",
      "source_no": "",
      "task_type": 1,
      "task_status": 20,
      "task_version": 1,
      "task_priority": 2,
      "is_urgent": 0,
      "specify_uid": 0,
      "on_hold": 0,
      "ctime": 1770189066,
      "ongoing_time": 1770189074,
      "done_time": 0,
      "sku_info_list": [
        {
          "sku_id": "1698291518489_02257",
          "batch_id": "PA81631",
          "sheet_id": "INSGL0002602040015",
          "batch_no": "2026020400006138",
          "total_qty": 10,
          "putaway_qty": 0,
          "uid_list": null
        }
      ]
    },
    {
      "task_id": "PASGL0002602040042",
      "device_id": "IBB158172",
      "source_no": "",
      "task_type": 1,
      "task_status": 20,
      "task_version": 1,
      "task_priority": 2,
      "is_urgent": 0,
      "specify_uid": 0,
      "on_hold": 0,
      "ctime": 1770189066,
      "ongoing_time": 1770189074,
      "done_time": 0,
      "sku_info_list": [
        {
          "sku_id": "1698291518489_02257",
          "batch_id": "PA81632",
          "sheet_id": "INSGL0002602040015",
          "batch_no": "2026020400006138",
          "total_qty": 10,
          "putaway_qty": 0,
          "uid_list": null
        }
      ]
    },
    {
      "task_id": "PASGL0002602040043",
      "device_id": "IBB158173",
      "source_no": "",
      "task_type": 1,
      "task_status": 20,
      "task_version": 1,
      "task_priority": 2,
      "is_urgent": 0,
      "specify_uid": 0,
      "on_hold": 0,
      "ctime": 1770189066,
      "ongoing_time": 1770189074,
      "done_time": 0,
      "sku_info_list": [
        {
          "sku_id": "1698291518489_02257",
          "batch_id": "PA81633",
          "sheet_id": "INSGL0002602040015",
          "batch_no": "2026020400006138",
          "total_qty": 10,
          "putaway_qty": 0,
          "uid_list": null
        }
      ]
    }
  ]
}

2.6 Vendor向WMS校验uid接口

URL: /api/v2/automation/toshopee/inbound/order/check_uid

Request

{
  "whs_id": "SGL",
  "task_id": "PASGL0002602040041",
  "task_type": 1,
  "sku_id": "1698291518489_02257",
  "unit_id": "uid1",
  "operator": "hui.zhu@shopee.com"
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {}
}

2.7 Vendor向WMS提交库存过账接口

URL: /api/v2/automation/toshopee/inbound/order/submit_putaway

Request

{
    "whs_id": "SGL",
    "task_id": "PASGL0002601210141",
    "task_type": 3,
    "request_id": "uuid-1",
    "putaway_type": 13,
    "operator": "hui.zhu@shopee.com",
    "sku_list": [
        {
            "sku_id": "1768970346028_09104",
            "batch_id": "PA81341",
            "sheet_id": "MISGL0002601210043",
            "batch_no": "2026012100010538",
            "total_qty": 3,
            "putaway_qty": 1,
            "submit_qty":1,
            "uid_list": null
        },
        {
            "sku_id": "1768970347667_08231",
            "batch_id": "PA81342",
            "sheet_id": "MISGL0002601210043",
            "batch_no": "2026012100010638",
            "total_qty": 3,
            "putaway_qty": 0,
            "submit_qty":2,
            "uid_list": null
        }
    ]
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {
        "task_status": 20,
        "err_list": null
    }
}

2.8 Vendor向WMS下发单据状态变更接口

URL: /api/v2/automation/toshopee/inbound/order/update_inbound_status

Request

{
    "whs_id": "SGL",
    "task_id": "PASGL0002601210141",
    "task_type": 3,
    "task_status": 80,
    "operator": "hui.zhu@shopee.com",
    "sku_list": [
        {
            "sku_id": "1768970346028_09104",
            "batch_id": "PA81341",
            "sheet_id": "MISGL0002601210043",
            "batch_no": "2026012100010538",
            "total_qty": 3,
            "putaway_qty": 2,
            "uid_list": null
        },
        {
            "sku_id": "1768970347667_08231",
            "batch_id": "PA81342",
            "sheet_id": "MISGL0002601210043",
            "batch_no": "2026012100010638",
            "total_qty": 3,
            "putaway_qty": 2,
            "uid_list": null
        }
    ]
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {}
}

出库模块接口协议

3.1 销售出库自动化SubPickingTask

3.1.1 WMS给Vendor下发拣货任务

URL: /api/v2/automation/tovendor/outbound/salesorder/create_sub_picking_task

Request

{
   "can_group_picking":1,
   "ctime":1767751167,
   "cut_off_time":1767751167,
   "group_key":"",
   "multi_attr_list":[
      // 示例的属性不全,查看接口文档的keys
      {
         "attr_key":"channel_id",
         "attr_value_list":[
            {
               "attr_value_id":"30005",
               "attr_value_name":"SPX"
            },
            {
               "attr_value_id":"30006",
               "attr_value_name":"SPD"
            }
         ]
      }
   ],
   "purchase_time":1767837541,
   "ship_by_date":1767837541,
   "single_attr_list":[
         // 示例的属性不全,查看接口文档的keys
      {
         "attr_key":"max_order_size",
         "attr_value_id":"1",
         "attr_value_name":"large"
      }
   ],
   "sku_info_list":[
      {
         "block_type":0,
         "qty":10,
         "quality":0,
         "sku_id":"1767751294820_08379"
      }
   ],
   "sub_pickup_id":"202104220002_0",
   "urgent_flag":1,
   "whs_id":"SGL",
   "ticket_type": 1
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {}
}

3.1.2 WMS取消拣货任务

URL: /api/v2/automation/tovendor/outbound/salesorder/cancel_sub_picking_task

Request

{
   "sub_pickup_id":"202104220002_0",
   "whs_id":"SGL"
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {}
}

3.1.3 WMS向Vendor更新订单/task的urgent flag

URL: /api/v2/automation/tovendor/outbound/salesorder/update_task_flag

Request

{
    "ticket_number_list": [
        "202104220002_0"
     ],
     "biz_type": 1,
    "ticket_type": 1,
    "urgent_flag": 1,
    "whs_id": "SGL"
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {}
}

3.1.4 Vendor绑定/解绑device(空占)【复用basic接口】

3.1.5 Vendor开始拣货任务

URL: /api/v2/automation/toshopee/outbound/salesorder/start_picking_task

Request

{
   "operator":"tangjian.ouyang@shopee.com",
   "pick_type":1,
   "station_type":1,
   "sub_pickup_id":"202104220002_0",
   "wave_type":0,
   "whs_id":"SGL"
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {}
}

3.1.6 Vendor实绑拣货任务

URL: /api/v2/automation/toshopee/outbound/salesorder/bind_picking_task

Request

{
   "device_id":"OPBSK11873",
   "grid_no":"Hik-A-1-1",
   "operator":"tangjian.ouyang@shopee.com",
   "station_type":1,
   "sub_pickup_id":"202104220002_0",
   "whs_id":"SGL"
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {}
}

3.1.7 Vendor增量拣货明细

URL: /api/v2/automation/toshopee/outbound/salesorder/sync_picking_detail

Request

{
   "sub_picking_task_list":[
      {
         "picked_info_list":[
            {
               "id":"1",
               "device_id":"OPBSK11873",
               "sku_id":"1767751294820_08379",
               "batch_no":2026010600001134,
               "unit_list":[
                  {
                     "unit_id":"8u118",
                     "scan_time":1767751167
                  }
               ],
               "qty":1,
               "ctime":1767751167,
               "code":"8u118",
               "operator":"tangjian.ouyang@shopee.com"
            }
         ],
         "sub_pickup_id":"202104220002_0"
      }
   ],
   "whs_id":"SGL"
}

Response

{
   "data":{
      "failed_list":[
      ],
      "success_list":[
         "202104220002_0"
      ]
   },
   "message":"success",
   "retcode":0
}

3.1.8 Vendor发起换箱(不产生新任务)

URL: /api/v2/automation/toshopee/outbound/salesorder/change_picking_device

Request

{
   "from_device_id":"OPBSK11873",
   "picked_info_list":[
      {
         "id":"1",
         "device_id":"OPBSK11873",
         "sku_id":"1767751294820_08379",
         "batch_no":2026010600001134,
         "unit_list":[
            {
               "unit_id":"8u118",
               "scan_time":1767751167
            }
         ],
         "qty":1,
         "ctime":1767751167,
         "code":"8u118",
         "operator":"tangjian.ouyang@shopee.com"
      }
   ],
   "station_type":1,
   "sub_pickup_id":"202104220002_0",
   "to_device_id":"OPBSK11874",
   "whs_id":"SGL",
   "operator":"tangjian.ouyang@shopee.com"
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {}
}

3.1.9 Vendor完成拣货任务

URL: /api/v2/automation/toshopee/outbound/salesorder/complete_picking_task

Request

{
   "picked_info_list":[
      {
         "id":"1",
         "device_id":"OPBSK11873",
         "sku_id":"1767751294820_08379",
         "batch_no":2026010600001134,
         "unit_list":[
            {
               "unit_id":"8u118",
               "scan_time":1767751167
            }
         ],
         "qty":1,
         "ctime":1767751167,
         "code":"8u118",
         "operator":"tangjian.ouyang@shopee.com"
      }
   ],
   "sub_pickup_id":"202104220002_0",
   "whs_id":"SGL",
   "operator":"tangjian.ouyang@shopee.com"
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {}
}

3.1.10 Vendor请求流程指引

URL: /api/v2/automation/toshopee/outbound/salesorder/search_picking_process_guide

Request

{
   "sub_pickup_id":"202104220002_0",
   "whs_id":"SGL"
}

Response

{
    "data": {
        "custom_message": "Put Outbound Merging Station"
    },
    "message": "success",
    "retcode": 0
}

3.1.11 查询Vendor拣货任务列表【出库通用对账查询vendor接口】

URL: /api/v2/automation/tovendor/outbound/salesorder/query_picking_detail

Request

{
    "task_id_list": [
        "202104220002_0"
    ],
    "task_type": 1,
    "whs_id": "SGL"
}

Response

{
   "data":{
      "task_info_list":[
         {
            "picked_info_list":[
               {
                  "id":"1",
                  "device_id":"OPBSK11873",
                  "sku_id":"1767751294820_08379",
                  "batch_no":2026010600001134,
                  "unit_list":[
                     {
                        "unit_id":"8u118",
                        "scan_time":1767751167
                     }
                  ],
                  "qty":1,
                  "ctime":1767751167,
                  "code":"8u118",
                  "operator":"tangjian.ouyang@shopee.com",
                  "sheet_number":"OBSGL000260101081110"
               }
            ],
            "shortage_info_list":[
               {
                  "id":"2",
                  "device_id":"OPBSK11873",
                  "sku_id":"1767751294820_08379",
                  "batch_no":2026010600001134,
                  "unit_list":[
                     {
                        "unit_id":"8u119",
                        "scan_time":1767751167
                     }
                  ],
                  "qty":1,
                  "ctime":1767751167,
                  "code":"8u119",
                  "operator":"tangjian.ouyang@shopee.com",
                  "sheet_number":"OBSGL000260101081111"
               }
            ],
            "status":1,
            "task_id":"202104220002_0",
            "vendor_status":37,
            "zero_info_list":[
               "OBSGL000260101081112"
            ]
         }
      ]
   },
   "message":"success",
   "retcode":0
}

3.2 销售出库自动化Order

3.2.1 WMS给Vendor下单

URL: /api/v2/automation/tovendor/outbound/salesorder/create_order

Request

{
    "ticket_type": 2,
    "whs_id": "SGD",
    "order_number": "OBSGD000260204000012",
    "can_group_picking": 1,
    "group_key": "",
    "urgent_flag": 1,
    "cut_off_time": 1738886400,
    "ctime": 1738800000,
    "ship_by_date": 1738972800,
    "purchase_time": 1738713600,
    "single_attr_list": [
        {
            "attr_key": "service_code",
            "attr_value_id": "STANDARD",
            "attr_value_name": "STANDARD"
        },
        {
            "attr_key": "channel_id",
            "attr_value_id": "CH001",
            "attr_value_name": "Shopee Express"
        },
        {
            "attr_key": "fulfillment_chain_id",
            "attr_value_id": "FC001",
            "attr_value_name": "Singapore Standard Fulfillment"
        },
        {
            "attr_key": "order_structure",
            "attr_value_id": "1",
            "attr_value_name": "MSAQ"
        },
        {
            "attr_key": "order_size",
            "attr_value_id": "2",
            "attr_value_name": "Normal"
        },
        {
            "attr_key": "shop_group",
            "attr_value_id": "SG001",
            "attr_value_name": "Singapore Default Group"
        },
        {
            "attr_key": "parcel_id",
            "attr_value_id": "1770189747819463",
            "attr_value_name": "1770189747819463"
        },
        {
            "attr_key": "lm_tracking_no",
            "attr_value_id": "177018974869",
            "attr_value_name": "177018974869"
        },
        {
            "attr_key": "pickup_region",
            "attr_value_id": "SG",
            "attr_value_name": "SG"
        },
        {
            "attr_key": "delivery_region",
            "attr_value_id": "SG",
            "attr_value_name": "SG"
        },
        {
            "attr_key": "sls_tracking_no",
            "attr_value_id": "SG1770189748447",
            "attr_value_name": "SG1770189748447"
        },
        {
            "attr_key": "lane_code",
            "attr_value_id": "SG-CENTRAL",
            "attr_value_name": "Singapore Central Zone"
        },
        {
            "attr_key": "handover",
            "attr_value_id": "3PL-SPX",
            "attr_value_name": "3PL-SPX"
        },
        {
            "attr_key": "zone_code",
            "attr_value_id": "ZONE-A",
            "attr_value_name": "ZONE-A"
        },
        {
            "attr_key": "outer_packaging",
            "attr_value_id": "CONS-BOX-M",
            "attr_value_name": "Medium Carton Box"
        },
        {
            "attr_key": "actual_weight",
            "attr_value_id": "1250",
            "attr_value_name": "1250"
        },
        {
            "attr_key": "store_id",
            "attr_value_id": "STORE001",
            "attr_value_name": "Singapore Main Store"
        }
    ],
    "multi_attr_list": [
        {
            "attr_key": "shop_id",
            "attr_value_list": [
                {
                    "attr_value_id": "12345678",
                    "attr_value_name": "Electronics Store SG"
                },
                {
                    "attr_value_id": "87654321",
                    "attr_value_name": "Fashion Store SG"
                }
            ]
        },
        {
            "attr_key": "shopee_order_sn",
            "attr_value_list": [
                {
                    "attr_value_id": "VIRTUAL177018974889",
                    "attr_value_name": "VIRTUAL177018974889"
                },
                {
                    "attr_value_id": "VIRTUAL177018972678",
                    "attr_value_name": "VIRTUAL177018972678"
                }
            ]
        },
        {
            "attr_key": "inner_packaging",
            "attr_value_list": [
                {
                    "attr_value_id": "CONS-BUBBLE-S",
                    "attr_value_name": "Small Bubble Wrap",
                    "attr_value_type": "3"
                },
                {
                    "attr_value_id": "CONS-TAPE-01",
                    "attr_value_name": "Sealing Tape",
                    "attr_value_type": "3"
                }
            ]
        }
    ],
    "sku_info_list": [
        {
            "sku_id": "1770116513_13599",
            "qty": 2,
            "block_type": 0,
            "quality": 0
        },
        {
            "sku_id": "1770189693734_03580",
            "qty": 2,
            "block_type": 0,
            "quality": 0
        }
    ]
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {}
}

3.2.2 WMS向Vendor捞单

URL: /api/v2/automation/tovendor/outbound/salesorder/cancel_order

Request

{
    "order_number_list": [
        "OBSGL000260101081110"
    ],
    "whs_id": "SGL"
}

Response

{
    "data": {
        "fail_list": [
        ],
        "not_exist_list": [
        ],
        "success_list": [
            "OBSGL000260101081110"
        ]
    },
    "message": "success",
    "retcode": 0
}

3.2.3 Vendor向WMS撤单

URL: /api/v2/automation/toshopee/outbound/salesorder/cancel_order

Request

{
    "order_number_list": [
        "OBSGL000260101081110"
    ],
    "reason": "create task failed",
    "whs_id": "SGL"
}

Response

{
   "retcode":0,
   "message":"success",
   "data":{
      "fail_list":[
      ],
      "not_exist_list":[
      ],
      "success_list":[
         "OBSGL000260101081110"
      ]
   }

3.2.4 Wms向Vendor下发锁单/解锁请求

URL: /api/v2/automation/tovendor/outbound/salesorder/lock_unlock_order

Request

{
    "order_number_list": [
        "OBSGL000260101081110"
    ],
    "request_type": 1,
    "whs_id": "SGL"
}

Response

{
    "data": {
        "fail_list": [
        ],
        "not_exist_list": [
        ],
        "success_list": [
            "OBSGL000260101081110"
        ]
    },
    "message": "success",
    "retcode": 0
}

3.2.5 vendor向wms获取号段缓存

URL: /api/v2/automation/toshopee/outbound/salesorder/cache_task_number

Request

{
    "biz_type": 1,
    "count": 1,
    "whs_id": "SGL"
}

Response

{
    "data": {
        "task_id_list": [
            "202604220002_0"
        ]
    },
    "message": "success",
    "retcode": 0
}

3.2.6 Vendor绑定解绑设备【复用basic接口】

3.2.7 Vendor向WMS创建picking task

URL: /api/v2/automation/toshopee/outbound/salesorder/create_picking_task

Request

{
    "operator": "tangjian.ouyang@shopee.com",
    "order_number_list": [
        "OBSGL000260204000678"
    ],
    "pick_type": 2,
    "station_type": 2,
    "sub_pickup_id": "202604220002_0",
    "wave_type": 2,
    "whs_id": "SGL"
}

Response

{
   "data":{
      "fail_order_list":[
      ],
      "task_attr_info":{
         "ctime":1767751167,
         "cut_off_time":1767751167,
         "multi_attr_list":[
         // 示例的属性不全,查看接口文档的keys
            {
               "attr_key":"channel_id",
               "attr_value_list":[
                  {
                     "attr_value_id":"30005",
                     "attr_value_name":"SPX"
                  },
                  {
                     "attr_value_id":"30006",
                     "attr_value_name":"SPD"
                  }
               ]
            }
         ],
         "purchase_time":1767751167,
         "ship_by_date":1767751167,
         "single_attr_list":[
         // 示例的属性不全,查看接口文档的keys
            {
               "attr_key":"max_order_size",
               "attr_value_id":"1",
               "attr_value_name":"large"
            }
         ],
         "sub_pickup_id":"202604220002_0",
         "urgent_flag":1
      }
   },
   "message":"success",
   "retcode":0
}

3.2.8 Vendor向WMS追加明细

URL: /api/v2/automation/toshopee/outbound/salesorder/append_order

Request

{
    "new_order_number_list": [
        "OBSGL000260204000679",
        "OBSGL000260204000670"
    ],
    "sub_pickup_id": "202604220002_0",
    "whs_id": "SGL"
}

Response

{
   "data":{
      "fail_order_list":[
      ],
      "task_attr_info":{
         "ctime":1767751167,
         "cut_off_time":1767751167,
         "multi_attr_list":[
         // 示例的属性不全,查看接口文档的keys
            {
               "attr_key":"channel_id",
               "attr_value_list":[
                  {
                     "attr_value_id":"30005",
                     "attr_value_name":"SPX"
                  },
                  {
                     "attr_value_id":"30006",
                     "attr_value_name":"SPD"
                  }
               ]
            }
         ],
         "purchase_time":1767751167,
         "ship_by_date":1767751167,
         "single_attr_list":[
         // 示例的属性不全,查看接口文档的keys
            {
               "attr_key":"max_order_size",
               "attr_value_id":"1",
               "attr_value_name":"large"
            }
         ],
         "sub_pickup_id":"202604220002_0",
         "urgent_flag":1
      }
   },
   "message":"success",
   "retcode":0
}

3.2.9 flow pick换箱

URL: /api/v2/automation/toshopee/outbound/salesorder/change_device

Request

{
   "from_device_id":"OPBSK11873",
   "new_order_number_list":[
      "OBSGL000260204000679"
   ],
   "new_pickup_id":"202604220003_0",
   "picked_order_number_list":[
      {
         "id":"1",
         "device_id":"OPBSK11873",
         "sku_id":"1767751294820_08379",
         "batch_no":2026010600001134,
         "unit_list":[
            {
               "unit_id":"8u118",
               "scan_time":1767751167
            }
         ],
         "qty":1,
         "ctime":1767751167,
         "code":"8u118",
         "operator":"tangjian.ouyang@shopee.com",
         "order_number":"OBSGL000260204000678"
      }
   ],
   "sub_pickup_id":"202604220002_0",
   "to_device_id":"OPBSK11874",
   "whs_id":"SGL",
   "zero_order_info_list":[
      "OBSGL000260204000670"
   ],
  "operator":"tangjian.ouyang@shopee.com"
}

Response

{
   "data":{
      "task_attr_info_list":[
         {
            "ctime":1767751167,
            "cut_off_time":1767751167,
            "multi_attr_list":[
            // 示例的属性不全,查看接口文档的keys
               {
                  "attr_key":"3pl",
                  "attr_value_list":[
                     {
                        "attr_value_id":"30005",
                        "attr_value_name":"SPX"
                     },
                     {
                        "attr_value_id":"30006",
                        "attr_value_name":"SPD"
                     }
                  ]
               }
            ],
            "purchase_time":1767751167,
            "ship_by_date":1767751167,
            "single_attr_list":[
            // 示例的属性不全,查看接口文档的keys
               {
                  "attr_key":"max_order_size",
                  "attr_value_id":"1",
                  "attr_value_name":"large"
               }
            ],
            "sub_pickup_id":"202604220002_0",
            "urgent_flag":1
         },
         {
            "ctime":1767751167,
            "cut_off_time":1767751167,
            "multi_attr_list":[
            // 示例的属性不全,查看接口文档的keys
               {
                  "attr_key":"3pl",
                  "attr_value_list":[
                     {
                        "attr_value_id":"30005",
                        "attr_value_name":"SPX"
                     },
                     {
                        "attr_value_id":"30006",
                        "attr_value_name":"SPD"
                     }
                  ]
}
            ],
            "purchase_time":1767751167,
            "ship_by_date":1767751167,
            "single_attr_list":[
            // 示例的属性不全,查看接口文档的keys
               {
                  "attr_key":"max_order_size",
                  "attr_value_id":"1",
                  "attr_value_name":"large"
               }
            ],
            "sub_pickup_id":"202604220003_0",
            "urgent_flag":1
         }
      ]
   },
   "message":"success",
   "retcode":0
}

3.2.10 Vendor完成task

URL: /api/v2/automation/toshopee/outbound/salesorder/vendor_complete_task

Request

{
   "operator":"tangjian.ouyang@shopee.com",
   "picked_order_number_list":[
      {
         "id":"1",
         "device_id":"OPBSK11873",
         "sku_id":"1767751294820_08379",
         "batch_no":2026010600001134,
         "unit_list":[
            {
               "unit_id":"8u118",
               "scan_time":1767751167
            }
         ],
         "qty":1,
         "ctime":1767751167,
         "code":"8u118",
         "operator":"tangjian.ouyang@shopee.com",
         "order_number":"OBSGL000260204000678"
      }
   ],
   "shortage_order_info_list":[
      {
         "id":"2",
         "device_id":"OPBSK11873",
         "sku_id":"1767751294820_08379",
         "batch_no":2026010600001134,
         "unit_list":[
            {
               "unit_id":"8u119",
               "scan_time":1767751167
            }
         ],
         "qty":1,
         "ctime":1767751167,
         "code":"8u119",
         "operator":"tangjian.ouyang@shopee.com",
         "order_number":"OBSGL000260204000679"
      }
   ],
   "sub_pickup_id":"202604220002_0",
   "whs_id":"SGL",
   "zero_order_info_list":[
      "OBSGL000260204000670"
   ],
  "operator":"tangjian.ouyang@shopee.com",
}

Response

{
   "data":{
      "task_attr_info":{
         "ctime":1767751167,
         "cut_off_time":1767751167,
         "multi_attr_list":[
         // 示例的属性不全,查看接口文档的keys
            {
               "attr_key":"channel_id",
               "attr_value_list":[
                  {
                     "attr_value_id":"30005",
                     "attr_value_name":"SPX"
                  },
                  {
                     "attr_value_id":"30006",
                     "attr_value_name":"SPD"
                  }
               ]
            }
         ],
         "purchase_time":1767751167,
         "ship_by_date":1767751167,
         "single_attr_list":[
         // 示例的属性不全,查看接口文档的keys
            {
               "attr_key":"max_order_size",
               "attr_value_id":"1",
               "attr_value_name":"large"
            }
         ],
         "sub_pickup_id":"202604220002_0",
         "urgent_flag":1
      }
   },
   "message":"success",
   "retcode":0
}

3.3 RTS & MTO 需求池

3.3.1 WMS给Vendor下发需求

URL: /api/v2/automation/tovendor/outbound/rtsmto/create_require

Request

{
  "whs_id": "SGD",
  "order_number": "RTSWMSSGD00026032400101",
  "biz_type": 2,
  "res_list": [
    {
      "res_number": "RORWMSSGD00026032400402_0",
      "sku_id": "1495294_1418318",
      "qty": 1,
      "block_type": 0,
      "quality": 0,
      "group_key": "Mix",
      "can_group_picking": 1,
      "urgent_flag": 0,
      "demand_mode": 1,
      "ctime": 1774338420
    },
    {
      "res_number": "RORWMSSGD00026032400402_1",
      "sku_id": "1495294_1418318",
      "qty": 1,
      "block_type": 0,
      "quality": 0,
      "group_key": "Mix",
      "can_group_picking": 1,
      "urgent_flag": 0,
      "demand_mode": 1,
      "ctime": 1774338420
    }
  ],
  "single_attr_list": [
    {
      "attr_key": "to_whs",
      "attr_value_id": "SGD",
      "attr_value_name": "SGD",
      "attr_value_type": null
    },
    {
      "attr_key": "expected_ob_date",
      "attr_value_id": "1771297269",
      "attr_value_name": "1771297269",
      "attr_value_type": null
    },
    {
      "attr_key": "order_source",
      "attr_value_id": "0",
      "attr_value_name": "WMS",
      "attr_value_type": null
    },
    {
      "attr_key": "supplier_id",
      "attr_value_id": "1649671406",
      "attr_value_name": "Mitra Internasional Indonesia",
      "attr_value_type": null
    },
    {
      "attr_key": "delivery_method",
      "attr_value_id": "1",
      "attr_value_name": "Pick Up By Suppliers",
      "attr_value_type": null
    },
    {
      "attr_key": "return_date",
      "attr_value_id": "1771297269",
      "attr_value_name": "1771297269",
      "attr_value_type": null
    },
    {
      "attr_key": "rts_reason",
      "attr_value_id": "R6",
      "attr_value_name": "R6",
      "attr_value_type": null
    },
    {
      "attr_key": "biz_type",
      "attr_value_id": "2",
      "attr_value_name": "RTS",
      "attr_value_type": null
    }
  ],
  "multi_attr_list": null,
  "ticket_type": 3
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {}
}

3.3.2 WMS向Vendor取消需求

URL: /api/v2/automation/tovendor/outbound/rtsmto/cancel_require

Request

{
    "biz_type": 2,
    "res_number_list": [
        "RORWMSSGD00026010600003"
    ],
    "whs_id": "SGD"
}

Response

{
    "data": {
        "fail_list": [
        ],
        "not_exist_list": [
        ],
        "success_list": [
            "RORWMSSGD00026010600003"
        ]
    },
    "message": "success",
    "retcode": 0
}

3.3.3 Vendor 向 WMS 同步占用信息

URL: /api/v2/automation/toshopee/outbound/rtsmto/sync_occupied_require

Request

{
    "biz_type": 2,
    "res_list": [
        {
            "allocated_qty": 0,
            "batch_no": 0,
            "res_number": "RORWMSSGD00026010600003",
            "sku_id": "1767751294820_08379"
        }
    ],
    "whs_id": "SGD"
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {}
}

3.3.4 Vendor绑定/解绑device

3.3.5 Vendor向wms获取号段缓存【复用】

3.2.5 vendor向wms获取号段缓存

3.3.6 Vendor向WMS创建picking task

URL: /api/v2/automation/toshopee/outbound/rtsmto/create_picking_task

Request

{
    "biz_type": 2,
    "operator": "tangjian.ouyang@shopee.com",
    "pickup_id": 202307280014,
    "res_number_list": [
        "RORWMSSGD00026010600003"
    ],
    "station_type": 2,
    "whs_id": "SGD"
}

Response

{
    "data": {
        "fail_res_list": [
        ],
        "task_attr_info": {
            "ctime": 21,
            "multi_attr_list": [
                {
                    "attr_key": "zzzz",
                    "attr_value_list": [
                        {},
                        {}
                    ]
                },
                {
                    "attr_key": "zzzz",
                    "attr_value_list": [
                        {},
                        {}
                    ]
                }
            ],
            "pickup_id": 53,
            "single_attr_list": [
                {
                    "attr_key": "zzzz",
                    "attr_value_id": "zzzz",
                    "attr_value_name": "zzzz"
                },
                {
                    "attr_key": "zzzz",
                    "attr_value_id": "zzzz",
                    "attr_value_name": "zzzz"
                }
            ],
            "urgent_flag": 57
        }
    },
    "message": "success",
    "retcode": 0
}

3.3.7 Vendor实绑拣货任务

URL: /api/v2/automation/toshopee/outbound/rtsmto/bind_picking_task

Request

{
    "biz_type": 2,
    "device_id": "OPBSK11873",
    "pickup_id": 202307280014,
    "whs_id": "SGD",
    "operator":"tangjian.ouyang@shopee.com"
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {}
}

3.3.8 Vendor向WMS追加明细

URL: /api/v2/automation/toshopee/outbound/rtsmto/append_order

Request

{
  "whs_id": "SGD",
  "pickup_id": 202603240102,
  "biz_type": 2,
  "res_number_list": [
    "RORWMSSGD00026032400402_0",
    "RORWMSSGD00026032400402_1"
  ]
}

Response

{
    "data": {
        "fail_res_list": [
        ],
        "task_attr_info": {
            "ctime": 21,
            "multi_attr_list": [
                {
                    "attr_key": "zzzz",
                    "attr_value_list": [
                        {},
                        {}
                    ]
                },
                {
                    "attr_key": "zzzz",
                    "attr_value_list": [
                        {},
                        {}
                    ]
                }
            ],
            "pickup_id": 53,
            "single_attr_list": [
                {
                    "attr_key": "zzzz",
                    "attr_value_id": "zzzz",
                    "attr_value_name": "zzzz"
                },
                {
                    "attr_key": "zzzz",
                    "attr_value_id": "zzzz",
                    "attr_value_name": "zzzz"
                }
            ],
            "urgent_flag": 57
        }
    },
    "message": "success",
    "retcode": 0
}

3.3.9 Vendor增量同步拣货明细

URL: /api/v2/automation/toshopee/outbound/rtsmto/sync_picking_detail

Request

{
  "whs_id": "SGD",
  "biz_type": 2,
  "picking_task_list": [
    {
      "pickup_id": 202603240116,
      "picked_info_list": [
        {
          "id": "19D1ED97589EIPF",
          "device_id": "BSK97486",
          "sku_id": "2400155227_10000740381",
          "code": null,
          "res_number": "RORWMSSGD00026032400404_2",
          "batch_no": 2026031800026554,
          "unit_list": null,
          "qty": 1,
          "ctime": 1774339029,
          "operator": "automation.sgd_b@wms-sg-bpo.com"
        },
        {
          "id": "19D1ED97594EIPG",
          "device_id": "BSK97486",
          "sku_id": "2400155227_10000740381",
          "code": null,
          "res_number": "RORWMSSGD00026032400404_3",
          "batch_no": 2026031800026554,
          "unit_list": null,
          "qty": 1,
          "ctime": 1774339029,
          "operator": "automation.sgd_b@wms-sg-bpo.com"
        }
      ]
    }
  ]
}

Response

{
   "data":{
      "failed_list":[
      ],
      "success_list":[
         "202307280014"
      ]
   },
   "message":"success",
   "retcode":0
}

3.3.10 Vendor完成task

URL: /api/v2/automation/toshopee/outbound/rtsmto/complete_task

Request

{
    "biz_type": 2,
    "picked_order_number_list": [
        {
         "id":"1",
         "device_id":"OPBSK11873",
         "sku_id":"1767751294820_08379",
         "batch_no":2026010600001134,
         "unit_list":[
            {
               "unit_id":"8u118",
               "scan_time":1767751167
            }
         ],
         "qty":1,
         "ctime":1767751167,
         "code":"8u118",
         "operator":"tangjian.ouyang@shopee.com",
         "res_number":"RORWMSSGD00026010600003"
      }
    ],
    "pickup_id": 202307280014,
    "shortage_order_info_list": [
        {
         "id":"1",
         "device_id":"OPBSK11873",
         "sku_id":"1767751294820_08379",
         "batch_no":2026010600001134,
         "unit_list":[
            {
               "unit_id":"8u118",
               "scan_time":1767751167
            }
         ],
         "qty":1,
         "ctime":1767751167,
         "code":"8u118",
         "operator":"tangjian.ouyang@shopee.com",
         "res_number":"RORWMSSGD00026010600003"
      }
    ],
    "whs_id": "SGD",
    "zero_order_info_list": [
        "RORWMSSGD00026010600003"
    ],
    "operator":"tangjian.ouyang@shopee.com"
}

Response

{
    "data": {
        "task_attr_info": {
            "ctime": 63,
            "multi_attr_list": [
                {
                    "attr_key": "zzzz",
                    "attr_value_list": [
                        {},
                        {}
                    ]
                },
                {
                    "attr_key": "zzzz",
                    "attr_value_list": [
                        {},
                        {}
                    ]
                }
            ],
            "pickup_id": 94,
            "single_attr_list": [
                {
                    "attr_key": "zzzz",
                    "attr_value_id": "zzzz",
                    "attr_value_name": "zzzz"
                },
                {
                    "attr_key": "zzzz",
                    "attr_value_id": "zzzz",
                    "attr_value_name": "zzzz"
                }
            ],
            "urgent_flag": 77
        }
    },
    "message": "success",
    "retcode": 0
}

3.3.11 Vendor换箱接口

URL: /api/v2/automation/toshopee/outbound/rtsmto/change_picking_device

Request

{
    "biz_type": 2,
    "new_device_id": "OPBSK11874",
    "new_pickup_id": 202307280015,
    "picked_order_number_list": [
        {
         "id":"1",
         "device_id":"OPBSK11873",
         "sku_id":"1767751294820_08379",
         "batch_no":2026010600001134,
         "unit_list":[
            {
               "unit_id":"8u118",
               "scan_time":1767751167
            }
         ],
         "qty":1,
         "ctime":1767751167,
         "code":"8u118",
         "operator":"tangjian.ouyang@shopee.com",
         "res_number":"RORWMSSGD00026010600003"
      }
    ],
    "pickup_id": 202307280014,
    "zero_order_info_list": ["RORWMSSGD00026010600004"],
    "station_type": 1,
    "whs_id": "SGD",
    "new_order_number_list": [
        "RORWMSSGD00026010600005"
    ],
    "operator":"tangjian.ouyang@shopee.com"
}

Response

{
    "data": {
        "task_attr_info_list": {
            "ctime": 61,
            "multi_attr_list": [
                {
                    "attr_key": "zzzz",
                    "attr_value_list": [
                        {},
                        {}
                    ]
                },
                {
                    "attr_key": "zzzz",
                    "attr_value_list": [
                        {},
                        {}
                    ]
                }
            ],
            "pickup_id": 66,
            "single_attr_list": [
                {
                    "attr_key": "zzzz",
                    "attr_value_id": "zzzz",
                    "attr_value_name": "zzzz"
                },
                {
                    "attr_key": "zzzz",
                    "attr_value_id": "zzzz",
                    "attr_value_name": "zzzz"
                }
            ],
            "urgent_flag": 28
        }
    },
    "message": "success",
    "retcode": 0
}

3.3.12 查询Vendor拣货任务列表【复用】

3.1.11 查询Vendor拣货任务列表【出库通用对账查询vendor接口】

3.4 非需求池MTO

3.4.1 WMS给Vendor下发拣货任务

URL: /api/v2/automation/tovendor/outbound/mto/create_picking_task

Request

{
  "whs_id": "SGD",
  "pickup_id": 260324001505,
  "urgent_flag": null,
  "ctime": 1774354818,
  "can_group_picking": 0,
  "group_key": "MTSG2603240243_260324001505",
  "sku_info_list": [
    {
      "sku_id": "2344656022_2024518423",
      "qty": 10,
      "block_type": 0,
      "quality": 0
    }
  ],
  "single_attr_list": [
    {
      "attr_key": "create_time",
      "attr_value_id": "1774354818",
      "attr_value_name": "1774354818",
      "attr_value_type": null
    },
    {
      "attr_key": "to_whs",
      "attr_value_id": "SGL",
      "attr_value_name": "SGL",
      "attr_value_type": null
    },
    {
      "attr_key": "mto_order_no",
      "attr_value_id": "MTSG2603240243",
      "attr_value_name": "MTSG2603240243",
      "attr_value_type": null
    },
    {
      "attr_key": "expected_ob_date",
      "attr_value_id": "0",
      "attr_value_name": "0",
      "attr_value_type": null
    },
    {
      "attr_key": "order_source",
      "attr_value_id": "0",
      "attr_value_name": "pms",
      "attr_value_type": null
    },
    {
      "attr_key": "transported_by",
      "attr_value_id": "1",
      "attr_value_name": "spx",
      "attr_value_type": null
    }
  ],
  "multi_attr_list": null,
  "ticket_type": 5
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {}
}

3.4.2 WMS取消拣货任务

URL: /api/v2/automation/tovendor/outbound/mto/cancel_picking_task

Request

{
    "pickup_id": 240315000005,
    "whs_id": "SGL"
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {}
}

3.4.3 WMS向Vendor更新task的urgent flag【复用】

3.4.4 Vendor绑定/解绑device【复用basic接口】

3.4.5 Vendor开始拣货任务

URL: /api/v2/automation/toshopee/outbound/mto/start_picking_task

Request

{
    "operator": "tangjian.ouyang@shopee.com",
    "pickup_id": 240315000005,
    "station_type": 1,
    "whs_id": "SGL"
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {}
}

3.4.6 Vendor真实绑定拣货任务

URL: /api/v2/automation/toshopee/outbound/mto/bind_picking_task

Request

{
    "device_id": "OPBSK11873",
    "operator": "tangjian.ouyang@shopee.com",
    "pickup_id": 240315000005,
    "whs_id": "SGL"
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {}
}

3.4.7 Vendor增量拣货明细

URL: /api/v2/automation/toshopee/outbound/mto/sync_picking_detail

Request

{
   "picking_task_list":[
      {
         "picked_info_list":[
            {
               "id":"1",
               "device_id":"OPBSK11873",
               "sku_id":"1767751294820_08379",
               "batch_no":2026010600001134,
               "unit_list":[
                  {
                     "unit_id":"8u118",
                     "scan_time":1767751167
                  }
               ],
               "qty":1,
               "ctime":1767751167,
               "code":"8u118",
               "operator":"tangjian.ouyang@shopee.com"
            }
         ],
         "pickup_id":202104220002
      }
   ],
   "whs_id":"SGL"
}

Response

{
   "data":{
      "failed_list":[
      ],
      "success_list":[
         "202104220002"
      ]
   },
   "message":"success",
   "retcode":0
}

3.4.8 Vendor完成拣货任务

URL: /api/v2/automation/toshopee/outbound/mto/complete_picking_task

Request

{
   "picked_info_list":[
      {
         "id":"1",
         "device_id":"OPBSK11873",
         "sku_id":"1767751294820_08379",
         "batch_no":2026010600001134,
         "unit_list":[
            {
               "unit_id":"8u118",
               "scan_time":1767751167
            }
         ],
         "qty":1,
         "ctime":1767751167,
         "code":"8u118",
         "operator":"tangjian.ouyang@shopee.com"
      }
   ],
   "pickup_id":240315000005,
   "whs_id":"SGL",
   "operator":"tangjian.ouyang@shopee.com"
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {}
}

库内模块接口协议

4.1 库内移库同步占用库存给Vendor接口

URL: /api/v2/automation/tovendor/inventory/racktransfer/create_rt_order

Request

{
    "whs_id": "SGL",
    "rt_order_id": "RTSGL00020250102001",
    "ctime": 170928828282,
    "ticket_type":6,
    "operator":"yijia.yang@shopee.com",
    "attr_list":[
        {
            "attr_key": "urgent_flag",
            "attr_value_id": "1",
            "attr_value_name": "1"
        },
        {
            "attr_key":"oos_order_qty",
            "attr_value_id":"1",
            "attr_value_name": "1"
        }],
    "sku_info_list": [
        {
            "sku_id": "sku1",
            "block_type": 0,
            "qty": 1,
            "sku_quality":0
        },
        {
            "sku_id": "sku2",
            "block_type": 0,
            "qty": 10,
            "sku_quality":0
        }
    ]
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {
    }
}

4.2 库内移库Vendor占用PickingDevice接口

URL: /api/v2/automation/toshopee/inventory/racktransfer/occupy_device

Request

{
    "whs_id": "SGL",
    "relation_id": "RTSGL00020250102001",
    "grid_no": "Geek+-A-1-1",
    "device_id": "B10922",
    "request_type": 1
    }

Response

{
    "retcode": 0,
    "message": "success",
    "data": {
    }
}

4.3 库内Vendor发起Picking明细整箱同步到WMS(WMS/Vendor创建)

URL: /api/v2/automation/toshopee/inventory/racktransfer/submit_picking_sku_list

Request

{
    "whs_id": "SGL",
    "rt_order_id": "RTSGL00020250102001",
    "source_id": "对应Geek+的唯一单号",
    "remark": "备注",
    "device_id": "B10922",
    "new_device_id": "B10923",
    "sku_info_list": [
        {
            "id": "geek+侧拣货明细的唯一id",
            "sku_id": "sku1",
            "qty": 1,
            "batch_no": 20250100010010101,
            "unit_list": [
                {
                    "unit_id": "uid1",
                    "scan_time": 1708388992922
                },
                {
                    "unit_id": "uid2",
                    "scan_time": 1708388992933
                }
            ],
            "picking_time": 1708388992833,
            "operator": "yijia.yang@shopee.com",
            "block_type": 0
        },
        {
            "id": "geek+侧拣货明细的唯一id",
            "sku_id": "sku1",
            "qty": 1,
            "batch_no": 20250100010010101,
            "unit_list": [
                {
                    "unit_id": "uid1",
                    "scan_time": 1708388992922
                },
                {
                    "unit_id": "uid2",
                    "scan_time": 1708388992933
                }
            ],
            "picking_time": 1708388992833,
            "operator": "yijia.yang@shopee.com",
            "block_type": 0
        }
    ],
    "picking_flag": 3
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {
    }
}

4.4库内Vendor发起Picking明细定时回传到WMS(只针对WMS创建的移库单)

URL: /api/v2/automation/toshopee/inventory/racktransfer/sync_picking_sku_list

Request

{
    "whs_id": "SGL",
    "rt_picking_list": [
        {
            "rt_order_id": "RTSGL00020250102001",
            "source_id": "对应Geek+的唯一单号",
            "device_list": [
                {
                    "device_id": "B10922",
                    "sku_info_list": [
                        {
                            "id": "geek+侧拣货明细的唯一id",
                            "sku_id": "sku1",
                            "qty": 1,
                            "batch_no": 20250100010010101,
                            "unit_list": [
                                {
                                    "unit_id": "uid1",
                                    "scan_time": 1708388992922
                                },
                                {
                                    "unit_id": "uid2",
                                    "scan_time": 1708388992933
                                }
                            ],
                            "picking_time": 1708388992833,
                            "operator": "yijia.yang@shopee.com",
                            "block_type": 0
                        },
                        {
                            "id": "geek+侧拣货明细的唯一id",
                            "sku_id": "sku1",
                            "qty": 1,
                            "batch_no": 20250100010010101,
                            "unit_list": [
                                {
                                    "unit_id": "uid1",
                                    "scan_time": 1708388992922
                                },
                                {
                                    "unit_id": "uid2",
                                    "scan_time": 1708388992933
                                }
                            ],
                            "picking_time": 1708388992833,
                            "operator": "yijia.yang@shopee.com",
                            "block_type": 0
                        }
                    ]
                }
            ]
        }
    ]
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {
    }
}

4.5 库内Vendor发起盘点差异调减同步给WMS

URL: /api/v2/automation/tovendor/inventory/racktransfer/handle_diff_stock

Request

{
    "whs_id": "SGL",
    "source_id": "对应Geek+的唯一单号",
    "sku_info_list": [
        {
            "id": "geek+侧拣货明细的唯一id",
            "sku_id": "sku1",
            "qty": 1,
            "batch_no": 20250100010010101,
            "unit_list": [
                {
                    "unit_id": "uid1",
                    "scan_time": 1708388992922
                },
                {
                    "unit_id": "uid2",
                    "scan_time": 1708388992933
                }
            ],
            "picking_time": 1708388992833,
            "operator": "yijia.yang@shopee.com"
        },
        {
            "id": "geek+侧拣货明细的唯一id",
            "sku_id": "sku1",
            "qty": 1,
            "batch_no": 20250100010010101,
            "unit_list": [
                {
                    "unit_id": "uid1",
                    "scan_time": 1708388992922
                },
                {
                    "unit_id": "uid2",
                    "scan_time": 1708388992933
                }
            ],
            "picking_time": 1708388992833,
            "operator": "yijia.yang@shopee.com"
        }
    ]
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {
        "rt_order_id":"RTSGL00020250102001"
    }
}

4.6 库内发起Vendor查询拣货接口(用于对账)

URL: /api/v2/automation/tovendor/inventory/racktransfer/query_picking_list

Request

{
    "whs_id": "SGL",
    "source_id_list": ["对应Geek+的唯一单号1","对应Geek+的唯一单号2"],
    "rt_order_id_list": []
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {
        "whs_id": "SGL",
        "rt_order_info_list": [
            {
                "rt_order_id": "RTSGL00020250102001",
                "source_id": "对应Geek+的唯一单号1",
                "is_complete": 1,
                "device_list": [
                    {
                        "device_id": "B10392",
                        "is_close": 1,
                        "sku_info_list": [
                            {
                                "id": "geek+侧拣货明细的唯一id",
                                "sku_id": "sku1",
                                "qty": 1,
                                "batch_no": 20250100010010101,
                                "unit_list": [
                                    {
                                        "unit_id": "uid1",
                                        "scan_time": 1708388992922
                                    },
                                    {
                                        "unit_id": "uid2",
                                        "scan_time": 1708388992933
                                    }
                                ],
                                "picking_time": 1708388992833,
                                "operator": "yijia.yang@shopee.com"
                            },
                            {
                                "id": "geek+侧拣货明细的唯一id",
                                "sku_id": "sku1",
                                "qty": 1,
                                "batch_no": 20250100010010101,
                                "unit_list": [
                                    {
                                        "unit_id": "uid1",
                                        "scan_time": 1708388992922
                                    },
                                    {
                                        "unit_id": "uid2",
                                        "scan_time": 1708388992933
                                    }
                                ],
                                "picking_time": 1708388992833,
                                "operator": "yijia.yang@shopee.com"
                            }
                        ]
                    }
                ]
            }
        ]
    }
}

4.7 库内更新(移库)单据(WMS创建的)

URL: /api/v2/automation/tovendor/inventory/racktransfer/update_rt_order

Request

{
    "whs_id": "SGL",
    "rt_order_list": [
        {
            "rt_order_id": "RTSGL00020250102001",
            "attr_list": [
                {
                    "attr_key": "urgent_flag",
                    "attr_value_id": "1",
                    "attr_value_name": "1"
                },
                {
                    "attr_key": "future_order_qty",
                    "attr_value_id": "1",
                    "attr_value_name": "1"
                },
                {
                "attr_key":"oos_order_qty",
                "attr_value_id":"1",
                "attr_value_name": "1"
                }
            ]
        },
        {
            "rt_order_id": "RTSGL00020250102002",
            "attr_list": [
                {
                    "attr_key": "future_sku_qty",
                    "attr_value_id": "1",
                    "attr_value_name": "1"
                },
                {
                    "attr_key": "oos_order_qty",
                    "attr_value_id": "1",
                    "attr_value_name": "1"
                }
            ]
        }
    ],
    "update_event": 2
}

Response

{
    "retcode": 0,
    "message": "success",
    "data": {}
}

基础资料模块接口协议

5.1 vendor向WMS查询用户是否存在

URL: /api/v2/automation/tovendor/basic/inventory/batch_status_update

Request

{
  "whs_id": "SGL",
  "user_id": 123456
}

Response

{
  "retcode": 0,
  "message": "success",
  "data": {
    "user_id": 123456,
    "email": "aaa@shopee.com"
  }
}

5.2 WMS向Vendor同步批次状态

URL: /api/v2/automation/tovendor/basic/inventory/batch_status_update

Request

{
  "whs_id": "SGL",
  "batch_list": [
    {
      "batch_no": 2025091757580761,
      "block_type": 0
    },
    {
      "batch_no": 2025091757580762,
      "block_type": 1
    },
    {
      "batch_no": 2025091757580763,
      "block_type": 3
    }
  ]
}

Response

{
  "retcode": 0,
  "message": "success",
  "data": {}
}

5.3 WMS向Vendor查询库存信息

URL: /api/v2/automation/tovendor/basic/inventory/query_sku_batch_inventory

Request

{
  "whs_id": "SGL",
  "page_no": 1,
  "page_size": 20
}

Response

{
  "retcode": 0,
  "message": "success",
  "data": {
    "page_no": 1,
    "page_size": 20,
    "list": [
      {
        "sku_id": "101057873_10000551324",
        "batch_no": 2025091757580761,
        "block_type": 0,
        "quantity": 100,
        "uid_list": []
      },
      {
        "sku_id": "101057873_10000551325",
        "batch_no": 2025091757580762,
        "block_type": 1,
        "quantity": 50,
        "uid_list": [
          "16488081400",
          "16488081401"
        ]
      }
    ]
  }
}

5.4 WMS向Vendor同步对账结果

URL: /api/v2/automation/tovendor/basic/inventory/sync_reconciliation_result

Request

{
  "whs_id": "SGL",
  "reconciliation_id": "RC123",
  "list": [
    {
      "sku_id": "101057873_10000551324",
      "batch_no": 2025091757580761,
      "shopee_block_type": 0,
      "vendor_block_type": 0,
      "shopee_quantity": 100,
      "vendor_quantity": 98,
      "shopee_uid_list": [],
      "vendor_uid_list": []
    },
    {
      "sku_id": "101057873_10000551325",
      "batch_no": 2025091757580762,
      "shopee_block_type": 1,
      "vendor_block_type": 1,
      "shopee_quantity": 50,
      "vendor_quantity": 50,
      "shopee_uid_list": [
        "16488081400",
        "16488081401"
      ],
      "vendor_uid_list": [
        "16488081400",
        "16488081401"
      ]
    }
  ]
}

Response

{
  "retcode": 0,
  "message": "success",
  "data": {}
}

5.5 vendor向WMS查询sku信息

URL: /api/v2/automation/toshopee/basic/sku/query_sku_detail

Request

{
  "whs_id": "SGL",
  "sku_id_list": [
    "101057873_10000551324",
    "101057873_10000551322"
  ]
}

Response

{
  "retcode": 0,
  "message": "success",
  "data": {
    "sku_list": [
      {
        "sku_id": "101057873_10000551324",
        "name": "iPhone 15 Pro Max",
        "description": "Latest iPhone model with A17 Pro chip",
        "images": [
          "http://cf.shopee.sg/file/8ed755a36ef5374a0f56966da8969334",
          "http://cf.shopee.sg/file/9ed755a36ef5374a0f56966da8969335"
        ],
        "upc_list": [
          "u222",
          "u223"
        ],
        "sku_height": 120,
        "sku_width": 110,
        "sku_length": 100,
        "gross_weight": 200,
        "volume": 1320000,
        "is_uid_sn_imei_mgt": 1,
        "is_danger": 0,
        "is_liquid": 0,
        "is_fragile": 1,
        "with_battery": 1,
        "is_high_value": 1,
        "sku_tag_list": [
          {
            "sku_tag_id": "TAG001",
            "sku_tag_name": "Premium",
            "sku_tag_type_id": "Color",
            "sku_tag_type_name": "Yellow"
          }
        ],
        "is_key_batch_mgt": 1,
        "is_shelf_life": 0,
        "category_level_1_id": 10001,
        "category_level_1_name": "Electronics",
        "category_level_2_id": 10002,
        "category_level_2_name": "Mobile Phones",
        "category_level_3_id": 10003,
        "category_level_3_name": "Smartphones",
        "category_level_4_id": 10004,
        "category_level_4_name": "iOS Devices",
        "category_level_5_id": 10005,
        "category_level_5_name": "iPhone",
        "sell_type": 2,
        "sell_type_name": "Pcs",
        "business_type": 1,
        "business_type_name": "FBS",
        "variation1": "Black",
        "variation2": "256GB",
        "shop_list": [
          {
            "shop_id": 123,
            "shop_name": "Apple Official Store"
          },
          {
            "shop_id": 456,
            "shop_name": "Tech Paradise"
          }
        ],
        "sku_size_type_id": "S001",
        "sku_size_type": 0,
        "sku_size_type_desc": "Medium",
        "sku_size_type_name": "0cm3-1000cm3",
        "cb_option": 1,
        "listing_seller_spu": "SPU_IPHONE15PM",
        "listing_seller_sku": "SKU_IP15PM_BK_256",
        "outer_packaging": 3,
        "outer_packaging_name": "Box(manual)",
        "inner_packaging": [
          {
            "consumable_id": "CS00015",
            "consumable_name": "Bubble Wrap",
            "count": 2
          },
          {
            "consumable_id": "CS00016",
            "consumable_name": "Foam Sheet",
            "count": 1
          }
        ]
      },
      {
        "sku_id": "101057873_10000551322",
        "name": "Samsung Galaxy S24",
        "description": "Latest Samsung flagship phone",
        "images": [
          "http://cf.shopee.sg/file/7ed755a36ef5374a0f56966da8969334"
        ],
        "upc_list": [],
        "sku_height": 115,
        "sku_width": 105,
        "sku_lengt": 95,
        "gross_weight": 180,
        "volume": 1150000,
        "is_uid_sn_imei_mgt": 1,
        "is_danger": 0,
        "is_liquid": 0,
        "is_fragile": 1,
        "with_battery": 1,
        "is_high_value": 1,
        "sku_tag_list": [],
        "is_key_batch_mgt": 1,
        "is_shelf_life": 0,
        "category_level_1_id": 10001,
        "category_level_1_name": "Electronics",
        "category_level_2_id": 10002,
        "category_level_2_name": "Mobile Phones",
        "sell_type": 2,
        "sell_type_name": "Pcs",
        "business_type": 1,
        "business_type_name": "FBS",
        "variation1": "White",
        "variation2": "128GB",
        "shop_list": [
          {
            "shop_id": 789,
            "shop_name": "Samsung Official"
          }
        ],
        "sku_size_type_id": "S001",
        "sku_size_type": 0,
        "sku_size_type_desc": "Medium",
        "sku_size_type_name": "0cm3-1000cm3",
        "cb_option": 0,
        "listing_seller_spu": "SPU_S24",
        "listing_seller_sku": "SKU_S24_WH_128",
        "outer_packaging": 2,
        "outer_packaging_name": "Pouch(manual)",
        "inner_packaging": []
      }
    ]
  }
}

5.6 5.6 WMS向Vendor同步sku信息

URL: /api/v2/automation/tovendor/basic/sku/sync_sku_info

Request

{
  "whs_id": "SGL",
  "sku_list": [
    {
      "sku_id": "101057873_10000551324",
      "name": "iPhone 15 Pro Max - Updated",
      "description": "Latest iPhone model with A17 Pro chip - New Description",
      "images": [
        "http://cf.shopee.sg/file/8ed755a36ef5374a0f56966da8969334"
      ],
      "upc_list": [
        "u222"
      ],
      "sku_height": 120,
      "sku_width": 110,
      "sku_length": 100,
      "gross_weight": 200,
      "volume": 1320000,
      "is_uid_sn_imei_mgt": 1,
      "is_danger": 0,
      "is_liquid": 0,
      "is_fragile": 1,
      "with_battery": 1,
      "is_high_value": 1,
      "sku_tag_list": [
        {
          "sku_tag_id": "TAG001",
          "sku_tag_name": "Premium",
          "sku_tag_type_id": "Color",
          "sku_tag_type_name": "Yellow"
        }
      ],
      "is_key_batch_mgt": 1,
      "is_shelf_life": 0,
      "category_level_1_id": 10001,
      "category_level_1_name": "Electronics",
      "category_level_2_id": 10002,
      "category_level_2_name": "Mobile Phones",
      "sell_type": 2,
      "sell_type_name": "Pcs",
      "business_type": 1,
      "business_type_name": "FBS",
      "variation1": "Black",
      "variation2": "256GB",
      "shop_list": [
        {
          "shop_id": 123,
          "shop_name": "Apple Official Store"
        }
      ],
      "sku_size_type_id": "S001",
      "sku_size_type": 0,
      "sku_size_type_desc": "Medium",
      "sku_size_type_name": "0cm3-1000cm3",
      "cb_option": 1,
      "listing_seller_spu": "SPU_IPHONE15PM",
      "listing_seller_sku": "SKU_IP15PM_BK_256",
      "outer_packaging": 3,
      "outer_packaging_name": "Box(manual)",
      "inner_packaging": [
        {
          "consumable_id": "CS00015",
          "consumable_name": "Bubble Wrap",
          "count": 2
        }
      ]
    }
  ]
}

Response

{
  "retcode": 0,
  "message": "success",
  "data": {}
}

5.7 WMS向Vendor查询AGV设备信息

URL: /api/v2/automation/tovendor/basic/robot/query_agv_status

Request

{
  "whs_id": "SGL",
  "page_no": 1,
  "page_size": 20
}

Response

{
  "retcode": 0,
  "message": "success",
  "data": {
    "page_no": 1,
    "page_size": 20,
    "list": [
      {
        "robot_id": "00001",
        "robot_type": 1,
        "root_ip": "192.168.1.2",
        "battery": 85,
        "status_list": [
          {
            "connection_status": 1,
            "task_status": 3,
            "task_desc": "升举货架,移动中",
            "exception_status": 1,
            "exception_desc": "",
            "onsite_status": 1
          }
        ],
        "robot_direction": 180,
        "position_x": 15000,
        "position_y": 20000,
        "position_z": 0,
        "speed": 1500
      },
      {
        "robot_id": "00002",
        "robot_type": 2,
        "root_ip": "192.168.1.3",
        "battery": 45,
        "status_list": [
          {
            "connection_status": 1,
            "task_status": 2,
            "task_desc": "充电中",
            "exception_status": 1,
            "exception_desc": "",
            "onsite_status": 1
          }
        ],
        "robot_direction": 90,
        "position_x": 5000,
        "position_y": 8000,
        "position_z": 0,
        "speed": 0
      },
      {
        "robot_id": "00003",
        "robot_type": 1,
        "root_ip": "192.168.1.4",
        "battery": 20,
        "status_list": [
          {
            "connection_status": 2,
            "task_status": 5,
            "task_desc": "异常停止",
            "exception_status": 2,
            "exception_desc": "充电桩异常,无法充电",
            "onsite_status": 1
          }
        ],
        "robot_direction": 270,
        "position_x": 3000,
        "position_y": 4000,
        "position_z": 0,
        "speed": 0
      }
    ]
  }
}