Skip to main content
GET
Search SKU inventory
此页面由 AI 自动翻译。API 技术规格以英文呈现为标准。如有任何疑问,请参阅英文版本
此为 Enterprise 专属 功能,仅对 Return Helper Enterprise 客户启用。如需了解此服务的定价,请联系 enterprise-solution@returnhelper.com
以仓库为单位返回您账户的 SKU 库存,并采用游标式分页(cursor-based pagination)。每一行同时报告某 SKU 在某仓库的总 quantityavailableQuantity

各行以仓库与 SKU 为键

同一个 SKU 若存放于多个仓库,会以多行返回——每个仓库各一行。响应中的一行由其 warehouseId + sku 组合唯一标识;searchTotalCount 计算的是「仓库-SKU」行数,而非相异的 SKU 值数量。若只想查看单个仓库,请传入 warehouseIdList
由此接口旧版发出的游标将被拒绝。若您缓存了旧的游标值,请以不带 cursor 的方式重新开始分页——版本化游标不向后兼容,旧的 API ID 游标值也不会被重新解读为仓库 ID。

分页

此接口采用游标式分页。每个响应都包含 nextCursorpreviousCursor
  • nextCursor 是下一页的游标;已到最后一页时为 null
  • previousCursor 是上一页的游标;在第一页时为 null
若要向前翻页,将 nextCursor 的值作为 cursor 查询参数传回,并带上 isForward=true。在同一个分页序列中,请保持相同的 pageSize(以及任何 warehouseIdList / skuList 筛选条件)。
availableQuantity 是供提前检查可用量的汇总数字——并非预留(reservation)。它可能因投影延迟而与实时退件库存短暂不一致,也可能将带有待处理 VAS、实际上不符补寄资格的记录计入。按 SKU 创建 Resend 会在请求当下对 MySQL 进行具权威性且加锁的分配。

授权

x-rr-apikey
string
header
必填

Your API key

x-rr-apitoken
string
header
必填

Your API token — keep this private

查询参数

pageSize
integer
必填

Number of warehouse-SKU rows to return per page. Required. Minimum 1, maximum 1000.

必填范围: 1 <= x <= 1000
cursor
string

Opaque, versioned cursor token encoding cursor version, warehouse ID, and SKU. Pass the nextCursor (or previousCursor) from a previous response to fetch the adjacent page. Omit to fetch the first page. Cursors issued by the previous (pre-redesign) version of this endpoint are rejected — restart pagination without a cursor.

isForward
boolean

Pagination direction. Set true to page forward through results using the returned nextCursor. Defaults to false when omitted. Optional.

warehouseIdList
string

Comma-separated list of warehouse IDs to filter by (e.g. 1001,1002). When provided, each value must be a positive integer, the list must contain no duplicates, the number of entries must not exceed 100, and every warehouse must be owned by the authenticated account. Omit to return rows across all owned warehouses. Optional.

skuList
string

Comma-separated list of SKUs to filter by (e.g. SKU-006,SKU-001). When provided, the number of entries must not exceed 100 and each SKU must match the SKU pattern (alphanumerics plus #, -, _; maximum 32 characters). SKUs are matched after trim and uppercase normalization. Omit to return all SKUs. Optional.

响应

Success

Cursor-paginated list of SKU inventory records. The business payload (nextCursor, previousCursor, data) is returned as top-level fields alongside the standard correlationId and meta envelope.

nextCursor
string | null

Cursor token for the next page, or null when there is no next page. Pass it back as cursor with isForward=true to page forward.

previousCursor
string | null

Cursor token for the previous page, or null when there is no previous page.

data
object[]

SKU inventory records for the current page