第12章:出库订单

12.1 出库订单创建

12.1.1 接口说明

创建出库订单,支持批量创建,单次请求最多支持100个订单。批量创建时,每个订单独立处理,支持部分成功部分失败。订单创建成功后,系统会返回 IWIN 出库订单号(orderNo)和客户自定义出库订单号(referenceNo)。

收货地址支持:支持美国(US)和加拿大(CA)地址。创建订单时,请根据收货国家填写相应的地址格式,详见地址格式说明

重要说明:

  • 批量创建时,每个订单独立处理,互不影响
  • 如果部分订单成功、部分订单失败,success 字段返回 true(只要有一个订单成功)
  • 成功的订单在 result.successResultList 中返回
  • 失败的订单在 result.failedResultList 中返回,包含失败原因

12.1.2 请求信息

  • 接口地址POST /onixport/api/wms/outbound/create
  • 请求方式:POST
  • Content-Type:application/json

12.1.3 请求参数

字段名类型必填说明
outboundInfoListArray出库订单信息列表,最多100个
outboundInfoList[].warehouseCodeString发货仓库编码,可以从获取仓库信息接口获取
outboundInfoList[].referenceNoString客户自定义出库订单号,唯一,不允许重复(包括取消状态下),最大长度32,仅支持字母、数字、横线、斜线
outboundInfoList[].orderTypeInteger出库订单类型编码:1:Fulfil; 2:Replace; 3:Return
outboundInfoList[].carrierCodeInteger出库订单发货渠道编码:1:LTL; 2:UPS; 3:FedEx; 4:Hold; 5:USPS; 6:Will Call Pickup; 7:Onixport; 8:Others; 9:Amazon Pickup; 10:FTL
outboundInfoList[].shipDateString发货日期,格式:MM/dd/yyyy。发货日期设置规则详见发货日期设置规则
outboundInfoList[].specialInstructionString特殊指令信息,最大长度1024
outboundInfoList[].consigneeCompanyString收件人企业名称,最大长度35
outboundInfoList[].consigneeNameString收件人联系人姓名,最大长度70
outboundInfoList[].consigneePhoneString收件人联系电话,最大长度20,需符合美国或加拿大电话号码格式
outboundInfoList[].consigneeEmailString收件人联系邮箱,最大长度64
outboundInfoList[].consigneeAddress1String收件详细地址1,最大长度35
outboundInfoList[].consigneeAddress2String收件详细地址2,最大长度35
outboundInfoList[].consigneeZipcodeString收件邮编,美国或加拿大地址正常邮编,最大长度20
outboundInfoList[].consigneeCityString收件城市,最大长度35
outboundInfoList[].consigneeStateString收件州/省,最大长度8。美国使用州代码(如:CA、NY),加拿大使用省代码(如:ON、BC)
outboundInfoList[].consigneeCountryString收件国家,最大长度2。支持:US(美国)、CA(加拿大)
outboundInfoList[].itemListArray出库订单明细列表
outboundInfoList[].itemList[].skuStringSKU,SKU信息必须已经在商品库中已维护,最大长度128
outboundInfoList[].itemList[].inventoryTypeIntegerSKU出库的库存类型:1:New; 2:Refurbished
outboundInfoList[].itemList[].outboundQtyInteger出库数量,必须大于0

12.1.4 响应参数

字段名类型必填说明
successBoolean请求是否成功。只要有一个订单成功创建,该字段就返回 true
errorCodeInteger错误码。当 success=true 时,该字段为 null;当 success=false 时(所有订单都失败),该字段有值
errorMsgString错误信息。当 success=true 时,该字段为 null;当 success=false 时(所有订单都失败),该字段有值
resultObject创建结果对象
result.successResultListArray成功创建的订单列表
result.successResultList[].orderNoStringIWIN系统返回出库订单号,唯一,可以根据此订单号拉取订单信息或更新订单信息
result.successResultList[].referenceNoString客户自定义出库订单号,也可以根据此订单号拉取订单信息或更新订单信息
result.successResultList[].successBoolean订单是否创建成功,成功时为 true
result.successResultList[].errorCodeInteger错误原因代码,当订单创建成功时为 null
result.successResultList[].errorMsgString错误原因描述,当订单创建成功时为 null
result.failedResultListArray失败创建的订单列表
result.failedResultList[].orderNoStringIWIN系统返回出库订单号,订单创建失败时可能为 null
result.failedResultList[].referenceNoString客户自定义出库订单号
result.failedResultList[].successBoolean订单是否创建成功,失败时为 false
result.failedResultList[].errorCodeInteger错误原因代码,当订单创建失败时才有值,可根据错误码以及错误原因定位问题
result.failedResultList[].errorMsgString错误原因描述,当订单创建失败时才有值,可根据错误码以及错误原因定位问题

12.1.5 请求示例

示例1:美国地址

{
  "outboundInfoList": [
    {
      "warehouseCode": "W1",
      "referenceNo": "VIBE-245662",
      "orderType": 1,
      "carrierCode": 2,
      "shipDate": "11/15/2025",
      "specialInstruction": "Handle with care",
      "consigneeCompany": "ABC Company",
      "consigneeName": "John Doe",
      "consigneePhone": "1234567890",
      "consigneeEmail": "john@example.com",
      "consigneeAddress1": "123 Main St",
      "consigneeAddress2": "Suite 100",
      "consigneeZipcode": "90001",
      "consigneeCity": "Los Angeles",
      "consigneeState": "CA",
      "consigneeCountry": "US",
      "itemList": [
        {
          "sku": "SKU123456",
          "inventoryType": 1,
          "outboundQty": 10
        }
      ]
    }
  ]
}

示例2:加拿大地址

{
  "outboundInfoList": [
    {
      "warehouseCode": "W1",
      "referenceNo": "VIBE-245663",
      "orderType": 1,
      "carrierCode": 2,
      "shipDate": "11/15/2025",
      "specialInstruction": "Handle with care",
      "consigneeCompany": "XYZ Company",
      "consigneeName": "Jane Smith",
      "consigneePhone": "4161234567",
      "consigneeEmail": "jane@example.com",
      "consigneeAddress1": "456 Yonge Street",
      "consigneeAddress2": "Unit 200",
      "consigneeZipcode": "M5B 2H4",
      "consigneeCity": "Toronto",
      "consigneeState": "ON",
      "consigneeCountry": "CA",
      "itemList": [
        {
          "sku": "SKU123456",
          "inventoryType": 1,
          "outboundQty": 10
        }
      ]
    }
  ]
}

12.1.6 响应示例

全部成功响应

{
  "success": true,
  "errorCode": null,
  "errorMsg": null,
  "result": {
    "successResultList": [
      {
        "orderNo": "POT13424424",
        "referenceNo": "VIBE-245662",
        "success": true,
        "errorCode": null,
        "errorMsg": null
      },
      {
        "orderNo": "POT13424425",
        "referenceNo": "VIBE-245663",
        "success": true,
        "errorCode": null,
        "errorMsg": null
      }
    ],
    "failedResultList": []
  }
}

部分成功部分失败响应

{
  "success": true,
  "errorCode": null,
  "errorMsg": null,
  "result": {
    "successResultList": [
      {
        "orderNo": "POT13424424",
        "referenceNo": "VIBE-245662",
        "success": true,
        "errorCode": null,
        "errorMsg": null
      }
    ],
    "failedResultList": [
      {
        "orderNo": null,
        "referenceNo": "VIBE-245663",
        "success": false,
        "errorCode": 1000,
        "errorMsg": "SKU不存在"
      },
      {
        "orderNo": null,
        "referenceNo": "VIBE-245664",
        "success": false,
        "errorCode": 2003,
        "errorMsg": "referenceNo已存在"
      }
    ]
  }
}

全部失败响应

{
  "success": false,
  "errorCode": 1000,
  "errorMsg": "无效的参数",
  "result": null
}

12.1.7 错误码说明

错误码说明解决方案
1000无效的参数检查请求参数是否完整、格式正确
2003当前的数据不支持此操作检查数据状态

12.1.8 注意事项

1. 批量处理机制

  • 单次请求最多支持100个订单,超过限制的订单将被丢弃
  • 每个订单独立处理,互不影响
  • 部分订单成功、部分订单失败时,success 返回 true

2. 成功订单处理

  • 成功的订单在 result.successResultList 中返回
  • 包含 orderNo(IWIN系统生成的订单号)和 referenceNo(客户自定义订单号)
  • 可以根据 orderNoreferenceNo 拉取订单信息或更新订单

3. 失败订单处理

  • 失败的订单在 result.failedResultList 中返回
  • 包含 referenceNoerrorCodeerrorMsg
  • 调用方应根据错误信息修正后重新提交失败的订单

4. 业务规则

  • referenceNo 必须唯一,包括已取消的订单
  • SKU 必须在商品库中已维护,否则创建失败
  • 出库数量必须大于0

5. 收货地址支持

  • 支持美国(US)和加拿大(CA)地址
  • 美国地址:使用州代码(如:CA、NY),邮编为5位或9位数字(如:90001、90001-1234)
  • 加拿大地址:使用省代码(如:ON、BC、QC),邮编为6位字符格式(如:M5B 2H4、K1A 0B1)
  • 电话号码格式:美国为10位数字,加拿大为10位数字(可能包含区号)

6. 调用方建议

  • 检查 result.successResultListresult.failedResultList 两个列表
  • 对失败的订单进行错误处理,修正后重新提交
  • 建议分批提交,每批不超过 100 个订单,以提高成功率

12.1.9 发货日期设置规则

发货日期(shipDate)的设置遵循以下规则:

规则1:不传递发货日期时

如果不传递 shipDate 参数,系统会根据仓库截单时间订单推送日期自动设置发货日期:

  • 情况A:如果推送时间早于当日仓库截单时间
  • 发货日期 = 仓库所在地的当前日期
  • 情况B:如果推送时间晚于或等于当日仓库截单时间
  • 发货日期 = 仓库所在地当前日期的下一天

示例

  • 假设仓库截单时间为 17:00:00(下午5点)
  • 如果订单在 2025-11-13 14:00:00 推送(早于截单时间)
  • 发货日期 = 2025-11-13(当天)
  • 如果订单在 2025-11-13 18:00:00 推送(晚于截单时间)
  • 发货日期 = 2025-11-14(下一天)

规则2:传递发货日期时

如果传递了 shipDate 参数,系统会根据传递的发货日期和订单推送时间进行判断:

  • 情况A:传递的发货日期为仓库所在地的当前日期
  • 子情况A1:如果推送时间早于当日仓库截单时间
  • 发货日期 = 传递的发货日期(保持不变)
  • 子情况A2:如果推送时间晚于或等于当日仓库截单时间
  • 发货日期 = 仓库所在地当前日期的下一天(自动变更)
  • 情况B:传递的发货日期不是仓库所在地的当前日期
  • 发货日期 = 传递的发货日期(保持不变)

示例

  • 假设仓库截单时间为 17:00:00(下午5点)
  • 当前日期为 2025-11-13
  • 如果传递 shipDate = "11/13/2025"(当前日期)
  • 订单在 14:00:00 推送(早于截单时间)→ 发货日期 = 11/13/2025(保持不变)
  • 订单在 18:00:00 推送(晚于截单时间)→ 发货日期 = 11/14/2025(自动变更为下一天)
  • 如果传递 shipDate = "11/15/2025"(未来日期)
  • 无论何时推送 → 发货日期 = 11/15/2025(保持不变)

重要说明

1. 时区:所有时间判断均基于仓库所在地的时区(可通过仓库信息接口获取 timeZone 字段)

2. 截单时间:每个仓库的截单时间可能不同,可通过仓库信息接口获取 cutoffTime 字段

3. 自动调整:系统会自动根据规则调整发货日期,无需调用方额外处理

4. 建议:如果对发货日期有明确要求,建议传递 shipDate 参数,并确保传递的日期符合业务需求


12.2 出库订单更新

12.2.1 接口说明

更新出库订单信息,仅支持 Pending 和 Special 状态下的出库订单更新。订单状态变更为 Working 后,订单信息将无法修改。

收货地址支持:支持美国(US)和加拿大(CA)地址。更新订单时,请根据收货国家填写相应的地址格式,详见地址格式说明

12.2.2 请求信息

  • 接口地址PUT /onixport/api/wms/outbound/update/{orderNo}
  • 请求方式:PUT
  • Content-Type:application/json

12.2.3 路径参数

参数名类型必填说明
orderNoStringIWIN出库订单号,示例:POT13424424

12.2.4 请求参数

字段名类型必填说明
warehouseCodeString发货仓库编码,可以从获取仓库信息接口获取
referenceNoString客户自定义出库订单号,唯一,不允许重复(包括取消状态下),最大长度32,仅支持字母、数字、横线、斜线
orderTypeInteger出库订单类型编码:1:Fulfil; 2:Replace; 3:Return
carrierCodeInteger出库订单发货渠道编码:1:LTL; 2:UPS; 3:FedEx; 4:Hold; 5:USPS; 6:Will Call Pickup; 7:Onixport; 8:Others; 9:Amazon Pickup; 10:FTL
shipDateString发货日期,格式:MM/dd/yyyy。如果不传递,则根据仓库截单时间+订单推送日期自动设置
specialInstructionString特殊指令信息,最大长度1024
consigneeCompanyString收件人企业名称,最大长度35
consigneeNameString收件人联系人姓名,最大长度70
consigneePhoneString收件人联系电话,最大长度20,需符合美国或加拿大电话号码格式
consigneeEmailString收件人联系邮箱,最大长度64
consigneeAddress1String收件详细地址1,最大长度35
consigneeAddress2String收件详细地址2,最大长度35
consigneeZipcodeString收件邮编,美国或加拿大地址正常邮编,最大长度20
consigneeCityString收件城市,最大长度35
consigneeStateString收件州/省,最大长度8。美国使用州代码(如:CA、NY),加拿大使用省代码(如:ON、BC)
consigneeCountryString收件国家,最大长度2。支持:US(美国)、CA(加拿大)
itemListArray出库订单明细列表
itemList[].skuStringSKU,SKU信息必须已经在商品库中已维护,最大长度128
itemList[].inventoryTypeIntegerSKU出库的库存类型:1:New; 2:Refurbished
itemList[].outboundQtyInteger出库数量,必须大于0

12.2.5 响应参数

字段名类型必填说明
successBoolean请求是否成功
errorCodeInteger错误码。当 success=true 时,该字段为 null;当 success=false 时,该字段有值
errorMsgString错误信息。当 success=true 时,该字段为 null;当 success=false 时,该字段有值
resultObject更新结果
result.orderNoStringIWIN出库订单号,唯一,可以根据IWIN出库订单号拉取订单信息,或者更新订单信息
result.referenceNoString客户自定义出库订单号,也可以根据自定义出库订单号拉取订单信息,或者更新订单信息
result.successBoolean订单是否更新成功
result.errorCodeInteger错误原因代码,当订单更新失败时才有值,可根据错误码以及错误原因定位问题。当 success=true 时,该字段为 null;当 success=false 时,该字段有值
result.errorMsgString错误原因描述,当订单更新失败时才有值,可根据错误码以及错误原因定位问题。当 success=true 时,该字段为 null;当 success=false 时,该字段有值

12.2.6 请求示例

示例1:美国地址

PUT /onixport/api/wms/outbound/update/POT13424424
Content-Type: application/json

{
  "warehouseCode": "W1",
  "referenceNo": "VIBE-245662",
  "orderType": 1,
  "carrierCode": 2,
  "shipDate": "11/16/2025",
  "consigneeCompany": "ABC Company",
  "consigneeName": "John Doe",
  "consigneePhone": "1234567890",
  "consigneeEmail": "john@example.com",
  "consigneeAddress1": "123 Main St",
  "consigneeAddress2": "Suite 100",
  "consigneeZipcode": "90001",
  "consigneeCity": "Los Angeles",
  "consigneeState": "CA",
  "consigneeCountry": "US",
  "itemList": [
    {
      "sku": "SKU123456",
      "inventoryType": 1,
      "outboundQty": 15
    }
  ]
}

示例2:加拿大地址

PUT /onixport/api/wms/outbound/update/POT13424425
Content-Type: application/json

{
  "warehouseCode": "W1",
  "referenceNo": "VIBE-245663",
  "orderType": 1,
  "carrierCode": 2,
  "shipDate": "11/16/2025",
  "consigneeCompany": "XYZ Company",
  "consigneeName": "Jane Smith",
  "consigneePhone": "4161234567",
  "consigneeEmail": "jane@example.com",
  "consigneeAddress1": "456 Yonge Street",
  "consigneeAddress2": "Unit 200",
  "consigneeZipcode": "M5B 2H4",
  "consigneeCity": "Toronto",
  "consigneeState": "ON",
  "consigneeCountry": "CA",
  "itemList": [
    {
      "sku": "SKU123456",
      "inventoryType": 1,
      "outboundQty": 15
    }
  ]
}

12.2.7 响应示例

成功响应

{
  "success": true,
  "errorCode": null,
  "errorMsg": null,
  "result": {
    "orderNo": "POT13424424",
    "referenceNo": "VIBE-245662",
    "success": true,
    "errorCode": null,
    "errorMsg": null
  }
}

失败响应

{
  "success": false,
  "errorCode": 2003,
  "errorMsg": "当前的数据不支持此操作",
  "result": null
}

12.2.8 错误码说明

错误码说明解决方案
1000无效的参数检查请求参数是否完整、格式正确
2003当前的数据不支持此操作订单状态不是 Pending 或 Special,无法更新

12.2.9 注意事项

1. 仅支持 Pending 和 Special 状态的订单更新

2. 订单状态变更为 Working 后,订单信息将无法修改

3. 更新订单时,需要传递完整的订单信息

4. 收货地址支持

  • 支持美国(US)和加拿大(CA)地址
  • 美国地址:使用州代码(如:CA、NY),邮编为5位或9位数字(如:90001、90001-1234)
  • 加拿大地址:使用省代码(如:ON、BC、QC),邮编为6位字符格式(如:M5B 2H4、K1A 0B1)
  • 电话号码格式:美国为10位数字,加拿大为10位数字(可能包含区号)

12.3 拉取出库订单信息

12.3.1 接口说明

根据 IWIN 出库订单号或客户自定义出库订单号拉取出库订单信息。系统优先使用 IWIN 出库订单号查询,仅当 orderNoList 没有传递值时,才会使用 referenceNoList 查询。支持批量查询,单次请求最多允许查询200个订单。

12.3.2 请求信息

  • 接口地址POST /onixport/api/wms/outbound/info
  • 请求方式:POST
  • Content-Type:application/json

12.3.3 请求参数

字段名类型必填说明
orderNoListArrayIWIN出库订单号列表,单次请求最多支持100个订单信息查询,超过100个则丢弃不会返回对应的订单信息
referenceNoListArray客户自定义出库订单号列表,仅当orderNoList没有传递值时,才会使用ReferenceNo查询订单信息。单次请求最多支持100个订单信息查询,超过100个则丢弃不会返回对应的订单信息

注意:orderNoList 和 referenceNoList 至少需要传递一个。

12.3.4 响应参数

字段名类型必填说明
successBoolean请求是否成功
errorCodeInteger错误码。当 success=true 时,该字段为 null;当 success=false 时,该字段有值
errorMsgString错误信息。当 success=true 时,该字段为 null;当 success=false 时,该字段有值
resultArray出库订单信息列表
result[].orderNoStringIWIN出库订单号
result[].referenceNoString客户定义参考订单号
result[].warehouseCodeString发货仓库编码
result[].warehouseNameString发货仓库名称
result[].orderTypeInteger出库订单类型:1:Fulfil; 2:Replace; 3:Return
result[].orderTypeDescString出库订单类型描述
result[].statusInteger订单状态编码:10:Pending; 20:Working; 30:Fulfiled; 40:Hold; 50:Special; 60:Cancelled
result[].statusDescString订单状态描述
result[].truckerCodeString如果Carrier是LTL(carrierCode=1),卡车编码。可选值见下方TruckerCode列表
result[].truckerNameString如果Carrier是LTL(carrierCode=1),卡车名称。可选值见下方TruckerName列表
result[].trackingStatusInteger运输状态:0:Label Created; 10:Picked Up; 20:In Transit; 30:Delivered; 99:Exception; 100:Unknown。Picked Up之后订单信息不会再改变
result[].trackingStatusDescString运输状态描述
result[].shipDateString发货日期,格式:MM/dd/yyyy
result[].consigneeCompanyString收件人企业名称
result[].consigneeNameString收件人联系人姓名
result[].consigneePhoneString收件人联系电话
result[].consigneeEmailString收件人联系邮箱
result[].consigneeCountryString收件人地址国家
result[].consigneeStateString收件人地址州/省二字码
result[].consigneeCityString收件人地址城市名称
result[].consigneeZipcodeString收件人地址邮编
result[].consigneeAddress1String收件人详细地址1
result[].consigneeAddress2String收件人详细地址2
result[].specialInstructionString特殊指令
result[].trackingNoArray跟踪号列表,如果发货渠道是快递并且是多包裹的话跟踪号是多个(也是发货明细中的跟踪号汇总)。如果是卡车,则是一个
result[].carrierCodeInteger发货渠道编码
result[].carrierNameString发货渠道名称
result[].specialReasonString如果订单状态是Special,说明订单在确认发货时信息出现问题,可在此处查看错误原因
result[].updateAtLong出库订单更新时间戳。可以根据时间戳判断出库订单数据是否存在更新,如果更新时间戳大于上一次调用API时间,则说明数据发生了改变
result[].itemListArray出库订单明细
result[].itemList[].skuStringSKU
result[].itemList[].commodityNameString品名
result[].itemList[].inventoryTypeIntegerSKU对应的出库的库存类型编码
result[].itemList[].inventoryTypeDescStringSKU对应的出库的库存类型描述
result[].itemList[].outboundQtyIntegerSKU对应的出库数量
result[].shippedItemListArray出库订单发货明细,当出库订单状态变更为Working后才会有发货明细的值
result[].shippedItemList[].packageNoString当前出库订单的发货明细的包裹编号,此订单下唯一
result[].shippedItemList[].skuStringSKU
result[].shippedItemList[].commodityNameString品名
result[].shippedItemList[].inventoryTypeIntegerSKU对应的出库的库存类型编码
result[].shippedItemList[].inventoryTypeDescStringSKU对应的出库的库存类型描述
result[].shippedItemList[].outboundQtyIntegerSKU对应的出库数量
result[].shippedItemList[].serialNoStringSKU对应的出库的货物序列号
result[].shippedItemList[].trackingNoStringSKU对应的出库的货物的跟踪号

注意truckerCodetruckerName 字段仅在 carrierCode=1(LTL)时返回。

TruckerCode 列表

carrierCode=1(LTL)时,truckerCodetruckerName 的可能值如下:

TruckerCodeTruckerName
UPGFTForce Freight
ABFSABF Freight
DYLTDaylight Transport
EXLAEstes Express Lines
SAIASaia LTL Freight
SEFLSoutheastern Freight Lines
PIOTPilot Freight Service
ONIXPORTOnixport

12.3.5 请求示例

{
  "orderNoList": ["POT13424424", "POT13424425"],
  "referenceNoList": ["VIBE-245662"]
}

12.3.6 响应示例

成功响应

{
  "success": true,
  "errorCode": null,
  "errorMsg": null,
  "result": [
    {
      "orderNo": "POT13424424",
      "referenceNo": "VIBE-245662",
      "warehouseCode": "W1",
      "warehouseName": "LA Warehouse",
      "orderType": 1,
      "orderTypeDesc": "Fulfil",
      "status": 20,
      "statusDesc": "Working",
      "trackingStatus": 10,
      "trackingStatusDesc": "Picked Up",
      "shipDate": "11/15/2025",
      "consigneeCompany": "ABC Company",
      "consigneeName": "John Doe",
      "consigneePhone": "1234567890",
      "consigneeEmail": "john@example.com",
      "consigneeCountry": "US",
      "consigneeState": "CA",
      "consigneeCity": "Los Angeles",
      "consigneeZipcode": "90001",
      "consigneeAddress1": "123 Main St",
      "consigneeAddress2": "Suite 100",
      "specialInstruction": "Handle with care",
      "trackingNo": ["1Z999AA10123456784"],
      "carrierCode": 1,
      "carrierName": "LTL",
      "truckerCode": "UPGF",
      "truckerName": "TForce Freight",
      "updateAt": 1699876800000,
      "itemList": [
        {
          "sku": "SKU123456",
          "commodityName": "iPhone 15 Case",
          "inventoryType": 1,
          "inventoryTypeDesc": "New",
          "outboundQty": 10
        }
      ],
      "shippedItemList": [
        {
          "packageNo": "PKG001",
          "sku": "SKU123456",
          "commodityName": "iPhone 15 Case",
          "inventoryType": 1,
          "inventoryTypeDesc": "New",
          "outboundQty": 10,
          "serialNo": "SN123456789",
          "trackingNo": "1Z999AA10123456784"
        }
      ]
    }
  ]
}

失败响应

{
  "success": false,
  "errorCode": 1000,
  "errorMsg": "无效的参数",
  "result": null
}

12.3.7 错误码说明

错误码说明解决方案
1000无效的参数检查请求参数是否完整、格式正确

12.3.8 注意事项

1. 系统优先使用 IWIN 出库订单号(orderNoList)查询

2. 仅当 orderNoList 没有传递值时,才会使用 referenceNoList 查询

3. 单次请求最多支持100个订单查询,超过限制的订单将被丢弃

4. shippedItemList 仅在订单状态为 Working 及之后状态时返回

5. updateAt 字段说明updateAt 为出库订单更新时间戳(Unix 时间戳,毫秒),可用于判断订单数据是否发生变化。建议调用方记录上次查询的时间戳,如果本次返回的 updateAt 大于上次查询时间,说明订单数据已更新,需要重新处理订单信息


12.4 出库订单取消

12.4.1 接口说明

取消指定的出库订单。仅支持特定状态下的订单取消操作。

支持取消的订单状态:

  • Pending(待处理)
  • Working(处理中)
  • Special(特殊状态)
  • Fulfiled(已发货),但仅当 Tracking Status 为 Label Created(标签已创建)时可以取消

不支持取消的订单状态:

  • Hold(暂停)
  • Cancelled(已取消)
  • Fulfiled(已发货)且 Tracking Status 不为 Label Created(已揽收、运输中、已签收或异常)

12.4.2 请求信息

  • 接口地址PUT /onixport/api/wms/outbound/cancel
  • 请求方式:PUT
  • Content-Type:application/json

12.4.3 请求参数

字段名类型必填说明
orderNoStringIWIN出库订单号

12.4.4 响应参数

字段名类型必填说明
successBoolean请求是否成功
errorCodeInteger错误码。当 success=true 时,该字段为 null;当 success=false 时,该字段有值
errorMsgString错误信息。当 success=true 时,该字段为 null;当 success=false 时,该字段有值
resultnull-无返回数据

12.4.5 请求示例

{
  "orderNo": "POT13424424"
}

12.4.6 响应示例

成功响应

{
  "success": true,
  "errorCode": null,
  "errorMsg": null,
  "result": null
}

失败响应

{
  "success": false,
  "errorCode": 2003,
  "errorMsg": "当前的数据不支持此操作",
  "result": null
}

12.4.7 错误码说明

错误码说明解决方案
2003当前的数据不支持此操作订单状态不允许取消操作(Hold、Cancelled 状态不支持取消;Fulfiled 状态且 Tracking Status 不为 Label Created 时也不支持取消)

12.4.8 注意事项

1. 支持取消的订单状态

  • Pending(待处理)
  • Working(处理中)
  • Special(特殊状态)
  • Fulfiled(已发货)且 Tracking Status 为 Label Created(标签已创建)

2. 不支持取消的订单状态

  • Hold(暂停)
  • Cancelled(已取消)
  • Fulfiled(已发货)且 Tracking Status 不为 Label Created(已揽收、运输中、已签收或异常)

3. Fulfiled 状态订单取消规则

  • 当订单状态为 Fulfiled 且 Tracking Status 为 Label Created(标签已创建)时,可以取消
  • 当订单状态为 Fulfiled 且 Tracking Status 为 Picked Up(已揽收)、In Transit(运输中)、Delivered(已签收)或 Exception(异常)时,无法取消

12.5 出库订单Hold

12.5.1 接口说明

对指定的出库订单执行 Hold 操作,暂停订单处理。注意:仅 Working 和 Fulfiled 状态的订单支持 Hold 操作。

12.5.2 请求信息

  • 接口地址PUT /onixport/api/wms/outbound/hold
  • 请求方式:PUT
  • Content-Type:application/json

12.5.3 请求参数

字段名类型必填说明
orderNoStringIWIN出库订单号

12.5.4 响应参数

字段名类型必填说明
successBoolean请求是否成功
errorCodeInteger错误码。当 success=true 时,该字段为 null;当 success=false 时,该字段有值
errorMsgString错误信息。当 success=true 时,该字段为 null;当 success=false 时,该字段有值
resultnull-无返回数据

12.5.5 请求示例

{
  "orderNo": "POT13424424"
}

12.5.6 响应示例

成功响应

{
  "success": true,
  "errorCode": null,
  "errorMsg": null,
  "result": null
}

失败响应

{
  "success": false,
  "errorCode": 2003,
  "errorMsg": "当前的数据不支持此操作",
  "result": null
}

12.5.7 错误码说明

错误码说明解决方案
2003当前的数据不支持此操作订单状态不允许Hold操作(仅 Working 和 Fulfiled 状态支持 Hold 操作)

12.5.8 注意事项

1. 仅 Working 和 Fulfiled 状态的订单支持 Hold 操作

2. Hold 操作会暂停订单处理

3. 其他状态的订单无法执行 Hold 操作


12.6 出库订单删除

12.6.1 接口说明

删除指定的出库订单。注意:仅 Pending 和 Special 状态下的出库订单允许删除。删除操作不可恢复,请谨慎操作。

12.6.2 请求信息

  • 接口地址DELETE /onixport/api/wms/outbound/delete
  • 请求方式:DELETE
  • Content-Type:application/json

12.6.3 请求参数

字段名类型必填说明
orderNoStringIWIN出库订单号,示例:POT13424424

12.6.4 响应参数

字段名类型必填说明
successBoolean请求是否成功
errorCodeInteger错误码。当 success=true 时,该字段为 null;当 success=false 时,该字段有值
errorMsgString错误信息。当 success=true 时,该字段为 null;当 success=false 时,该字段有值
resultnull-无返回数据

12.6.5 请求示例

{
  "orderNo": "POT13424424"
}

12.6.6 响应示例

成功响应

{
  "success": true,
  "errorCode": null,
  "errorMsg": null,
  "result": null
}

失败响应

{
  "success": false,
  "errorCode": 2003,
  "errorMsg": "当前的数据不支持此操作",
  "result": null
}

12.6.7 错误码说明

错误码说明解决方案
1000无效的参数检查请求参数是否完整、格式正确
2003当前的数据不支持此操作订单状态不是 Pending 或 Special,无法删除

12.6.8 注意事项

1. 仅支持 Pending 和 Special 状态的订单删除

2. 删除操作不可恢复,请谨慎操作

3. 其他状态的订单无法删除


12.7 订单状态说明

12.7.1 订单状态

状态码状态描述说明
10Pending待处理
20Working处理中
30Fulfiled已完成
40Hold暂停
50Special异常
60Cancelled已取消

12.7.2 运输状态

状态码状态描述说明
0Label Created标签已创建
10Picked Up已揽收
20In Transit运输中
30Delivered已签收
99Exception异常
100Unknown未知

注意:Picked Up 之后订单信息不会再改变。

12.7.3 订单类型

类型码类型描述说明
1Fulfil正常履约
2Replace换货
3Return退货

12.7.4 发货渠道

渠道码渠道名称说明
1LTL零担运输
2UPSUPS快递
3FedExFedEx快递
4Hold暂停发货
5USPS美国邮政
6Will Call Pickup客户自提
7OnixportOnixport物流
8Others其他
9Amazon PickupAmazon自提
10FTL整车运输

12.7.5 库存类型

类型码类型描述说明
1New新品
2Refurbished翻新
3Recycle回收