库存

契约已确认 · 验证中

详细字段参考以英文显示;字段名和 API 值保持不变。

Always applies integration warehouse restrictions. Shipping-only credentials receive origin/capability metadata, not inventory balances.

所需权限
{
  "anyOf": [
    {
      "allOf": [
        "inventory.read"
      ]
    },
    {
      "allOf": [
        "fulfillments.read"
      ]
    },
    {
      "allOf": [
        "rates.read"
      ]
    }
  ]
}
参数
cursor
query · 可选
Opaque continuation bound to tenant/environment/integration scope, filters, snapshot high-watermark and stable sort (updatedAt,id or documented resource-specific sort). Do not alter filters between pages. Incremental synchronization must include archive/deletion tombstones within the published retention window; snapshot expiry fails explicitly and requires a new scan.
limit
query · 可选
integer
updatedAfter
query · 可选
Exclusive UTC updated-time lower bound. For incremental sync keep a small overlap and deduplicate by id/version; cursor is authoritative within a scan.
返回结果
200Success.
400Malformed JSON, unsupported query or invalid request syntax.
401Missing, invalid, expired or revoked API key credential.
403Scope, tenant/environment/warehouse/carrier-account constraint or plan entitlement denied. New live external-tracker registration and standalone address verification also return service_not_enabled until price and quota policies are confirmed; no upstream call or new fee/accrual is permitted.
404Resource absent or not visible in the authorized tenant/environment.
409Business conflict, changed idempotency payload, stale quote, pending side effect or insufficient stock/funds.
422Field/business validation failed; details identify invalid fields.
429Rate or paid-service limit exceeded. Respect Retry-After.
500Unexpected server error; use requestId and query operation before retrying a side effect.
503Service temporarily unavailable; upstream outcome may be unknown, query/replay the operation.
下载 V2 契约(JSON)

Discover locations in authorized warehouses.

所需权限
{
  "anyOf": [
    {
      "allOf": [
        "inventory.read"
      ]
    }
  ]
}
参数
cursor
query · 可选
Opaque continuation bound to tenant/environment/integration scope, filters, snapshot high-watermark and stable sort (updatedAt,id or documented resource-specific sort). Do not alter filters between pages. Incremental synchronization must include archive/deletion tombstones within the published retention window; snapshot expiry fails explicitly and requires a new scan.
limit
query · 可选
integer
updatedAfter
query · 可选
Exclusive UTC updated-time lower bound. For incremental sync keep a small overlap and deduplicate by id/version; cursor is authoritative within a scan.
warehouseId
query · 可选
string
type
query · 可选
string
返回结果
200Success.
400Malformed JSON, unsupported query or invalid request syntax.
401Missing, invalid, expired or revoked API key credential.
403Scope, tenant/environment/warehouse/carrier-account constraint or plan entitlement denied. New live external-tracker registration and standalone address verification also return service_not_enabled until price and quota policies are confirmed; no upstream call or new fee/accrual is permitted.
404Resource absent or not visible in the authorized tenant/environment.
409Business conflict, changed idempotency payload, stale quote, pending side effect or insufficient stock/funds.
422Field/business validation failed; details identify invalid fields.
429Rate or paid-service limit exceeded. Respect Retry-After.
500Unexpected server error; use requestId and query operation before retrying a side effect.
503Service temporarily unavailable; upstream outcome may be unknown, query/replay the operation.
下载 V2 契约(JSON)

Read product-by-warehouse stock balances. Incremental updatedAfter follows persisted balance-row changes. Derived supply or pick allocations are evaluated at read time and may change without advancing that row timestamp; periodically perform a full read for these derived quantities. Opaque version values support equality checks, not numeric ordering.

所需权限
{
  "anyOf": [
    {
      "allOf": [
        "inventory.read"
      ]
    }
  ]
}
参数
cursor
query · 可选
Opaque continuation bound to tenant/environment/integration scope, filters, snapshot high-watermark and stable sort (updatedAt,id or documented resource-specific sort). Do not alter filters between pages. Incremental synchronization must include archive/deletion tombstones within the published retention window; snapshot expiry fails explicitly and requires a new scan.
limit
query · 可选
integer
updatedAfter
query · 可选
Exclusive UTC updated-time lower bound. For incremental sync keep a small overlap and deduplicate by id/version; cursor is authoritative within a scan.
warehouseId
query · 可选
string
productId
query · 可选
string
返回结果
200Success.
400Malformed JSON, unsupported query or invalid request syntax.
401Missing, invalid, expired or revoked API key credential.
403Scope, tenant/environment/warehouse/carrier-account constraint or plan entitlement denied. New live external-tracker registration and standalone address verification also return service_not_enabled until price and quota policies are confirmed; no upstream call or new fee/accrual is permitted.
404Resource absent or not visible in the authorized tenant/environment.
409Business conflict, changed idempotency payload, stale quote, pending side effect or insufficient stock/funds.
422Field/business validation failed; details identify invalid fields.
429Rate or paid-service limit exceeded. Respect Retry-After.
500Unexpected server error; use requestId and query operation before retrying a side effect.
503Service temporarily unavailable; upstream outcome may be unknown, query/replay the operation.
下载 V2 契约(JSON)

Read location-level physical stock. Incremental updatedAfter follows persisted balance-row changes. Derived supply or pick allocations are evaluated at read time and may change without advancing that row timestamp; periodically perform a full read for these derived quantities. Opaque version values support equality checks, not numeric ordering.

所需权限
{
  "anyOf": [
    {
      "allOf": [
        "inventory.read"
      ]
    }
  ]
}
参数
cursor
query · 可选
Opaque continuation bound to tenant/environment/integration scope, filters, snapshot high-watermark and stable sort (updatedAt,id or documented resource-specific sort). Do not alter filters between pages. Incremental synchronization must include archive/deletion tombstones within the published retention window; snapshot expiry fails explicitly and requires a new scan.
limit
query · 可选
integer
updatedAfter
query · 可选
Exclusive UTC updated-time lower bound. For incremental sync keep a small overlap and deduplicate by id/version; cursor is authoritative within a scan.
warehouseId
query · 可选
string
productId
query · 可选
string
locationId
query · 可选
string
返回结果
200Success.
400Malformed JSON, unsupported query or invalid request syntax.
401Missing, invalid, expired or revoked API key credential.
403Scope, tenant/environment/warehouse/carrier-account constraint or plan entitlement denied. New live external-tracker registration and standalone address verification also return service_not_enabled until price and quota policies are confirmed; no upstream call or new fee/accrual is permitted.
404Resource absent or not visible in the authorized tenant/environment.
409Business conflict, changed idempotency payload, stale quote, pending side effect or insufficient stock/funds.
422Field/business validation failed; details identify invalid fields.
429Rate or paid-service limit exceeded. Respect Retry-After.
500Unexpected server error; use requestId and query operation before retrying a side effect.
503Service temporarily unavailable; upstream outcome may be unknown, query/replay the operation.
下载 V2 契约(JSON)

Stable order by occurredAt,id. No transaction mutation endpoints. These records represent executed business changes, not requested future quantities. Source order, fulfillment and store references must also be within the credential resource restrictions before pagination. A restricted ledger may contain fewer rows than the full physical warehouse ledger; stock quantities are never reduced to match those visible rows.

所需权限
{
  "anyOf": [
    {
      "allOf": [
        "inventory.read"
      ]
    }
  ]
}
参数
cursor
query · 可选
Opaque continuation bound to tenant/environment/integration scope, filters, snapshot high-watermark and stable sort (updatedAt,id or documented resource-specific sort). Do not alter filters between pages. Incremental synchronization must include archive/deletion tombstones within the published retention window; snapshot expiry fails explicitly and requires a new scan.
limit
query · 可选
integer
warehouseId
query · 可选
string
productId
query · 可选
string
locationId
query · 可选
string
occurredAfter
query · 可选
string
sourceId
query · 可选
string
返回结果
200Success.
400Malformed JSON, unsupported query or invalid request syntax.
401Missing, invalid, expired or revoked API key credential.
403Scope, tenant/environment/warehouse/carrier-account constraint or plan entitlement denied. New live external-tracker registration and standalone address verification also return service_not_enabled until price and quota policies are confirmed; no upstream call or new fee/accrual is permitted.
404Resource absent or not visible in the authorized tenant/environment.
409Business conflict, changed idempotency payload, stale quote, pending side effect or insufficient stock/funds.
422Field/business validation failed; details identify invalid fields.
429Rate or paid-service limit exceeded. Respect Retry-After.
500Unexpected server error; use requestId and query operation before retrying a side effect.
503Service temporarily unavailable; upstream outcome may be unknown, query/replay the operation.
下载 V2 契约(JSON)

Apply an atomic guarded stock adjustment.

所需权限
{
  "anyOf": [
    {
      "allOf": [
        "inventory.adjust"
      ]
    }
  ]
}
参数
Idempotency-Key
header · 必填
Required on every business write, including quotes, verification and DELETE. New logical action=new key; retry=same key and canonical payload. Namespace account+environment+stable integrationId+HTTP method+canonical path; credential rotation within one integration preserves integrationId. Same key/different payload=409. Lookup follows authentication/resource authorization and precedes If-Match/freshness checks so a completed retry returns its first result. General receipts retained >=7 days; financial/inventory side effects retain durable business association or tombstone beyond receipt expiry to prevent re-execution. In-flight/unknown result returns its operation, never a blind repurchase. Secret-creation responses are the deliberate exception to identical replay: the resource is replayed, but its one-time secret is null with secretUnavailable=true; use management rotation to recover.
请求
warehouseId
string · 必填
Stable Shipbuy resource identifier serialized as a string. Treat as opaque; never confuse with a carrier identifier or display number.
reasonCode
string · 必填
["correction","damage","loss"]
reason
string · 必填
lines
array · 必填
{
  "warehouseId": "10",
  "reasonCode": "correction",
  "reason": "Cycle check found two additional units",
  "lines": [
    {
      "productId": "501",
      "locationId": "22",
      "mode": "delta",
      "quantityDelta": 2,
      "expectedOnHand": 20
    }
  ]
}
返回结果
201Success.
400Malformed JSON, unsupported query or invalid request syntax.
401Missing, invalid, expired or revoked API key credential.
403Scope, tenant/environment/warehouse/carrier-account constraint or plan entitlement denied. New live external-tracker registration and standalone address verification also return service_not_enabled until price and quota policies are confirmed; no upstream call or new fee/accrual is permitted.
404Resource absent or not visible in the authorized tenant/environment.
409Business conflict, changed idempotency payload, stale quote, pending side effect or insufficient stock/funds.
422Field/business validation failed; details identify invalid fields.
429Rate or paid-service limit exceeded. Respect Retry-After.
500Unexpected server error; use requestId and query operation before retrying a side effect.
503Service temporarily unavailable; upstream outcome may be unknown, query/replay the operation.
下载 V2 契约(JSON)

Create a manual warehouse-level stock hold.

所需权限
{
  "anyOf": [
    {
      "allOf": [
        "inventory.reserve"
      ]
    }
  ]
}
参数
Idempotency-Key
header · 必填
Required on every business write, including quotes, verification and DELETE. New logical action=new key; retry=same key and canonical payload. Namespace account+environment+stable integrationId+HTTP method+canonical path; credential rotation within one integration preserves integrationId. Same key/different payload=409. Lookup follows authentication/resource authorization and precedes If-Match/freshness checks so a completed retry returns its first result. General receipts retained >=7 days; financial/inventory side effects retain durable business association or tombstone beyond receipt expiry to prevent re-execution. In-flight/unknown result returns its operation, never a blind repurchase. Secret-creation responses are the deliberate exception to identical replay: the resource is replayed, but its one-time secret is null with secretUnavailable=true; use management rotation to recover.
请求
warehouseId
string · 必填
Stable Shipbuy resource identifier serialized as a string. Treat as opaque; never confuse with a carrier identifier or display number.
productId
string · 必填
Stable Shipbuy resource identifier serialized as a string. Treat as opaque; never confuse with a carrier identifier or display number.
quantity
integer · 必填
reason
string · 必填
expiresAt
string · 可选
UTC date/time, exactly yyyy-MM-dd HH:mm:ss. This project convention deliberately is not RFC 3339; all time zones are UTC unless a field explicitly says local calendar date.
{
  "warehouseId": "10",
  "productId": "501",
  "quantity": 3,
  "reason": "Reserved for upcoming promotion",
  "expiresAt": "2026-11-03 18:00:00"
}
返回结果
201Success.
400Malformed JSON, unsupported query or invalid request syntax.
401Missing, invalid, expired or revoked API key credential.
403Scope, tenant/environment/warehouse/carrier-account constraint or plan entitlement denied. New live external-tracker registration and standalone address verification also return service_not_enabled until price and quota policies are confirmed; no upstream call or new fee/accrual is permitted.
404Resource absent or not visible in the authorized tenant/environment.
409Business conflict, changed idempotency payload, stale quote, pending side effect or insufficient stock/funds.
422Field/business validation failed; details identify invalid fields.
429Rate or paid-service limit exceeded. Respect Retry-After.
500Unexpected server error; use requestId and query operation before retrying a side effect.
503Service temporarily unavailable; upstream outcome may be unknown, query/replay the operation.
下载 V2 契约(JSON)

Only active manual holds; fully released/expired rows are not retained as resources by the current model. Audit/operation receipts are separate. Fulfillment holds are not editable here.

所需权限
{
  "anyOf": [
    {
      "allOf": [
        "inventory.read"
      ]
    }
  ]
}
参数
cursor
query · 可选
Opaque continuation bound to tenant/environment/integration scope, filters, snapshot high-watermark and stable sort (updatedAt,id or documented resource-specific sort). Do not alter filters between pages. Incremental synchronization must include archive/deletion tombstones within the published retention window; snapshot expiry fails explicitly and requires a new scan.
limit
query · 可选
integer
updatedAfter
query · 可选
Exclusive UTC updated-time lower bound. For incremental sync keep a small overlap and deduplicate by id/version; cursor is authoritative within a scan.
warehouseId
query · 可选
string
productId
query · 可选
string
返回结果
200Success.
400Malformed JSON, unsupported query or invalid request syntax.
401Missing, invalid, expired or revoked API key credential.
403Scope, tenant/environment/warehouse/carrier-account constraint or plan entitlement denied. New live external-tracker registration and standalone address verification also return service_not_enabled until price and quota policies are confirmed; no upstream call or new fee/accrual is permitted.
404Resource absent or not visible in the authorized tenant/environment.
409Business conflict, changed idempotency payload, stale quote, pending side effect or insufficient stock/funds.
422Field/business validation failed; details identify invalid fields.
429Rate or paid-service limit exceeded. Respect Retry-After.
500Unexpected server error; use requestId and query operation before retrying a side effect.
503Service temporarily unavailable; upstream outcome may be unknown, query/replay the operation.
下载 V2 契约(JSON)

Release all or part of a manual stock hold.

所需权限
{
  "anyOf": [
    {
      "allOf": [
        "inventory.reserve"
      ]
    }
  ]
}
参数
reservationId
path · 必填
string
Idempotency-Key
header · 必填
Required on every business write, including quotes, verification and DELETE. New logical action=new key; retry=same key and canonical payload. Namespace account+environment+stable integrationId+HTTP method+canonical path; credential rotation within one integration preserves integrationId. Same key/different payload=409. Lookup follows authentication/resource authorization and precedes If-Match/freshness checks so a completed retry returns its first result. General receipts retained >=7 days; financial/inventory side effects retain durable business association or tombstone beyond receipt expiry to prevent re-execution. In-flight/unknown result returns its operation, never a blind repurchase. Secret-creation responses are the deliberate exception to identical replay: the resource is replayed, but its one-time secret is null with secretUnavailable=true; use management rotation to recover.
请求
quantity
integer · 可选
reason
string · 必填
{
  "quantity": 1,
  "reason": "Promotion requirement reduced"
}
返回结果
201Success.
400Malformed JSON, unsupported query or invalid request syntax.
401Missing, invalid, expired or revoked API key credential.
403Scope, tenant/environment/warehouse/carrier-account constraint or plan entitlement denied. New live external-tracker registration and standalone address verification also return service_not_enabled until price and quota policies are confirmed; no upstream call or new fee/accrual is permitted.
404Resource absent or not visible in the authorized tenant/environment.
409Business conflict, changed idempotency payload, stale quote, pending side effect or insufficient stock/funds.
422Field/business validation failed; details identify invalid fields.
429Rate or paid-service limit exceeded. Respect Retry-After.
500Unexpected server error; use requestId and query operation before retrying a side effect.
503Service temporarily unavailable; upstream outcome may be unknown, query/replay the operation.
下载 V2 契约(JSON)