| 方法 | 端点 | 描述 |
|---|---|---|
| GET | /api/v202206/inventory/products | 获取产品库存列表 |
| GET | /api/v202608/lot-inventories | 获取实时批次库存 |
| GET | /api/v202608/inventory-snapshots | 获取 SKU 级库存快照(指定日期) |
| GET | /api/v202608/lot-inventory-snapshots | 获取 Lot 级库存快照(指定日期) |
[新增] v202608 补丁(2026-09 新增): 现有 GET /api/v202206/inventory/products参数中新增condition(该改动已合并到下方参数表)新增 GET /api/v202608/lot-inventories:批次库存实时查询新增 GET /api/v202608/inventory-snapshots:SKU 级历史快照新增 GET /api/v202608/lot-inventory-snapshots:Lot 级历史快照3 个新增接口均为只读,用于查询实时批次库存 + 历史对账重放。
| 键 | 值 |
|---|---|
| Authorization | Bearer eyJ0eXAiOiJKV1QiLCJhbGciOi ... |
| 类型 | 名称 | 描述 | 必填/选填 | 数据结构 |
|---|---|---|---|---|
| query | api | API 类型 可用值: index.by-default | 必填 | enum |
| query | customer_sku | 客户的 sku 编码 | 选填 | string |
| query | warehouse_id | 仓库 id | 选填 | integer |
| query | condition | 库存状态 可用值: New, Open Box, Used, Customized, Parts, Damaged | 选填 | enum |
| query | next_token | 下一页数据的秘钥 | 选填 | string |
| Key | Value |
|---|---|
| errcode | 0/4000 |
| errmsg | ok/Error Info |
| data | Data Properties |
| 名称 | 描述 | 数据结构 |
|---|---|---|
| product_id | 产品 id | integer |
| sku | sku 编码 | integer |
| customer_sku | 客户的 sku 编码 | string |
| bundled | 是否为套件产品(由多个子产品组装而成的产品),如果值为 1,则需要“qty_bundle_available” 可用值: 0: 否, 1: 是 | enum |
| warehouse_id | 仓库 id | integer |
| warehouse_name | 仓库名称 | string |
| condition | 库存状态,例如全新、二手、损坏等。 同一 SKU 可能在同一个仓库中对应多个库存状态。当多个库存状态有库存时,它们会分别显示在不同的行中。 可用值: New, Open Box,Used,Customized,Parts,Damaged | enum |
| qty_allocated | 被占用的库存数量 | integer |
| qty_hold | 等待上架的库存数量 | integer |
| qty_bundle_available | 套件产品的可用库存数量,是否有值取决于 bundled 的值是否为 1 | integer |
| qty_on_hand | 库存总数 | integer |
| qty_available | 可用库存数量 | integer |
| qty_receibing_area | 收货区的库存数量 (此字段已弃用) | integer |
| qty_frozen | 被冻结的库存数量 | integer |
| qty_conditioned | 非全新库存总数量(此字段已弃用) | integer |
| qty_in_transit | 在途库存数量 | integer |
[
{
"warehouse_id": 101,
"warehouse_name": "SG-SMF1",
"product_id": 136251,
"sku": 230924,
"customer_sku": "0905",
"bundled": 0,
"condition": "New",
"qty_on_hand": 23,
"qty_hold": 5,
"qty_frozen": 0,
"qty_allocated": 0,
"qty_receiving_area": 0,
"qty_in_transit": 0,
"qty_available": 18,
"qty_bundle_available": 0,
"qty_conditioned": 0
},
{
"warehouse_id": 101,
"warehouse_name": "SG-SMF1",
"product_id": 136251,
"sku": 230924,
"customer_sku": "0905",
"bundled": 0,
"condition": "Open Box",
"qty_on_hand": 1,
"qty_hold": 0,
"qty_frozen": 0,
"qty_allocated": 0,
"qty_receiving_area": 0,
"qty_in_transit": 0,
"qty_available": 1,
"qty_bundle_available": 0,
"qty_conditioned": 0
}
]以下 3 个 v202608 端点均为只读。用于查询实时批次库存 + 历史对账重放。
| 类型 | 名称 | 描述 | 必填/选填 | 数据结构 |
|---|---|---|---|---|
| query | api | API 类型 可用值: index.by-default | 必填 | enum |
| query | warehouse_id | 仓库 id | 选填 | integer |
| query | customer_sku | 客户 sku 编码(精确匹配) | 选填 | string |
| query | sku | 系统 sku 编码(精确匹配) | 选填 | integer |
| query | lot_id | ShipSage 内部批次号 | 选填 | integer |
| query | condition | 库存状态 可用值: New, Open Box, Used, Customized, Parts, Damaged, Disposal, Stored, Unclaimed | 选填 | enum |
| query | lot_rule | 产品级 Lot 规则 可用值: fifo(按入库日期先出,库位物理隔离), fefo(按过期日期先出,库位物理隔离), none(SKU 未启用 lot 管理) | 选填 | string |
| query | receive_date_from | 入库日期 起 | 选填 | date |
| query | receive_date_to | 入库日期 止 | 选填 | date |
| query | expiration_date_from | 过期日期 起 | 选填 | date |
| query | expiration_date_to | 过期日期 止 | 选填 | date |
| query | aged_days_min | Aged 天数最小值 | 选填 | integer |
| query | aged_days_max | Aged 天数最大值 | 选填 | integer |
| query | updated_at_from | 更新时间 起(用于增量拉取) 时区:太平洋标准时间 | 选填 | datetime |
| query | updated_at_to | 更新时间 止 时区:太平洋标准时间 | 选填 | datetime |
| query | has_available_qty | 是否只返回可用数 > 0 的行(默认 1) 可用值: 0:全部, 1:只返回可用 | 选填 | enum |
| query | sort_by | 排序字段(默认 receive_date)可用值: receive_date, expiration_date, aged_days | 选填 | enum |
| query | sort_order | 排序方向(默认 asc)可用值: asc, desc | 选填 | enum |
| query | next_token | 下一页数据的秘钥 | 选填 | string |
GET /api/v202608/lot-inventories?api=index.by-default&warehouse_id=100&customer_sku=CUS-SKU-001&condition=New&lot_rule=fefo&expiration_date_from=2027-01-01&has_available_qty=1&sort_by=expiration_date&sort_order=asc| 键 | 值 |
|---|---|
| errcode | 0/4000 |
| errmsg | ok/Error Info |
| data | Data Properties |
| 名称 | 描述 | 数据结构 |
|---|---|---|
| lot_id | ShipSage 内部批次号 | integer |
| warehouse_id | 仓库 id | integer |
| warehouse_name | 仓库名 | string |
| condition | 库存状态,可用值:New / Open Box / Used / Customized / Parts / Damaged / Disposal / Stored / Unclaimed | string |
| sku | 系统 sku 编码 | integer |
| customer_sku | 客户 sku 编码 | string |
| bundled | 是否为套件产品 可用值: 0:否, 1:是 | integer |
| lot_rule | 产品级 Lot 规则(fifo / fefo / null) | string |
| receive_date | 入库日期 | date |
| expiration_date | 过期日期 | date |
| aged_date | Aged 起始日 | date |
| aged_days | Aged 天数(从 aged_date 到今日) | integer |
| qty_on_hand | 库存总数 | integer |
| qty_allocated | 被占用的库存数量 | integer |
| qty_hold | 等待上架的库存数量 | integer |
| qty_frozen | 被冻结的库存数量 | integer |
| qty_available | 可用库存数量 | integer |
{
"errcode": 0,
"errmsg": "ok",
"data": {
"items": [
{
"lot_id": 5511,
"warehouse_id": 100,
"warehouse_name": "SG-MDW1",
"condition": "New",
"sku": 3001,
"customer_sku": "CUS-SKU-001",
"bundled": 0,
"lot_rule": "fefo",
"receive_date": "2026-06-15",
"expiration_date": "2027-06-15",
"aged_date": "2026-06-15",
"aged_days": 60,
"qty_on_hand": 500,
"qty_allocated": 120,
"qty_hold": 0,
"qty_frozen": 0,
"qty_available": 380
}
],
"next_token": null
}
}GET /api/v202206/inventory/products 保持一致(除快照专属字段外)。snapshot_date 必填。历史快照仅在快照数据实际存在的日期返回结果;无数据时返回空数组。| 类型 | 名称 | 描述 | 必填/选填 | 数据结构 |
|---|---|---|---|---|
| query | api | API 类型 可用值: index.by-default | 必填 | enum |
| query | snapshot_date | 快照日期(YYYY-MM-DD 格式) | 必填 | date |
| query | warehouse_id | 仓库 id | 选填 | integer |
| query | customer_sku | 客户 sku 编码(精确匹配) | 选填 | string |
| query | condition | 库存状态 可用值: New, Open Box, Used, Customized, Parts, Damaged, Disposal, Stored, Unclaimed | 选填 | enum |
| query | has_available_qty | 是否只返回可用数 > 0 的行(默认 1) 可用值: 0:全部, 1:只返回可用 | 选填 | enum |
| query | next_token | 下一页数据的秘钥 | 选填 | string |
GET /api/v202608/inventory-snapshots?api=index.by-default&snapshot_date=2026-08-11&warehouse_id=100&customer_sku=CUS-SKU-001&condition=New&has_available_qty=1| 键 | 值 |
|---|---|
| errcode | 0/4000 |
| errmsg | ok/Error Info |
| data | Data Properties |
| 名称 | 描述 | 数据结构 |
|---|---|---|
| snapshot_date | 快照对应的业务日期。表示这份数据代表哪一天结束时的库存状态。例如 2026-08-11 表示 2026 年 8 月 11 日结束时的库存 | date |
| snapshot_at | 快照数据实际生成的时间点。系统每天在午夜前后(snapshot_date 当日 23:50 至次日 00:10 之间)自动运行快照任务,将当天结束时的库存"定格"下来。所以 snapshot_date = 2026-08-11 时,snapshot_at 通常在 2026-08-11 23:50 到 2026-08-12 00:10 之间时区:太平洋标准时间 | datetime |
| warehouse_id | 仓库 id | integer |
| warehouse_name | 仓库名 | string |
| condition | 库存状态,可用值:New / Open Box / Used / Customized / Parts / Damaged / Disposal / Stored / Unclaimed | string |
| sku | 系统 sku 编码 | integer |
| customer_sku | 客户 sku 编码 | string |
| bundled | 是否为套件产品 可用值: 0:否, 1:是 | integer |
| qty_on_hand | 库存总数 | integer |
| qty_hold | 等待上架的库存数量 | integer |
| qty_frozen | 被冻结的库存数量 | integer |
| qty_allocated | 被占用的库存数量 | integer |
| qty_in_transit | 在途库存数量 | integer |
| qty_available | 可用库存数量 | integer |
{
"errcode": 0,
"errmsg": "ok",
"data": {
"items": [
{
"snapshot_date": "2026-08-11",
"snapshot_at": "2026-08-12 00:00:00",
"warehouse_id": 100,
"warehouse_name": "SG-MDW1",
"condition": "New",
"sku": 3001,
"customer_sku": "CUS-SKU-001",
"bundled": 0,
"qty_on_hand": 500,
"qty_hold": 5,
"qty_frozen": 0,
"qty_allocated": 120,
"qty_in_transit": 200,
"qty_available": 380
}
],
"next_token": null
}
}snapshot_date 必填。| 类型 | 名称 | 描述 | 必填/选填 | 数据结构 |
|---|---|---|---|---|
| query | api | API 类型 可用值: index.by-default | 必填 | enum |
| query | snapshot_date | 快照日期(YYYY-MM-DD 格式) | 必填 | date |
| query | warehouse_id | 仓库 id | 选填 | integer |
| query | customer_sku | 客户 sku 编码 | 选填 | string |
| query | sku | 系统 sku 编码 | 选填 | integer |
| query | lot_id | ShipSage 内部批次号 | 选填 | integer |
| query | condition | 库存状态 可用值: New, Open Box, Used, Customized, Parts, Damaged, Disposal, Stored, Unclaimed | 选填 | enum |
| query | lot_rule | 产品级 Lot 规则 可用值: fifo, fefo, none | 选填 | enum |
| query | receive_date_from | 入库日期 起 | 选填 | date |
| query | receive_date_to | 入库日期 止 | 选填 | date |
| query | expiration_date_from | 过期日期 起 | 选填 | date |
| query | expiration_date_to | 过期日期 止 | 选填 | date |
| query | has_available_qty | 是否只返回可用数 > 0 的行(默认 1) 可用值: 0:全部, 1:只返回可用 | 选填 | enum |
| query | sort_by | 排序字段(默认 receive_date)可用值: receive_date, expiration_date | 选填 | enum |
| query | sort_order | 排序方向(默认 asc) | 选填 | enum |
| query | next_token | 下一页数据的秘钥 | 选填 | string |
GET /api/v202608/lot-inventory-snapshots?api=index.by-default&snapshot_date=2026-08-11&warehouse_id=100&customer_sku=CUS-SKU-001&condition=New&lot_rule=fefo&has_available_qty=1&sort_by=expiration_date| 键 | 值 |
|---|---|
| errcode | 0/4000 |
| errmsg | ok/Error Info |
| data | Data Properties |
| 名称 | 描述 | 数据结构 |
|---|---|---|
| snapshot_date | 快照对应的业务日期。表示这份数据代表哪一天结束时的库存状态。例如 2026-08-11 表示 2026 年 8 月 11 日结束时的库存 | date |
| snapshot_at | 该批次在快照业务日内最晚一条动作的时间戳(对应仓库历史动作表 action_date 在快照日内的 MAX 值),代表这份批次快照所定格的时刻;snapshot_date 为该值的日期部分时区:太平洋标准时间 | datetime |
| lot_id | ShipSage 内部批次号 | integer |
| warehouse_id | 仓库 id | integer |
| warehouse_name | 仓库名 | string |
| condition | 库存状态,可用值:New / Open Box / Used / Customized / Parts / Damaged / Disposal / Stored / Unclaimed | string |
| sku | 系统 sku 编码 | integer |
| customer_sku | 客户 sku 编码 | string |
| bundled | 是否为套件产品(0/1) | integer |
| lot_rule | 产品级 Lot 规则(fifo / fefo / null) | string |
| receive_date | 入库日期 | date |
| expiration_date | 过期日期 | date |
| aged_date | Aged 起始日 | date |
| aged_days | Aged 天数(从 aged_date 到快照日期) | integer |
| qty_on_hand | 库存总数 | integer |
| qty_allocated | 被占用的库存数量 | integer |
| qty_hold | 等待上架的库存数量 | integer |
| qty_frozen | 被冻结的库存数量 | integer |
| qty_available | 可用库存数量 | integer |
{
"errcode": 0,
"errmsg": "ok",
"data": {
"items": [
{
"snapshot_date": "2026-08-11",
"snapshot_at": "2026-08-12 00:00:00",
"lot_id": 5511,
"warehouse_id": 100,
"warehouse_name": "SG-MDW1",
"condition": "New",
"sku": 3001,
"customer_sku": "CUS-SKU-001",
"bundled": 0,
"lot_rule": "fefo",
"receive_date": "2026-06-15",
"expiration_date": "2027-06-15",
"aged_date": "2026-06-15",
"aged_days": 57,
"qty_on_hand": 500,
"qty_allocated": 120,
"qty_hold": 0,
"qty_frozen": 0,
"qty_available": 380
}
],
"next_token": null
}
}