Lingxing

查询WFS库存列表 - v2

POST/basicOpen/multiplatform/wfs/stockSearch/v2

该接口对应系统界面新版WFS库存。

接口信息

API Path请求协议请求方式令牌桶容量
/basicOpen/multiplatform/wfs/stockSearch/v2HTTPSPOST10

请求参数

store_idarray<any>必填
店铺id
offsetinteger
分页偏移量,默认0
lengthinteger
分页长度,默认15,上限200
warehouseListarray<any>
WFS仓库ID列表
goodStatusListarray<any>
商品状态,
0:停售,
1:在售,
2:已归档。
多选取并集,与itemLifecycles同时传入时取交集
hideZeroStorageinteger
是否隐藏零库存,0:不隐藏(默认),1:隐藏
customobject
商品搜索条件,支持关键词模糊搜索和完整值精确搜索,两者同时传入时取交集
隐藏子属性显示子属性3 个子字段
typeinteger
查询类型,
1:MSKU(默认),
2:GTIN码,
3:商品ID,
4:品名,
5:SKU,
8:商品标题
likeContentstring
模糊查询关键词,匹配包含该关键词的记录;
与inContentList同时传入时取交集
inContentListarray<any>
精确查询值列表,多个值取并集。按标题查询时传入完整标题
qtyRangearray<object>
数值范围列表,多个范围需同时满足。
旧字段按查询模式筛选,新字段按原值筛选;
缺失值不匹配新字段的范围
隐藏子属性显示子属性3 个子字段
typestring
范围字段。
旧字段:quantity、availableQuantity、availableQuantityV2、
unabledWarehousingQuantity、inboundQuantity、damagedQuantity、
last30DaysUnitsReceived、last30DaysPoUnits、ats03Months、
ats36Months、ats69Months、ats912Months、
ats1Years;
V2新增字段:onhandQuantity、reservedQuantity、inventoryReviewQuantity、
inventoryMovementQuantity、salesForecastWeek1to4、salesForecastWeek5to8、
salesForecastWeek9to12、sellThroughRate、daysOfSupply、
suggestedUnits、surplusUnits
minstring
最小值,包含边界,可传0或小数,可仅传最小值
maxstring
最大值,包含边界,可传0或小数,可仅传最大值。
V2新增字段的最大值不得小于最小值
numericRangesarray<object>
兼容历史请求的数值范围,仅支持V2新增的11个数值字段,按原值筛选。
新请求可统一使用qtyRange
隐藏子属性显示子属性3 个子字段
typestring
范围字段。
旧字段:quantity、availableQuantity、availableQuantityV2、
unabledWarehousingQuantity、inboundQuantity、damagedQuantity、
last30DaysUnitsReceived、last30DaysPoUnits、ats03Months、
ats36Months、ats69Months、ats912Months、
ats1Years;
V2新增字段:onhandQuantity、reservedQuantity、inventoryReviewQuantity、
inventoryMovementQuantity、salesForecastWeek1to4、salesForecastWeek5to8、
salesForecastWeek9to12、sellThroughRate、daysOfSupply、
suggestedUnits、surplusUnits
minstring
最小值,包含边界,可传0或小数,可仅传最小值
maxstring
最大值,包含边界,可传0或小数,可仅传最大值。
V2新增字段的最大值不得小于最小值
selectTypeEnumstring
查询模式,
COUNT_TYPE:数量(默认),
PRICE_TYPE:成本
orderColumnTypestring
排序字段,默认gmtCreate。
支持
quantity、availableQuantity、unabledWarehousingQuantity、
inboundQuantity、ats03Months、ats36Months、
ats69Months、ats912Months、ats1Years、
last30DaysUnitsReceived、last30DaysPoUnits、msku、
onhandQuantity、reservedQuantity、inventoryReviewQuantity、
inventoryMovementQuantity、salesForecastWeek1to4、salesForecastWeek5to8、
salesForecastWeek9to12、sellThroughRate、daysOfSupply、
suggestedUnits、surplusUnits、outOfStockDate、
firstInStockDate、inventoryUpdatedTime
orderWayinteger
排序方向,0:倒序(默认),1:正序
customerFavoriteboolean
按买家喜爱商品标记筛选,
true:是,
false:否,省略或传null时不筛选
dateFieldstring
日期筛选字段,与startDate或endDate配合使用。
outOfStockDate:预计售罄日期(默认),
firstInStockDate:首次到货日期,
inventoryUpdatedTime:库存更新时间
startDatestring
开始日期,格式yyyy-MM-dd,包含当天,可单独传入。
库存更新时间按北京时间筛选
endDatestring
结束日期,格式yyyy-MM-dd,包含当天,可单独传入。
与开始日期同时传入时不得早于开始日期,库存更新时间按北京时间筛选
itemLifecyclesarray<any>
商品生命周期,
Active:在售,
Retired:停售,
Archived:已归档。
多选取并集,与goodStatusList同时传入时取交集
stockStatusesarray<any>
库存状况,
Out-of-stock:缺货,
At-risk:库存预警,
In-stock:有库存,
Long term out of stock:长期缺货,
New to WFS:新品。
多选取并集,兼容大小写和连字符的空格写法

请求示例

{
    "store_id": [
        "110418202566107648"
    ],
    "offset": 0,
    "length": 15
}

筛选请求示例

{
    "store_id": [
        "110418202566107648"
    ],
    "offset": 0,
    "length": 15,
    "custom": {
        "type": 8,
        "likeContent": "墨盒"
    },
    "customerFavorite": true,
    "itemLifecycles": [
        "Active"
    ],
    "stockStatuses": [
        "In-stock"
    ],
    "qtyRange": [
        {
            "type": "onhandQuantity",
            "min": "0",
            "max": "100"
        }
    ],
    "dateField": "inventoryUpdatedTime",
    "startDate": "2026-11-01",
    "endDate": "2026-11-19",
    "orderColumnType": "onhandQuantity",
    "orderWay": 0
}

返回结果

Json Object

codeinteger必填
状态码,0 成功
示例 0
messagestring必填
消息提示
示例 success
error_detailsarray<any>必填
错误信息
request_idstring必填
请求链路id
示例 1979122130ba45e984cbc9b2e571d86f.1690513512438
response_timestring必填
响应时间
示例 2023-07-28 11:05:12
dataobject必填
响应数据
隐藏子属性显示子属性4 个子字段
recordsarray<object>必填
列表数据
隐藏子属性显示子属性46 个子字段
ats03_monthsstring必填
3个月内库龄
示例 2
ats1_yearsstring必填
12个月以上库龄
示例 2
ats36_monthsstring必填
3-6个月库龄
示例 2
ats69_monthsstring必填
6-9个月库龄
示例 3
ats912_monthsstring必填
9-12个月库龄
示例 2
available_quantitystring必填
WFS可售
示例 4
gtinstring必填
GTIN码
示例 00462301613707
inbound_quantitystring必填
标发在途
示例 13
item_idstring必填
平台商品id
示例 2301613700
platform_product_statusstring必填
商品状态:停售、在售、已归档
示例 在售
mskustring必填
msku
示例 ast6-purple-xl-du00
pidstring必填
本地商品id
示例 5764
product_namestring必填
品名
示例 pm
skustring必填
sku
示例 sku
quantitystring必填
总库存:US站为在库(onhandQuantity)+标发在途(inbound_quantity);
加拿大、墨西哥站按库存节点在库数量汇总
示例 15
store_idstring必填
店铺id
示例 110000000018008005
store_namestring必填
店铺名称
示例 walmart测试店铺
warehouse_namestring必填
仓库名称
示例 walmart测试店铺05号加拿大仓
warehouse_unique_idstring必填
仓库id【雪花id】
示例 901337792229298176
pic_urlstring必填
图片url
示例 https://imagxxx/xxxx/5dc111.jpeg
availableQuantityV2string必填
WFS可售库存(新版,更新频率更高)
示例 12
customerFavoriteboolean必填
是否为买家喜爱商品:true 是,false 否。
示例 false
damagedQuantitystring必填
损坏库存
示例 2
daysOfSupplystring必填
平台测算的可供天数,当前可售及在途库存按日均预测销量可支撑的天数。
示例 Over 50
firstInStockDatestring必填
商品首次入库WFS仓的日期,按北京时间展示。
示例 2026-11-01
inventoryMovementQuantityinteger必填
调仓中数量,正在调拨至其他WFS仓的库存,通常需要7~10个工作日。
示例 3
inventoryReviewQuantityinteger必填
审核中数量,处于合规、过期或盘点审核中的库存,通常审核24~48小时。
示例 2
inventoryUpdatedTimestring必填
库存更新时间,按北京时间展示,精确到秒;
US取数据库最近更新时间,
加拿大、墨西哥站按库存节点最新修改时间处理。
itemLifecyclestring必填
平台商品生命周期原值,例如Active、Retired或Archived
示例 Active
itemNamestring必填
平台商品标题。
示例 原装黑色墨盒
last30DaysPoUnitsstring必填
近30天计划入库
示例 20
last30DaysUnitsReceivedstring必填
近30天实际入库
示例 15
onhandQuantityinteger必填
在库数量,WFS仓内库存总量,包含可售、预留、审核中及调仓中数量。
示例 15
outOfStockDatestring必填
预计售罄日期,按可供天数推算,按北京时间展示。
示例 2026-11-24
productUniqueIdstring必填
商品唯一ID(雪花ID)
示例 901337792229298176
purchasePricestring必填
采购成本
示例 10.50
reservedQuantityinteger必填
预留库存数量,客户已下单但尚未发货的数量。
示例 2
salesForecastWeek1to4string必填
平台预计的未来1~4周销量。
示例 12
salesForecastWeek5to8string必填
平台预计的未来5~8周销量。
示例 10
salesForecastWeek9to12string必填
平台预计的未来9~12周销量。
示例 8
sellThroughRatestring必填
平台测算的90天售罄率,等于过去90天已发货量除以同期平均在库量;
保留平台返回格式。
stockStatusstring必填
库存状况:Out-of-stock 缺货(可售数量为0);
At-risk 库存预警(含在库可售和在途的可供天数不足28天);
In-stock 有库存(可供天数大于28天);
Long term out of stock 长期缺货(持续缺货超过30天);
New to WFS 新品(已在WFS设置但未创建入库货件)。
示例 In-stock
storeSiteinteger必填
店铺站点,1:美国,2:加拿大,3:墨西哥
示例 1
suggestedUnitsinteger必填
Walmart平台基于预测销量建议补货的数量。
示例 10
surplusUnitsinteger必填
滞销库存数量,可供天数超过180天的库存数量。
示例 2
unabledWarehousingQuantitystring必填
无法入库的库存
示例 2
totalstring必填
总数
示例 21
stockTotalobject必填
WFS库存汇总
隐藏子属性显示子属性13 个子字段
ats03Monthsstring必填
3个月内库龄库存汇总
示例 2
ats1Yearsstring必填
12个月以上库龄库存汇总
示例 2
ats36Monthsstring必填
3至6个月库龄库存汇总
示例 2
ats69Monthsstring必填
6至9个月库龄库存汇总
示例 3
ats912Monthsstring必填
9至12个月库龄库存汇总
示例 2
availableQuantitystring必填
WFS可售库存汇总
示例 4
inboundQuantitystring必填
标发在途库存汇总
示例 13
quantitystring必填
总库存汇总
示例 15
availableQuantityV2string必填
WFS可售库存(新版,更新频率更高)汇总
示例 12
damagedQuantitystring必填
损坏库存汇总
示例 2
last30DaysPoUnitsstring必填
近30天计划入库汇总
示例 20
last30DaysUnitsReceivedstring必填
近30天实际入库汇总
示例 15
unabledWarehousingQuantitystring必填
无法入库的库存汇总
示例 2
syncTimestring必填
WFS库存最新同步时间

返回成功示例

{
    "code": 0,
    "message": "success",
    "error_details": [],
    "request_id": "1979122130ba45e984cbc9b2e571d86f.1690513512438",
    "response_time": "2023-07-28 11:05:12",
    "data": {
        "total": "21",
        "records": [
            {
                "msku": "ast6-purple-xl-du00",
                "gtin": "00462301111",
                "pid": "5764",
                "sku": "wjc14_sku",
                "quantity": "15",
                "store_id": "110000000018008005",
                "store_name": "walmart测试店铺",
                "warehouse_unique_id": "90133779222911",
                "warehouse_name": "walmart测试店铺05号加拿大仓",
                "item_id": "230161371",
                "product_name": "wjc14_pm",
                "platform_product_status": "在售",
                "available_quantity": "13",
                "inbound_quantity": "2",
                "ats03_months": "3",
                "ats36_months": "4",
                "ats69_months": "5",
                "ats912_months": "6",
                "ats1_years": "7",
                "pic_url": "https://imagxxx/xxxx/5dc111.jpeg",
                "availableQuantityV2": "12",
                "customerFavorite": false,
                "damagedQuantity": "2",
                "daysOfSupply": "Over 50",
                "firstInStockDate": "2026-11-01",
                "inventoryMovementQuantity": 3,
                "inventoryReviewQuantity": 2,
                "inventoryUpdatedTime": null,
                "itemLifecycle": "Active",
                "itemName": "原装黑色墨盒",
                "last30DaysPoUnits": "20",
                "last30DaysUnitsReceived": "15",
                "onhandQuantity": 15,
                "outOfStockDate": "2026-11-24",
                "productUniqueId": "901337792229298176",
                "purchasePrice": "10.50",
                "reservedQuantity": 2,
                "salesForecastWeek1to4": "12",
                "salesForecastWeek5to8": "10",
                "salesForecastWeek9to12": "8",
                "sellThroughRate": null,
                "stockStatus": "In-stock",
                "storeSite": 1,
                "suggestedUnits": 10,
                "surplusUnits": 2,
                "unabledWarehousingQuantity": "2"
            }
        ],
        "stockTotal": {
            "ats03Months": "2",
            "ats1Years": "2",
            "ats36Months": "2",
            "ats69Months": "3",
            "ats912Months": "2",
            "availableQuantity": "4",
            "inboundQuantity": "13",
            "quantity": "15",
            "availableQuantityV2": "12",
            "damagedQuantity": "2",
            "last30DaysPoUnits": "20",
            "last30DaysUnitsReceived": "15",
            "unabledWarehousingQuantity": "2"
        },
        "syncTime": null
    }
}

返回失败示例

{
    "code": 1,
    "message": "参数检验不通过",
    "error_details": ["length: length 最大值200"],
    "request_id": "f4044649b1be46398c7eb4e6eb6ab6d5.1684735739946",
    "response_time": "2023-05-22 14:08:59",
    "data": null
}