开放平台

扒书 ERP Open API

开始孔网数据迁移

把孔网店铺的历史订单和商品迁到扒书。迁移是异步的,启动后用进度接口查状态。

请求方式POST
接口路径/api/shop/kfzMigrate/start
Content-Typeapplication/json
鉴权X-Nideshop-Token

请求体字段

字段类型必填说明
shopIdInteger是-
warehouseIdInteger是-
warehouseIdsArray<Integer>否可选:展示用,实际入库以 warehouseId 为准
codeType对象是-
keepRealPhotoBoolean否已固定为保留实拍图,入参忽略

curl 调用

curl -s 'https://www.8shu8.com/api/shop/kfzMigrate/start' \
  -H 'X-Nideshop-Token: YOUR_LOGIN_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "shopId": 1,
  "warehouseId": 1,
  "warehouseIds": [
    1
  ],
  "codeType": "...",
  "keepRealPhoto": true
}'

响应示例

{
  "code": 200,
  "message": "操作成功",
  "success": true,
  "data": {
    "batchId": "string",
    "total": 1,
    "successCount": 1,
    "failCount": 1,
    "errors": [
      "string"
    ]
  }
}

返回字段(data)

字段类型说明
batchIdString-
totalint-
successCountint-
failCountint-
errorsArray<String>-