产品
契约已确认 · 验证中
详细字段参考以英文显示;字段名和 API 值保持不变。
Create a product, parent, variant or component product.
所需权限
{
"anyOf": [
{
"allOf": [
"products.write"
]
}
]
}参数
Idempotency-Keyheader · 必填 | 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. |
|---|
请求
typestring · 必填 | ["single","parent","variant","bundle","assembly","virtual"] |
|---|---|
skustring · 可选 | |
namestring · 必填 | |
statusstring · 可选 | ["active","inactive"] |
descriptionstring · 可选 | |
barcodestring · 可选 | |
upcstring · 可选 | |
eanstring · 可选 | |
gtinstring · 可选 | |
brandstring · 可选 | |
manufacturerstring · 可选 | |
currencystring · 可选 | |
salePricestring · 可选 | Non-negative decimal monetary amount as a string; never IEEE floating point. |
trackInventoryboolean · 可选 | |
parentIdstring · 可选 | Stable Shipbuy resource identifier serialized as a string. Treat as opaque; never confuse with a carrier identifier or display number. |
variantOptionsarray · 可选 | |
variantSelectionobject · 可选 | Selected axis/value pairs. Axis names and values must belong to the parent options; the normalized combination is unique within the parent. |
componentsarray · 可选 | |
shippingDefaultsobject · 可选 | Optional product shipping defaults, not an actual package or inventory quantity. Partial defaults can be stored; incomplete dimensions/weight do not create a valid shipping plan automatically. |
customsobject · 可选 | |
metadataobject · 可选 | Client-owned string metadata only. No secrets or card data. Not used for authorization or business rules. |
{
"type": "single",
"sku": "TEE-BLK-M",
"name": "Black cotton T-shirt M",
"currency": "USD",
"salePrice": "19.95",
"trackInventory": true
}返回结果
201 | Success. |
|---|---|
400 | Malformed JSON, unsupported query or invalid request syntax. |
401 | Missing, invalid, expired or revoked API key credential. |
403 | Scope, 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. |
404 | Resource absent or not visible in the authorized tenant/environment. |
409 | Business conflict, changed idempotency payload, stale quote, pending side effect or insufficient stock/funds. |
422 | Field/business validation failed; details identify invalid fields. |
429 | Rate or paid-service limit exceeded. Respect Retry-After. |
500 | Unexpected server error; use requestId and query operation before retrying a side effect. |
503 | Service temporarily unavailable; upstream outcome may be unknown, query/replay the operation. |
All six types are first-class products. parentId selects variants; component definitions are on bundle/assembly products. No separate variants or SKU inventory master is introduced.
所需权限
{
"anyOf": [
{
"allOf": [
"products.read"
]
}
]
}参数
cursorquery · 可选 | 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. |
|---|---|
limitquery · 可选 | integer |
updatedAfterquery · 可选 | Exclusive UTC updated-time lower bound. For incremental sync keep a small overlap and deduplicate by id/version; cursor is authoritative within a scan. |
skuquery · 可选 | string |
parentIdquery · 可选 | string |
typequery · 可选 | string |
statusquery · 可选 | string |
queryquery · 可选 | string |
返回结果
200 | Success. |
|---|---|
400 | Malformed JSON, unsupported query or invalid request syntax. |
401 | Missing, invalid, expired or revoked API key credential. |
403 | Scope, 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. |
404 | Resource absent or not visible in the authorized tenant/environment. |
409 | Business conflict, changed idempotency payload, stale quote, pending side effect or insufficient stock/funds. |
422 | Field/business validation failed; details identify invalid fields. |
429 | Rate or paid-service limit exceeded. Respect Retry-After. |
500 | Unexpected server error; use requestId and query operation before retrying a side effect. |
503 | Service temporarily unavailable; upstream outcome may be unknown, query/replay the operation. |
Retrieve a product with options and components.
所需权限
{
"anyOf": [
{
"allOf": [
"products.read"
]
}
]
}参数
productIdpath · 必填 | string |
|---|
返回结果
200 | Success. |
|---|---|
400 | Malformed JSON, unsupported query or invalid request syntax. |
401 | Missing, invalid, expired or revoked API key credential. |
403 | Scope, 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. |
404 | Resource absent or not visible in the authorized tenant/environment. |
409 | Business conflict, changed idempotency payload, stale quote, pending side effect or insufficient stock/funds. |
422 | Field/business validation failed; details identify invalid fields. |
429 | Rate or paid-service limit exceeded. Respect Retry-After. |
500 | Unexpected server error; use requestId and query operation before retrying a side effect. |
503 | Service temporarily unavailable; upstream outcome may be unknown, query/replay the operation. |
Edit or inactivate a product.
所需权限
{
"anyOf": [
{
"allOf": [
"products.write"
]
}
]
}参数
productIdpath · 必填 | string |
|---|---|
Idempotency-Keyheader · 必填 | 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. |
If-Matchheader · 必填 | Exact strong ETag from the latest resource read. Required for PATCH; absent=428, stale=412. Quote/ship/split actions use explicit expectedVersion. An authorized idempotent replay returns its original committed result even if the resource is now newer. |
请求
skustring · 可选 | |
|---|---|
namestring · 可选 | |
statusstring · 可选 | ["active","inactive"] |
descriptionstring · 可选 | |
barcodestring · 可选 | |
upcstring · 可选 | |
eanstring · 可选 | |
gtinstring · 可选 | |
brandstring · 可选 | |
manufacturerstring · 可选 | |
currencystring · 可选 | |
salePricestring · 可选 | Non-negative decimal monetary amount as a string; never IEEE floating point. |
trackInventoryboolean · 可选 | |
parentIdstring · 可选 | Stable Shipbuy resource identifier serialized as a string. Treat as opaque; never confuse with a carrier identifier or display number. |
variantOptionsarray · 可选 | |
variantSelectionobject · 可选 | Selected axis/value pairs. Axis names and values must belong to the parent options; the normalized combination is unique within the parent. |
componentsarray · 可选 | |
shippingDefaultsobject · 可选 | Optional product shipping defaults, not an actual package or inventory quantity. Partial defaults can be stored; incomplete dimensions/weight do not create a valid shipping plan automatically. |
customsobject · 可选 | |
metadataobject · 可选 | Client-owned string metadata only. No secrets or card data. Not used for authorization or business rules. |
{
"status": "inactive"
}返回结果
200 | Success. |
|---|---|
400 | Malformed JSON, unsupported query or invalid request syntax. |
401 | Missing, invalid, expired or revoked API key credential. |
403 | Scope, 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. |
404 | Resource absent or not visible in the authorized tenant/environment. |
409 | Business conflict, changed idempotency payload, stale quote, pending side effect or insufficient stock/funds. |
412 | If-Match does not match the current resource revision. |
422 | Field/business validation failed; details identify invalid fields. |
428 | Required concurrency precondition missing. |
429 | Rate or paid-service limit exceeded. Respect Retry-After. |
500 | Unexpected server error; use requestId and query operation before retrying a side effect. |
503 | Service temporarily unavailable; upstream outcome may be unknown, query/replay the operation. |
Sets status=inactive through the normal product service. Does not hard-delete, remove BOM links, cancel orders or mutate stock. Existing reference/type business guards still apply; replay returns the original result.
所需权限
{
"anyOf": [
{
"allOf": [
"products.write"
]
}
]
}参数
productIdpath · 必填 | string |
|---|---|
Idempotency-Keyheader · 必填 | 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. |
请求
reasonstring · 必填 |
|---|
{
"reason": "Product discontinued"
}返回结果
200 | Success. |
|---|---|
400 | Malformed JSON, unsupported query or invalid request syntax. |
401 | Missing, invalid, expired or revoked API key credential. |
403 | Scope, 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. |
404 | Resource absent or not visible in the authorized tenant/environment. |
409 | Business conflict, changed idempotency payload, stale quote, pending side effect or insufficient stock/funds. |
422 | Field/business validation failed; details identify invalid fields. |
429 | Rate or paid-service limit exceeded. Respect Retry-After. |
500 | Unexpected server error; use requestId and query operation before retrying a side effect. |
503 | Service temporarily unavailable; upstream outcome may be unknown, query/replay the operation. |