1.1. 入库单查询接口
post {HTTP(S)地址}/api/{version}/asn
1.1.1. SERVICE_TYPE
QUERY_ASN_LIST
1.1.2. 请求参数
参数 | 是否必须 | 类型 | 示例 | 备注 |
---|---|---|---|---|
warehouseName | N | String | 马来仓库 | 仓库名称 |
type | N | String | PURCHASE | 入库单类型,见枚举 |
status | N | String | NEW | 入库单状态,见枚举 |
tag | N | AsnTag(Object) | 下发状态对象,见AsnTag | |
skuKeyWord | N | String | S90/花露水 | 多字段检索,商品sku/名称 |
number | N | String | 2011asd | 多字段检索,入库单号,业务单号,参考号 |
trackNumber | N | String | 2011asd | 跟踪号 |
page | Y | Number | 1 | 页码,默认1 |
pageSize | Y | Number | 100 | 每页条数.不超过200条; 默认100 |
timeType | N | String | CREATE_TIME timeFrom、timeEnd、timeType任一字段有值其余字段必须有值 | 时间类型: 创建时间CREATE_TIME、 入库时间STOCK_IN_TIME、 完成时间FINISH_TIME、 更新时间UPDATE_TIME |
timeFrom | N | String | 2022-09-26 | 开始日期 |
timeEnd | N | String | 2022-09-26 | 结束日期 |
AsnTag(入库单下发状态)
参数 | 是否必须 | 类型 | 示例 | 备注 |
---|---|---|---|---|
sendWms | N | int | 1 | 已下发 |
sendFailed | N | int | 1 | 下发失败 |
receiveException | N | int | 1 | 收货异常 |
1.1.3. 返回参数
参数 | 是否必须 | 类型 | 示例 | 备注 |
---|---|---|---|---|
errorCode | Y | String | “DATA_INPUT_ERROR” | 错误码 |
errorMsg | Y | String | “输入参数不对” | 业务错误信息 |
state | Y | String | success | 请求结果 |
total | Y | Number | 100 | 总条数 |
result | Y | List<Asn> | 详见 Asn |
Asn(入库单)
参数 | 是否必须 | 类型 | 示例 | 备注 |
---|---|---|---|---|
asnNumber | Y | String | A20220905 | 入库单号 |
businessNumber | Y | String | B20220905 | 业务单号 |
customNumber | N | String | C20220905 | 参考号 |
trackNumber | N | String | T20220905 | 跟踪号 |
warehouseName | Y | String | 马来仓库 | 收货仓库名称 |
type | Y | String | PURCHASE | 入库单类型见枚举 |
status | Y | String | NEW | 入库单状态见枚举 |
remark | N | String | Quick | 备注 |
createTime | Y | String | 2022-09-05 15:27:18 | 创建时间 |
updateTime | N | String | 2022-09-05 15:27:18 | 修改时间 |
stockInTime | N | String | 2022-09-05 15:27:18 | 最近入库时间 |
finishTime | N | String | 2022-09-05 15:27:18 | 完成时间 |
purchasePriceCurrency | Y | String | CNY | 采购价币种,见枚举 |
firstLegPriceCurrency | Y | String | CNY | 头程费用币种,见枚举 |
transferPriceCurrency | Y | String | CNY | 调拨费用币种,见枚举 |
asnSkuVOList | Y | List<AsnSku> | 见AsnSku | |
asnCustomFieldValueVOList | N | List<SkuCustomFieldValueVO> |
SkuCustomFieldValueVO(自定义栏位信息)
参数 | 是否必须 | 类型 | 示例 | 备注 |
---|---|---|---|---|
tableName | Y | String | SYS_ITEM | SYS_ITEM:系统商品自定义栏位; SYS_ORDER:订单自定义栏位; SYS_ODO:出库单自定义栏位; SYS_ASN:入库单自定义栏位。 |
columType | Y | String | NUMBER | 筛选不同填入类型的自定义栏位 NUMBER:数字; DATE:日期; STRING:字符串; SELECT:下拉框。 |
columName | Y | String | 生产日期 | 用户自己定义的栏位名称 |
defaultValue | N | String | "1970/01/01"(无双引号) | 自定义栏位默认值 |
candidateValue | N | String | ["1970/01/01","1970/01/02"] | 下拉框的候选值 |
remark | N | String | 上架日期区分于出厂日期 | 备注 |
required | N | Integer | 1 | 是否只查询必填栏位 1:true;0:false |
isQuery | N | Integer | 1 | 是否只查询支持查询的栏位 1:true;0:false |
isShow | N | Integer | 1 | 是否只查询支持列配置的栏位 1:true;0:false |
AsnSku(入库单商品)
参数 | 是否必须 | 类型 | 示例 | 备注 |
---|---|---|---|---|
sku | Y | String | S90 | 商品sku |
title | Y | String | 商品标题 | 商品标题 |
purchasePrice | Y | BigDecimal | 100.0000 | 采购价,4位小数 |
firstLegPrice | Y | BigDecimal | 100.00 | 头程费用,2位小数 |
transferPrice | Y | BigDecimal | 100.0000 | 调拨费用,4位小数 |
expectQuantity | Y | Long | 100 | 采购数量 |
receiveQuantity | Y | Long | 10 | 已收数量 |
goodNum | Y | Long | 10 | 良品数量 |
damageNum | Y | Long | 0 | 不良品数量 |
请求示例:
curl --location --request POST 'https://gerp-test1.800best.com/api/v1/asn' \
--form 'appId="TEST"' \
--form 'serviceType="QUERY_ASN_LIST"' \
--form 'bizParam="{\"page\":1,\"pageSize\":3}"' \
--form 'timestamp="1756865700001"' \
--form 'sign="72309a741bb0b39db6a8a1144bf1c9d9"'
返回示例:
{
"state": "success",
"errorCode": "",
"errorMsg": "",
"bizContent": "{\"notSuccess\":false,\"result\":[{\"asnNumber\":\"A250903149242\",\"asnSkuVOList\":[{\"damageNum\":0,\"expectBadQuantity\":0,\"expectQuantity\":30,\"firstLegPrice\":10.00,\"goodNum\":0,\"isDeleted\":0,\"perBoxQuantity \":1,\"purchasePrice\":100.0000,\"receiveQuantity\":0,\"sku\":\"sea002\",\"title\":\"海仓测试商品\",\"transferPrice\":10.0000}],\"containerNumber\":\"12112\",\"createTime\":\"2025-09-03 14:12:52\",\"customNumber\":\"111\",\"firstLegPriceCurrency\":\"CNY\",\"isDeleted\":0,\"logisticsName\":\"0724-BEST_ChannelName\",\"purchasePriceCurrency\":\"CNY\",\"remark\":\"111\",\"status\":\"SHIPPING\",\"tag\":{\"boxedNeedSend\":0,\"comparedTagValue\":63,\"fullTagValue\":2,\"overcharge\":0,\"receiveException\":0,\"relation\":0,\"sendFailed\":1,\"sendWms\":0,\"waitBoxing\":0},\"trackNumber\":\"1121211\",\"transferPriceCurrency\":\"CNY\",\"type\":\"MANUAL\",\"updateTime\":\"2025-09-03 14:18:38\",\"warehouseName\":\"泰国演示1仓\"},{\"asnNumber\":\"A250903149241\",\"asnSkuVOList\":[{\"damageNum\":0,\"expectBadQuantity\":0,\"expectQuantity\":1,\"firstLegPrice\":1.00,\"goodNum\":0,\"isDeleted\":0,\"purchasePrice\":1.0000,\"receiveQuantity\":0,\"sku\":\"testgg01\",\"title\":\"Uji nama bahasa Cina\",\"transferPrice\":1.0000}],\"createTime\":\"2025-09-03 13:43:29\",\"customNumber\":\"1\",\"firstLegPriceCurrency\":\"CNY\",\"isDeleted\":0,\"logisticsName\":\"-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1\",\"purchasePriceCurrency\":\"CNY\",\"remark\":\"\",\"status\":\"SHIPPING\",\"tag\":{\"boxedNeedSend\":0,\"comparedTagValue\":63,\"fullTagValue\":2,\"overcharge\":0,\"receiveException\":0,\"relation\":0,\"sendFailed\":1,\"sendWms\":0,\"waitBoxing\":0},\"transferPriceCurrency\":\"CNY\",\"type\":\"MANUAL\",\"updateTime\":\"2025-09-03 13:43:37\",\"warehouseName\":\"best warehouse(测试用)\"},{\"asnNumber\":\"A250903149240\",\"asnSkuVOList\":[{\"damageNum\":0,\"expectBadQuantity\":0,\"expectQuantity\":200,\"goodNum\":200,\"isDeleted\":0,\"purchasePrice\":0.0100,\"receiveQuantity\":200,\"sku\":\"hmsku0903-02\",\"title\":\"黑咪sku0903-02\"},{\"damageNum\":0,\"expectBadQuantity\":0,\"expectQuantity\":200,\"goodNum\":200,\"isDeleted\":0,\"purchasePrice\":8.0000,\"receiveQuantity\":200,\"sku\":\"hmsku0903-01\",\"title\":\"黑咪sku0903-01\"}],\"createTime\":\"2025-09-03 13:35:59\",\"finishTime\":\"2025-09-03 13:36:16\",\"firstLegPriceCurrency\":\"CNY\",\"isDeleted\":0,\"purchasePriceCurrency\":\"CNY\",\"status\":\"FINISHED\",\"stockInTime\":\"2025-09-03 13:36:16\",\"tag\":{\"boxedNeedSend\":0,\"comparedTagValue\":63,\"fullTagValue\":0,\"overcharge\":0,\"receiveException\":0,\"relation\":0,\"sendFailed\":0,\"sendWms\":0,\"waitBoxing\":0},\"transferPriceCurrency\":\"CNY\",\"type\":\"MANUAL\",\"updateTime\":\"2025-09-03 13:36:16\",\"warehouseName\":\"自定义仓库1\"}],\"state\":\"success\",\"total\":10009}",
"requestId": "690772b1-4306-4bae-97a5-0c33db24ee68"
}
1.2. 入库单创建接口
1.2.1. SERVICE_TYPE
CREATE_ASN_ORDER
1.2.2. 请求参数
参数 | 是否必须 | 类型 | 示例 | 备注 |
---|---|---|---|---|
warehouseName | Y | String | 马来仓库 | 仓库名称 |
customNumber | N | String | C20220905 | 参考号(无值: 可重复创建入库单, 有值: 通过该值绑定入库单号保证唯一性),外部入库单号可以放在参考号中 |
trackNumber | N | String | T20220905 | 跟踪号 |
remark | N | String | Quick | 备注 |
purchasePriceCurrency | Y | String | CNY | 采购价币种,见枚举 |
firstLegPriceCurrency | Y | String | CNY | 头程费用币种,见枚举 |
transferPriceCurrency | Y | String | CNY | 调拨费用币种,见枚举 |
asnSkuVOList | Y | List<AsnSku> | 见AsnSku | |
sendWarehouseFlag | N | String | Y | 是否下发仓库。(Y:下发,空值或N:不下发。不区分大小写) |
preArriveTime | N | Date | 预计到货时间 | |
shippingType | N | String | 01 | 运输方式 可选值如下:01(海运)、02(空运)、03(快递)、04(陆运)、05(专车)、06(铁运)、07(字体)、08(其他) 传数字代码 |
containerModel | N | String | 20DC | 集装箱柜型 可选值如下:20’, 20DC, 20FR, 20GP, 20HQ, 20OT, 40‘, 40DC, 40FR, 40GOH, 40HC, 40HQ, 40HR, 40OT, 40RQ, 45‘, 45HC, 45HQ, 53HQ, 53 DRY VAN, 40GP, 45GP |
packageType | N | String | ASSEMBLY | 产品装箱方式 可选值如下:ASSEMBLY(整装)、MIXING(混装) |
boxCount | N | Int | 5 | 总箱数 |
customerType | N | String | 客户标识,无合作勿填写。shipper客户请传SHIPPER | |
asnCustomFieldValueVOList | N | SkuCustomFieldValueVO | ||
isSpecifyBatch | N | boolean | false | 是否指定货物批次 |
AsnSku(入库单商品)
参数 | 是否必须 | 类型 | 示例 | 备注 |
---|---|---|---|---|
sku | Y | String | S90 | 商品sku |
purchasePrice | Y | BigDecimal | 100.0000 | 采购价,4位小数 |
firstLegPrice | Y | BigDecimal | 100.00 | 头程费用,2位小数 |
transferPrice | Y | BigDecimal | 100.0000 | 调拨费用,4位小数 |
expectQuantity | Y | Long | 100 | 入库数量 |
skuStatus | N | String | GOOD | 货物状态,良品(GOOD),不良品(DAMAGE)默认良品 |
perBoxQuantity | N | Int | 3 | 箱规 |
apiCustom | N | String | ||
batchNo | N | String(255) | 批次号,仅对千易wms生效 | |
mfgDate | N | String | 2025-10-01 | 生产日期,仅对千易wms生效 |
expDate | N | String | 2025-10-01 | 失效日期,仅对千易wms生效 |
originCountry | N | String | CN | 生产地国家,仅对千易wms生效 |
SkuCustomFieldValueVO(自定义栏位)
参数 | 是否必须 | 类型 | 示例 | 备注 |
---|---|---|---|---|
customFieldId | Y | Long | 3 | SERVICE_TYPE中的CUSTOMER_FIELD_QUERY接口返回的id |
value | Y | String | “张三” | 自定义栏位对应的值 |
1.2.3. 返回参数
参数 | 是否必须 | 类型 | 示例 | 备注 |
---|---|---|---|---|
errorCode | Y | String | “DATA_INPUT_ERROR” | 错误码 |
errorMsg | Y | String | “输入参数不对” | 业务错误信息 |
state | Y | String | success | 请求结果 |
bizContent | N | String | "{\"result\":{\"asnNumber\":\"A250710162682\"}}" | JSON 字符串,包含erp入库单号 |
bizContent 若存在,其结构为:{"result":{"asnNumber":"A250710162682"}}。 创建入库单失败时,result 或 asnNumber 字段会缺失,请调用方注意兼容处理。
请求示例:
curl --location --request POST 'https://gerp-test1.800best.com/api/v1/asn' \
--form 'appId="TEST"' \
--form 'serviceType="CREATE_ASN_ORDER"' \
--form 'bizParam="{\"warehouseName\":\"台湾(名字不要瞎改)\",\"purchasePriceCurrency\":\"CNY\",\"firstLegPriceCurrency\":\"CNY\",\"transferPriceCurrency\":\"CNY\",\"asnSkuVOList\":[{
\"sku\":\"SKU0425007\",
\"purchasePrice\":10,
\"firstLegPrice\":0,
\"transferPrice\":0,
\"expectQuantity\":2,
\"skuStatus\":\"GOOD\"
},
{
\"sku\":\"SKU0425007\",
\"purchasePrice\":20,
\"firstLegPrice\":0,
\"transferPrice\":0,
\"expectQuantity\":3,
\"skuStatus\":\"GOOD\",
\"batchNo\":\"12345678911\",
\"mfgDate\":\"2025-05-31\",
\"expDate\":\"2025-06-31\",
\"originCountry\":\"CN\"
}]}"' \
--form 'timestamp="1731742317"' \
--form 'sign="14fbbedea8cb29fe3142d6853b257367"'
返回示例:
{
"state": "success",
"errorCode": "",
"errorMsg": "",
"bizContent": "{\"notSuccess\":false,\"result\":{\"arrivalStatus\":\"ARRIVED\",\"arrivedSkuQuantity\":0,\"arrivedTotalQuantity\":0,\"asnExtraJsonVO\":{},
\"asnNumber\":\"A250623145669\",\"asnSkuVOList\":[{\"arrived\":false,\"arrivedQuantity\":0,\"asnId\":44917,\"customFieldValueVOList\":[],\"customerId\":3,
\"customerIdForUser\":3,\"dimensionUnit\":\"cm\",\"dltQuantity\":0,\"expectBadQuantity\":0,\"expectGoodQuantity\":5,\"expectQuantity\":5,\"firstLegPrice\":0,
\"firstLegQuantity\":0,\"height\":9.0,\"id\":194757,\"isDeleted\":0,\"itemInfoVO\":{\"bizItemId\":194757,\"bizType\":\"ASN\",\"cartonDimensionUnit\":\"cm\",
\"cartonHeight\":9.0,\"cartonLength\":1.0,\"cartonWidth\":2.0,\"ccPriceUnit\":\"USD\",\"cdNetWeight\":1.0,\"cdPriceUnit\":\"USD\",\"cdWeight\":2.0,
\"cdWeightUnit\":\"KG\",\"customFieldValueVOList\":[],\"customerId\":3,\"customerIdForUser\":3},\"length\":1.0,\"needQualityInspection\":false,\"purchasePrice\":10,
\"receiveBoxQuantity\":0,\"receiveQuantity\":0,\"serialEnable\":0,\"sku\":\"SKU0425007\",\"skuId\":10007387,\"status\":\"RECEIVING\",\"title\":\"SKU0425007\",
\"transferPrice\":0,\"version\":1,\"weight\":2.0,\"weightUnit\":\"KG\",\"width\":2.0,\"wmsSkuCode\":\"SKU0425007\"}],\"asnTypeFlag\":false,\"autoCommit\":false,
\"businessRemarkVOList\":[],\"closeWms\":false,\"customerId\":3,\"customerIdForUser\":3,\"extraJson\":\"{}\",\"firstLegPriceCurrency\":\"CNY\",\"firstLegTotal\":0,
\"firstLegUnit\":\"CNY\",\"firstLegWithdrawShipped\":false,\"flashId\":1,\"fromApi\":true,\"id\":44917,\"purchasePriceCurrency\":\"CNY\",\"receiveGoods\":true,
\"receivedSkuQuantity\":0,\"receivedTotalQuantity\":0,\"skuQuantity\":1,\"status\":\"NEW\",\"tag\":{\"comparedTagValue\":0,\"fullTagValue\":0,\"overcharge\":0,
\"receiveException\":0,\"relation\":0,\"sendFailed\":0,\"sendWms\":0,\"waitBoxing\":0},\"tags\":0,\"timezoneId\":\"Asia/Shanghai\",\"totalPurchasePrice\":50,
\"totalQuantity\":5,\"transferPriceCurrency\":\"CNY\",\"type\":\"MANUAL\",\"useNewBestNumber\":false,\"version\":0,\"warehouseId\":12565,
\"warehouseName\":\"台湾(名字不要瞎改)\",\"warehouseVO\":{\"address\":\"华星C\",\"address2\":\"XXX\",\"addressName\":\"华星现代产业园1\",\"asnEnable\":false,
\"autoAdjStorage\":true,\"autoAdjustment\":false,\"autoCreateProduct\":1,\"autoSendOnReturnCreate\":0,\"autoSendWmsSku\":0,\"autoSynStorage\":false,
\"city\":\"杭州\",\"code\":\"TOPMART\",\"configFileId\":\"\",\"contacts\":\"ZZ\",\"countTag\":0,\"country\":\"CN\",\"creatSource\":\"NORMAL\",
\"cusAsnMark\":0,\"customCacheKey\":\"3\",\"customFieldValueVOList\":[],\"customerId\":3,\"customerIdForUser\":3,\"district\":\"西湖1\",\"email\":\"123456@qq.com\",
\"extraType\":\"TOPMART\",\"forceRefreshSkuMapping\":false,\"fromOpenApi\":false,\"id\":12565,\"isDeleted\":0,\"kind\":\"COMPLEX\",\"locationConfigIds\":\"\",
\"name\":\"台湾(名字不要瞎改)\",\"phone\":\"18368093711\",\"postCode\":\"317500\",\"providerId\":4247,\"province\":\"浙江1\",\"selfSupport\":false,
\"sendAttachment\":0,\"sendBigstockAsDraft\":false,\"sendItemAsDraft\":true,\"sendItemImageFlag\":false,\"sendOdoAsDraft\":false,\"sendPlatformInfo\":false,
\"sendReferenceNoFlag\":0,\"splitGrade\":1,\"status\":\"UNLOCK\",\"supportLazadaJit\":false,\"syncSkuInfo\":1,\"timezoneId\":\"Asia/Shanghai\",\"type\":\"BEST_GO\",
\"typeName\":\"综合仓\",\"useBestWarehouseType\":false,\"useNewApiAndMethodForQianCangV1\":false}},\"state\":\"success\"}",
"requestId": "6167c819-a604-465c-a7a7-8c838574c113"
}
1.3. 入库单取消接口
1.3.1. SERVICE_TYPE
1.3.2. CANCEL_ASN_ORDER
1.3.3. 请求参数
参数 | 是否必须 | 类型 | 示例 | 备注 |
---|---|---|---|---|
asnNumber | Y | String | 入库单号 | A230109129883 |
1.3.4. 返回参数
参数 | 是否必须 | 类型 | 示例 | 备注 |
---|---|---|---|---|
errorCode | Y | String | “DATA_INPUT_ERROR” | 错误码 |
errorMsg | Y | String | “输入参数不对” | 业务错误信息 |
state | Y | String | success | 请求结果 |
请求示例:
curl --location --request POST 'https://gerp-test1.800best.com/api/v1/asn' \
--form 'appId="TEST"' \
--form 'serviceType="CANCEL_ASN_ORDER"' \
--form 'bizParam="{ \"asnNumber\":\"A250910149553\"}"' \
--form 'timestamp="1731742317"' \
--form 'sign="d44fcd6f24ef97c0178a402d99ee22eb"'
返回示例:
{
"state": "success",
"errorCode": "",
"errorMsg": "",
"bizContent": "{\"notSuccess\":false,\"state\":\"success\"}",
"requestId": "60525b5b-577e-4342-840b-f3c2a2d01f2a"
}
1.4. 入库反馈推送接口
1.4.1. SERVICE_TYPE
PUSH_ASN_ORDER
1.4.2. 推送消息内容
参数 | 是否必须 | 类型 | 示例 | 备注 |
---|---|---|---|---|
asnNumber | Y | String | “A230109129883” | 入库单号 |
trackNumber | N | String | 跟踪单号 | |
skuList | Y | List<Sku> | Sku收货数据 | |
status | Y | String | 入库单状态 FINISHED 已完成 CLOSED 已关闭 | |
finishedTime | Y | Date | 入库单完成时间条件必传,仅当status=FINISHED时传值 | |
customNumber | N | String | 参考号 |
Sku
参数 | 是否必须 | 类型 | 示例 | 备注 |
---|---|---|---|---|
quantity | Y | Number | 100 | 收货数量 |
sku | Y | String | Sku | 商品sku |
goodNum | Y | Number | 10 | 良品数量 |
damageNum | Y | Number | 90 | 不良品数量 |
batchNo | N | String | 批次号,仅对千易wms生效 | |
mfgDate | N | String | 2025-10-01 | 生产日期,仅对千易wms生效 |
expDate | N | String | 2025-10-01 | 失效日期,仅对千易wms生效 |
originCountry | N | String | CN | 生产地国家,仅对千易wms生效 |
推送示例(默认form-data格式):
JSON格式:
{"appId":"TEST","bizParam":"{\"asnNumber\":\"A250619145545\",\"customNumber\":\"2025061900007\",\"status\":\"RECEIVING\",\"trackNumber\":\"CGDD0000787\",\"skuList\":[{\"sku\":\"LIP005\",\"quantity\":1},{\"quantity\":1,\"sku\":\"LIP005\"}]}","serviceType":"PUSH_ASN_ORDER","timestamp":"1754016113505","sign":"77fd745547a99d46cf5d2f17697a7c6e"}
FORM-DATA格式:
{appId=1111-3, bizParam={"asnNumber":"A250731147584","customNumber":"1000832922","finishedTime":1753942939000,"skuList":[{"damageNum":0,"goodNum":9,"quantity":9,"sku":"PPB24700027"}],"status":"FINISHED","trackNumber":"4700041511"}, serviceType=PUSH_ASN_ORDER, timestamp=1753942939728, sign=8f40f3de6778c990bc7b762314b182ac}