Amazon
Amazon marketplace selection, content and bullet templates, publish defaults, product types, stock and review requests.
/amazon/configMarketplace selection, publish defaults, content templates and the product-type whitelist in one call, plus deploy readiness. deployReady is false until a marketplace is set AND at least one content template exists, and missingForDeploy names which is absent. Read this instead of inferring readiness from a failed publish, which for Amazon fails asynchronously.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
shopIdrequired | query | string | The Amazon shop to act on. pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ |
Responses
| Status | Meaning (body: error envelope) |
|---|---|
| 400 | Validation failed, or the request is not valid for this resource. |
| 401 | The API key is missing, unknown, revoked or expired. |
| 403 | The API key lacks the required scope, or is not bound to this shop. |
| 404 | No such resource for this tenant. |
| 409 | The request conflicts with the current state (see |
| 422 | The marketplace rejected the request; |
| 429 | Back off and retry. |
| 500 | A defect on our side ( |
Request sample
curl -X GET 'https://api.doctorx.vn/api/public/v1/amazon/config?shopId=string' \
-H "Authorization: Bearer $DOCTORX_API_KEY"/amazon/marketplacesThe gateway's live catalog for the connected seller account, plus which marketplace is currently set. Each option carries its settlement currency, which is what makes money display correctly after a selection.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
shopIdrequired | query | string | The Amazon shop to act on. pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ |
Responses
| Status | Meaning (body: error envelope) |
|---|---|
| 400 | Validation failed, or the request is not valid for this resource. |
| 401 | The API key is missing, unknown, revoked or expired. |
| 403 | The API key lacks the required scope, or is not bound to this shop. |
| 404 | No such resource for this tenant. |
| 409 | The request conflicts with the current state (see |
| 422 | The marketplace rejected the request; |
| 429 | Back off and retry. |
| 500 | A defect on our side ( |
Request sample
curl -X GET 'https://api.doctorx.vn/api/public/v1/amazon/marketplaces?shopId=string' \
-H "Authorization: Bearer $DOCTORX_API_KEY"/amazon/shop-marketplaceA gateway-side write on the site, not a local preference, and a precondition for order sync producing anything. Also persists the shop currency from the selected marketplace and nudges an order sync. The response is read back from the gateway rather than echoed, because the gateway is the authority on what is now selected.
Request body
shopIdstringrequiredDoctorX resource id: a UUID in canonical 8-4-4-4-12 hex form. Version and variant bits are not constrained.
pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
marketplaceIdstringrequiredThe marketplace id from GET /amazon/marketplaces options, e.g. ATVPDKIKX0DER.
min length 1
Responses
| Status | Meaning (body: error envelope) |
|---|---|
| 400 | Validation failed, or the request is not valid for this resource. |
| 401 | The API key is missing, unknown, revoked or expired. |
| 403 | The API key lacks the required scope, or is not bound to this shop. |
| 404 | No such resource for this tenant. |
| 409 | The request conflicts with the current state (see |
| 422 | The marketplace rejected the request; |
| 429 | Back off and retry. |
| 500 | A defect on our side ( |
Request sample
curl -X PUT 'https://api.doctorx.vn/api/public/v1/amazon/shop-marketplace' \
-H "Authorization: Bearer $DOCTORX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"shopId": "string",
"marketplaceId": "string"
}'/amazon/product-typesThe read-only whitelist the gateway accepts at deploy (for example SHIRT, COAT). Not an Amazon browse-node tree, and not per listing.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
shopIdrequired | query | string | The Amazon shop to act on. pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ |
Responses
| Status | Meaning (body: error envelope) |
|---|---|
| 400 | Validation failed, or the request is not valid for this resource. |
| 401 | The API key is missing, unknown, revoked or expired. |
| 403 | The API key lacks the required scope, or is not bound to this shop. |
| 404 | No such resource for this tenant. |
| 409 | The request conflicts with the current state (see |
| 422 | The marketplace rejected the request; |
| 429 | Back off and retry. |
| 500 | A defect on our side ( |
Request sample
curl -X GET 'https://api.doctorx.vn/api/public/v1/amazon/product-types?shopId=string' \
-H "Authorization: Bearer $DOCTORX_API_KEY"/amazon/bullet-templatesThe ids for channelMeta.amazonBulletTemplateId. Workspace-scoped, not per-shop: the bullets describe the PRODUCT, so no shopId applies. A template referenced by a listing REPLACES its inline bullets, and a dangling id degrades silently to the inline ones, which is why reading the list back matters.
Responses
| Status | Meaning (body: error envelope) |
|---|---|
| 400 | Validation failed, or the request is not valid for this resource. |
| 401 | The API key is missing, unknown, revoked or expired. |
| 403 | The API key lacks the required scope, or is not bound to this shop. |
| 404 | No such resource for this tenant. |
| 409 | The request conflicts with the current state (see |
| 422 | The marketplace rejected the request; |
| 429 | Back off and retry. |
| 500 | A defect on our side ( |
Request sample
curl -X GET 'https://api.doctorx.vn/api/public/v1/amazon/bullet-templates' \
-H "Authorization: Bearer $DOCTORX_API_KEY"/amazon/inventoryOne row per seller SKU per marketplace (marketplaceId) per listing it sits under: its ASIN, its parent product, the listing (listingId, with its state at the marketplace connection and on Amazon), the marketplace's stock figure (quantity), its Amazon-fulfilled split (fba: fulfillable, inbound, reserved and unfulfillable units) and how the SKU ships (fulfillment: FBA, FBM or both, and the listed merchant stock). Canada and Mexico have their own rows, listings and FBA stock. The same SKU can appear under more than one listing with different numbers, typically a SKU moved to another parent ASIN or a draft copy: prefer the row whose marketplaceStatus is active and whose sourceUpdatedAt is the latest. DoctorX reads every Amazon shop's stock every 30 minutes and answers from that copy, so this call is fast and seenAt says how fresh each row is. Rows come in the order they last changed (changedAt, oldest first); follow nextCursor to the end for the whole shop, or pass updatedSince (with includeRemoved=true to also learn which SKUs went away) to read only what changed. A change is served once it is two minutes old. Filter by marketplaceId, sku, asin or listingId. Inbound shipments: GET /amazon/inventory/shipments.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | Page size, 1..200. Defaults to 50. min 1 · max 200 · default 50 |
cursor | query | string | Opaque cursor from a previous response meta.pagination.nextCursor. |
includeTotal | query | string | When true, meta.pagination.total carries the full matching count (an extra COUNT query). |
shopIdrequired | query | string | The Amazon shop whose stock to read. pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ |
marketplaceId | query | string | Only this Amazon marketplace (exact match, e.g. min length 1 |
sku | query | string | Only this seller SKU (exact match, case-sensitive). min length 1 |
asin | query | string | Only this ASIN (exact match). min length 1 |
listingId | query | string | Only the SKUs under this listing ( min length 1 |
updatedSince | query | string (date-time) | string (date) | Only rows whose |
includeRemoved | query | string | When true, SKUs a full read no longer showed are returned too (with |
Responses
| Status | Meaning (body: error envelope) |
|---|---|
| 400 | Validation failed, or the request is not valid for this resource. |
| 401 | The API key is missing, unknown, revoked or expired. |
| 403 | The API key lacks the required scope, or is not bound to this shop. |
| 404 | No such resource for this tenant. |
| 409 | The request conflicts with the current state (see |
| 422 | The marketplace rejected the request; |
| 429 | Back off and retry. |
| 500 | A defect on our side ( |
Request sample
curl -X GET 'https://api.doctorx.vn/api/public/v1/amazon/inventory?shopId=string' \
-H "Authorization: Bearer $DOCTORX_API_KEY"/amazon/inventory/shipmentsThe shipments the seller sent to Amazon (FBA fulfillment centers and AWD) that Amazon has received units of, newest first, read live from the marketplace connection on every call. A shipment Amazon has received nothing of yet is not listed: for units still on their way, read fba.inbound on GET /amazon/inventory. Filter by received day (fromDate, toDate), shipmentId, sku or asin; follow nextCursor for the next page.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
shopIdrequired | query | string | The Amazon shop whose shipments to read. pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ |
fromDate | query | string (date) | Only shipments received on or after this day (YYYY-MM-DD). pattern ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$ |
toDate | query | string (date) | Only shipments received on or before this day (YYYY-MM-DD). pattern ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$ |
shipmentId | query | string | Only this shipment. min length 1 |
sku | query | string | Only shipments carrying this seller SKU. min length 1 |
asin | query | string | Only shipments carrying this ASIN. min length 1 |
limit | query | integer | Page size, 1..100. Defaults to 50. min 1 · max 100 · default 50 |
cursor | query | string | Opaque cursor from a previous response meta.pagination.nextCursor. |
includeTotal | query | string | When true, meta.pagination.total carries the number of shipments matching. |
Responses
| Status | Meaning (body: error envelope) |
|---|---|
| 400 | Validation failed, or the request is not valid for this resource. |
| 401 | The API key is missing, unknown, revoked or expired. |
| 403 | The API key lacks the required scope, or is not bound to this shop. |
| 404 | No such resource for this tenant. |
| 409 | The request conflicts with the current state (see |
| 422 | The marketplace rejected the request; |
| 429 | Back off and retry. |
| 500 | A defect on our side ( |
Request sample
curl -X GET 'https://api.doctorx.vn/api/public/v1/amazon/inventory/shipments?shopId=string' \
-H "Authorization: Bearer $DOCTORX_API_KEY"/amazon/contentsThe listing description bodies. This route returns only the templates your workspace owns. Refreshed from the gateway on read; if the gateway list is unavailable, the last known copy is returned rather than dropping a row.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
shopIdrequired | query | string | The Amazon shop to act on. pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ |
Responses
| Status | Meaning (body: error envelope) |
|---|---|
| 400 | Validation failed, or the request is not valid for this resource. |
| 401 | The API key is missing, unknown, revoked or expired. |
| 403 | The API key lacks the required scope, or is not bound to this shop. |
| 404 | No such resource for this tenant. |
| 409 | The request conflicts with the current state (see |
| 422 | The marketplace rejected the request; |
| 429 | Back off and retry. |
| 500 | A defect on our side ( |
Request sample
curl -X GET 'https://api.doctorx.vn/api/public/v1/amazon/contents?shopId=string' \
-H "Authorization: Bearer $DOCTORX_API_KEY"/amazon/contentsCreates the template on the gateway and records that your workspace owns it. If another content template is being created at that moment, the call is refused with a message saying so; send it again shortly.
Request body
shopIdstringResolves which gateway workspace to create in. Omit to use the default workspace.
pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
namestringrequiredmin length 1
contentstringrequiredThe listing description body.
min length 1
Responses
| Status | Meaning (body: error envelope) |
|---|---|
| 400 | Validation failed, or the request is not valid for this resource. |
| 401 | The API key is missing, unknown, revoked or expired. |
| 403 | The API key lacks the required scope, or is not bound to this shop. |
| 404 | No such resource for this tenant. |
| 409 | The request conflicts with the current state (see |
| 422 | The marketplace rejected the request; |
| 429 | Back off and retry. |
| 500 | A defect on our side ( |
Request sample
curl -X POST 'https://api.doctorx.vn/api/public/v1/amazon/contents' \
-H "Authorization: Bearer $DOCTORX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"content": "string"
}'/amazon/contents/{id}Takes the gateway content id. Only the keys you send are changed; an absent key is left alone rather than cleared. An id your tenant does not own answers not-found.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string |
Request body
namestringmin length 1
contentstringmin length 1
Responses
| Status | Meaning (body: error envelope) |
|---|---|
| 400 | Validation failed, or the request is not valid for this resource. |
| 401 | The API key is missing, unknown, revoked or expired. |
| 403 | The API key lacks the required scope, or is not bound to this shop. |
| 404 | No such resource for this tenant. |
| 409 | The request conflicts with the current state (see |
| 422 | The marketplace rejected the request; |
| 429 | Back off and retry. |
| 500 | A defect on our side ( |
Request sample
curl -X PUT 'https://api.doctorx.vn/api/public/v1/amazon/contents/string' \
-H "Authorization: Bearer $DOCTORX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'/amazon/contents/{id}Deletes it on the gateway. An id your workspace does not own answers not-found. A template still referenced by a shop’s publish defaults will make later deploys fail, so clear contentId first.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string |
Responses
| Status | Meaning (body: error envelope) |
|---|---|
| 400 | Validation failed, or the request is not valid for this resource. |
| 401 | The API key is missing, unknown, revoked or expired. |
| 403 | The API key lacks the required scope, or is not bound to this shop. |
| 404 | No such resource for this tenant. |
| 409 | The request conflicts with the current state (see |
| 422 | The marketplace rejected the request; |
| 429 | Back off and retry. |
| 500 | A defect on our side ( |
Request sample
curl -X DELETE 'https://api.doctorx.vn/api/public/v1/amazon/contents/string' \
-H "Authorization: Bearer $DOCTORX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"/amazon/defaultsApplied at deploy when a template names nothing. Absent values are reported as null so "not set" is distinguishable from "field missing".
Parameters
| Name | In | Type | Description |
|---|---|---|---|
shopIdrequired | query | string | The Amazon shop to act on. pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ |
Responses
| Status | Meaning (body: error envelope) |
|---|---|
| 400 | Validation failed, or the request is not valid for this resource. |
| 401 | The API key is missing, unknown, revoked or expired. |
| 403 | The API key lacks the required scope, or is not bound to this shop. |
| 404 | No such resource for this tenant. |
| 409 | The request conflicts with the current state (see |
| 422 | The marketplace rejected the request; |
| 429 | Back off and retry. |
| 500 | A defect on our side ( |
Request sample
curl -X GET 'https://api.doctorx.vn/api/public/v1/amazon/defaults?shopId=string' \
-H "Authorization: Bearer $DOCTORX_API_KEY"/amazon/defaultsA merge, not a replace: only the keys you send are written and the rest keep their current values. fulfillmentChannelCode DEFAULT means merchant-fulfilled (FBM); an Amazon-fulfilled (FBA) order is never auto-fulfilled by DoctorX, since Amazon ships it.
Request body
shopIdstringrequiredDoctorX resource id: a UUID in canonical 8-4-4-4-12 hex form. Version and variant bits are not constrained.
pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
leadTimeToShipMaxDaysintegermin 0 · max 30
fulfillmentChannelCodestringmin length 1
brandstringmin length 1
contentIdstringmin length 1
shippingPackageTemplateIdstringmin length 1
Responses
| Status | Meaning (body: error envelope) |
|---|---|
| 400 | Validation failed, or the request is not valid for this resource. |
| 401 | The API key is missing, unknown, revoked or expired. |
| 403 | The API key lacks the required scope, or is not bound to this shop. |
| 404 | No such resource for this tenant. |
| 409 | The request conflicts with the current state (see |
| 422 | The marketplace rejected the request; |
| 429 | Back off and retry. |
| 500 | A defect on our side ( |
Request sample
curl -X PUT 'https://api.doctorx.vn/api/public/v1/amazon/defaults' \
-H "Authorization: Bearer $DOCTORX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"shopId": "string"
}'/amazon/solicitations/eligibilityA pure read, and always the first step. Amazon allows exactly ONE review request per order, ever, so requesting blind spends that single chance. skippedOrderIds lists orders whose Amazon order number is not synced yet, so they could not even be asked about.
Request body
shopIdstringrequiredDoctorX resource id: a UUID in canonical 8-4-4-4-12 hex form. Version and variant bits are not constrained.
pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
orderIdsstring[]requiredDoctorX order ids, at most 50 per call. Amazon allows ONE review request per order, ever.
min items 1 · max items 50
Responses
| Status | Meaning (body: error envelope) |
|---|---|
| 400 | Validation failed, or the request is not valid for this resource. |
| 401 | The API key is missing, unknown, revoked or expired. |
| 403 | The API key lacks the required scope, or is not bound to this shop. |
| 404 | No such resource for this tenant. |
| 409 | The request conflicts with the current state (see |
| 422 | The marketplace rejected the request; |
| 429 | Back off and retry. |
| 500 | A defect on our side ( |
Request sample
curl -X POST 'https://api.doctorx.vn/api/public/v1/amazon/solicitations/eligibility' \
-H "Authorization: Bearer $DOCTORX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"shopId": "string",
"orderIds": [
"string"
]
}'/amazon/solicitations/requestEach request is a real email to a real buyer. There is no cancel and no undo, and Amazon permits exactly one per order forever, so call the eligibility route first and send only for orders it reports eligible. totalQueued is how many the gateway accepted; anything in skippedOrderIds was never sent.
Request body
shopIdstringrequiredDoctorX resource id: a UUID in canonical 8-4-4-4-12 hex form. Version and variant bits are not constrained.
pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
orderIdsstring[]requiredDoctorX order ids, at most 50 per call. Amazon allows ONE review request per order, ever.
min items 1 · max items 50
Responses
| Status | Meaning (body: error envelope) |
|---|---|
| 400 | Validation failed, or the request is not valid for this resource. |
| 401 | The API key is missing, unknown, revoked or expired. |
| 403 | The API key lacks the required scope, or is not bound to this shop. |
| 404 | No such resource for this tenant. |
| 409 | The request conflicts with the current state (see |
| 422 | The marketplace rejected the request; |
| 429 | Back off and retry. |
| 500 | A defect on our side ( |
Request sample
curl -X POST 'https://api.doctorx.vn/api/public/v1/amazon/solicitations/request' \
-H "Authorization: Bearer $DOCTORX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"shopId": "string",
"orderIds": [
"string"
]
}'