DoctorX logoDoctorX Get an API key

eBay

eBay business policies, inventory locations, marketplaces, item conditions and shipping services.

GET/ebay/marketplaces

Every marketplace DoctorX recognises, with its default currency and locale. supported: false means recognised but not selectable yet. Read this before setting a shop marketplace rather than hard-coding ids.

Responses

200EbayMarketplaceListResponse
StatusMeaning (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 error.code).

422

The marketplace rejected the request; error.details carries its own message.

429

Back off and retry. error.code says whose limit was hit: rate_limited is ours (honour Retry-After), channel_rate_limited is the marketplace throttling us, channel_unavailable is the marketplace being unreachable.

500

A defect on our side (internal_error), and the only status left outside the 4xx range. The origin emits the envelope below, but the edge in front of api.doctorx.vn replaces the body of a 5xx with its own plain-text page, so do NOT require this body to parse: branch on the status.

Request sample

curl -X GET 'https://api.doctorx.vn/api/public/v1/ebay/marketplaces' \
  -H "Authorization: Bearer $DOCTORX_API_KEY"
GET/ebay/conditions

The item conditions an eBay listing can carry. Pass shopId and categoryId to get the set eBay actually allows in that category: measured across 2,773 categories, eBay offers between 0 and 8 and requires one on 96% of them, and NO category accepts the full marketplace-wide list. Without both parameters this returns that marketplace-wide list unchanged, which is a superset and may include conditions the category will refuse.

Parameters

NameInTypeDescription
shopIdrequired
querystring
categoryIdrequired
querystring

Responses

200EbayCodeNameListResponse
StatusMeaning (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 error.code).

422

The marketplace rejected the request; error.details carries its own message.

429

Back off and retry. error.code says whose limit was hit: rate_limited is ours (honour Retry-After), channel_rate_limited is the marketplace throttling us, channel_unavailable is the marketplace being unreachable.

500

A defect on our side (internal_error), and the only status left outside the 4xx range. The origin emits the envelope below, but the edge in front of api.doctorx.vn replaces the body of a 5xx with its own plain-text page, so do NOT require this body to parse: branch on the status.

Request sample

curl -X GET 'https://api.doctorx.vn/api/public/v1/ebay/conditions?shopId=string&categoryId=string' \
  -H "Authorization: Bearer $DOCTORX_API_KEY"
GET/ebay/shipping-services

Codes valid for shippingServiceCode on a fulfillment policy, each with its carrier. Pass shopId to read the list eBay publishes for THAT shop and marketplace, which is the only list that is right for a non-US marketplace (an AU shop ships AU_Regular, not USPSPriority) and the only one that reflects what eBay will actually accept - a code with ValidForSellingFlow: false is refused at policy creation with 20403 LSAS validation failed. With no shopId the response is the static US catalogue, unchanged.

Parameters

NameInTypeDescription
shopId
querystring

Read the list from eBay for this shop. Omit for the static US catalogue.

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
querystring

Defaults to the shop's own default marketplace.

One of: "EBAY_US", "EBAY_GB", "EBAY_DE", "EBAY_AU", "EBAY_CA", "EBAY_FR", "EBAY_IT", "EBAY_ES", "EBAY_IE", "EBAY_AT", "EBAY_CH", "EBAY_NL", "EBAY_BE", "EBAY_PL", "EBAY_CA_FR"

Responses

200EbayShippingServiceListResponse
StatusMeaning (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 error.code).

422

The marketplace rejected the request; error.details carries its own message.

429

Back off and retry. error.code says whose limit was hit: rate_limited is ours (honour Retry-After), channel_rate_limited is the marketplace throttling us, channel_unavailable is the marketplace being unreachable.

500

A defect on our side (internal_error), and the only status left outside the 4xx range. The origin emits the envelope below, but the edge in front of api.doctorx.vn replaces the body of a 5xx with its own plain-text page, so do NOT require this body to parse: branch on the status.

Request sample

curl -X GET 'https://api.doctorx.vn/api/public/v1/ebay/shipping-services' \
  -H "Authorization: Bearer $DOCTORX_API_KEY"

Policies grouped by type, inventory locations, and whether the seller is opted in to eBay Business Policies. One call to check publish readiness. businessPoliciesOptedIn: false means policy creation will fail until the seller opts in on eBay.

Parameters

NameInTypeDescription
shopIdrequired
querystring

The eBay shop to read configuration for.

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
querystring

Defaults to the shop's own default marketplace.

One of: "EBAY_US", "EBAY_GB", "EBAY_DE", "EBAY_AU", "EBAY_CA", "EBAY_FR", "EBAY_IT", "EBAY_ES", "EBAY_IE", "EBAY_AT", "EBAY_CH", "EBAY_NL", "EBAY_BE", "EBAY_PL", "EBAY_CA_FR"

Responses

200EbayConfigResponse
StatusMeaning (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 error.code).

422

The marketplace rejected the request; error.details carries its own message.

429

Back off and retry. error.code says whose limit was hit: rate_limited is ours (honour Retry-After), channel_rate_limited is the marketplace throttling us, channel_unavailable is the marketplace being unreachable.

500

A defect on our side (internal_error), and the only status left outside the 4xx range. The origin emits the envelope below, but the edge in front of api.doctorx.vn replaces the body of a 5xx with its own plain-text page, so do NOT require this body to parse: branch on the status.

Request sample

curl -X GET 'https://api.doctorx.vn/api/public/v1/ebay/config?shopId=string' \
  -H "Authorization: Bearer $DOCTORX_API_KEY"

Mirrors what the seller has in eBay Seller Hub into DoctorX. Idempotent by eBay policy id, so it is safe to repeat. Each source is best-effort: a partial failure still returns the rest and names what failed in syncSummary.failed.

Request body

shopIdstringrequired

The eBay shop to read configuration for.

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}$

marketplaceIdstring

Defaults to the shop's own default marketplace.

One of: "EBAY_US", "EBAY_GB", "EBAY_DE", "EBAY_AU", "EBAY_CA", "EBAY_FR", "EBAY_IT", "EBAY_ES", "EBAY_IE", "EBAY_AT", "EBAY_CH", "EBAY_NL", "EBAY_BE", "EBAY_PL", "EBAY_CA_FR"

Responses

200EbayConfigResponse
StatusMeaning (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 error.code).

422

The marketplace rejected the request; error.details carries its own message.

429

Back off and retry. error.code says whose limit was hit: rate_limited is ours (honour Retry-After), channel_rate_limited is the marketplace throttling us, channel_unavailable is the marketplace being unreachable.

500

A defect on our side (internal_error), and the only status left outside the 4xx range. The origin emits the envelope below, but the edge in front of api.doctorx.vn replaces the body of a 5xx with its own plain-text page, so do NOT require this body to parse: branch on the status.

Request sample

curl -X POST 'https://api.doctorx.vn/api/public/v1/ebay/sync' \
  -H "Authorization: Bearer $DOCTORX_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "shopId": "string"
}'
PUT/ebay/shop-marketplace

The marketplace every shop-scoped eBay call resolves against when nothing overrides it. EU and UK marketplaces additionally require the app-level eBay signing key to be configured.

Request body

shopIdstringrequired

DoctorX 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}$

marketplaceIdstringrequired

eBay marketplace, e.g. EBAY_US. Policies are per-marketplace and cannot be used across marketplaces.

One of: "EBAY_US", "EBAY_GB", "EBAY_DE", "EBAY_AU", "EBAY_CA", "EBAY_FR", "EBAY_IT", "EBAY_ES", "EBAY_IE", "EBAY_AT", "EBAY_CH", "EBAY_NL", "EBAY_BE", "EBAY_PL", "EBAY_CA_FR"

Responses

200EbayConfigResponse
StatusMeaning (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 error.code).

422

The marketplace rejected the request; error.details carries its own message.

429

Back off and retry. error.code says whose limit was hit: rate_limited is ours (honour Retry-After), channel_rate_limited is the marketplace throttling us, channel_unavailable is the marketplace being unreachable.

500

A defect on our side (internal_error), and the only status left outside the 4xx range. The origin emits the envelope below, but the edge in front of api.doctorx.vn replaces the body of a 5xx with its own plain-text page, so do NOT require this body to parse: branch on the status.

Request sample

curl -X PUT 'https://api.doctorx.vn/api/public/v1/ebay/shop-marketplace' \
  -H "Authorization: Bearer $DOCTORX_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "shopId": "string",
  "marketplaceId": "EBAY_US"
}'
GET/ebay/policies

Flat list across all three types for one shop and marketplace. data carries eBay's verbatim policy payload. Filter with ?type=fulfillment|payment|return.

Parameters

NameInTypeDescription
shopIdrequired
querystring

The eBay shop to read configuration for.

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
querystring

Defaults to the shop's own default marketplace.

One of: "EBAY_US", "EBAY_GB", "EBAY_DE", "EBAY_AU", "EBAY_CA", "EBAY_FR", "EBAY_IT", "EBAY_ES", "EBAY_IE", "EBAY_AT", "EBAY_CH", "EBAY_NL", "EBAY_BE", "EBAY_PL", "EBAY_CA_FR"

Responses

200EbayPolicyListResponse
StatusMeaning (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 error.code).

422

The marketplace rejected the request; error.details carries its own message.

429

Back off and retry. error.code says whose limit was hit: rate_limited is ours (honour Retry-After), channel_rate_limited is the marketplace throttling us, channel_unavailable is the marketplace being unreachable.

500

A defect on our side (internal_error), and the only status left outside the 4xx range. The origin emits the envelope below, but the edge in front of api.doctorx.vn replaces the body of a 5xx with its own plain-text page, so do NOT require this body to parse: branch on the status.

Request sample

curl -X GET 'https://api.doctorx.vn/api/public/v1/ebay/policies?shopId=string' \
  -H "Authorization: Bearer $DOCTORX_API_KEY"
POST/ebay/policies/fulfillment

Created on eBay and mirrored locally. shippingCost is required when shippingCostType is FLAT_RATE, and the international fields are required together; both are checked here rather than left to eBay, whose error does not name the missing field.

Request body

shopIdstringrequired

DoctorX 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}$

marketplaceIdstring

eBay marketplace, e.g. EBAY_US. Policies are per-marketplace and cannot be used across marketplaces.

One of: "EBAY_US", "EBAY_GB", "EBAY_DE", "EBAY_AU", "EBAY_CA", "EBAY_FR", "EBAY_IT", "EBAY_ES", "EBAY_IE", "EBAY_AT", "EBAY_CH", "EBAY_NL", "EBAY_BE", "EBAY_PL", "EBAY_CA_FR"

namestringrequired

eBay caps policy names at 64 characters.

min length 1 · max length 64

handlingTimeDaysintegerrequired

Business days before dispatch (eBay handlingTime).

min 0 · max 30

shippingServiceCodestringrequired

eBay shipping service code, e.g. USPSGround. See GET /ebay/shipping-services.

min length 1 · max length 60

shippingCostTypestringrequired

One of: "FLAT_RATE", "CALCULATED", "FREE"

shippingCoststring

Required when shippingCostType is FLAT_RATE, ignored otherwise.

pattern ^\d+(\.\d{1,2})?$

shipToInternationalboolean
internationalShippingServiceCodestring

Required when shipToInternational is true.

max length 60

internationalShippingCoststring

Required when shipToInternational is true and shippingCostType is FLAT_RATE.

pattern ^\d+(\.\d{1,2})?$

Responses

201EbayPolicyResponse
StatusMeaning (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 error.code).

422

The marketplace rejected the request; error.details carries its own message.

429

Back off and retry. error.code says whose limit was hit: rate_limited is ours (honour Retry-After), channel_rate_limited is the marketplace throttling us, channel_unavailable is the marketplace being unreachable.

500

A defect on our side (internal_error), and the only status left outside the 4xx range. The origin emits the envelope below, but the edge in front of api.doctorx.vn replaces the body of a 5xx with its own plain-text page, so do NOT require this body to parse: branch on the status.

Request sample

curl -X POST 'https://api.doctorx.vn/api/public/v1/ebay/policies/fulfillment' \
  -H "Authorization: Bearer $DOCTORX_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "shopId": "string",
  "name": "string",
  "handlingTimeDays": 0,
  "shippingServiceCode": "string",
  "shippingCostType": "FLAT_RATE"
}'
POST/ebay/policies/payment

Request body

shopIdstringrequired

DoctorX 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}$

marketplaceIdstring

eBay marketplace, e.g. EBAY_US. Policies are per-marketplace and cannot be used across marketplaces.

One of: "EBAY_US", "EBAY_GB", "EBAY_DE", "EBAY_AU", "EBAY_CA", "EBAY_FR", "EBAY_IT", "EBAY_ES", "EBAY_IE", "EBAY_AT", "EBAY_CH", "EBAY_NL", "EBAY_BE", "EBAY_PL", "EBAY_CA_FR"

namestringrequired

eBay caps policy names at 64 characters.

min length 1 · max length 64

immediatePayboolean

Require payment before the order is created.

Responses

201EbayPolicyResponse
StatusMeaning (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 error.code).

422

The marketplace rejected the request; error.details carries its own message.

429

Back off and retry. error.code says whose limit was hit: rate_limited is ours (honour Retry-After), channel_rate_limited is the marketplace throttling us, channel_unavailable is the marketplace being unreachable.

500

A defect on our side (internal_error), and the only status left outside the 4xx range. The origin emits the envelope below, but the edge in front of api.doctorx.vn replaces the body of a 5xx with its own plain-text page, so do NOT require this body to parse: branch on the status.

Request sample

curl -X POST 'https://api.doctorx.vn/api/public/v1/ebay/policies/payment' \
  -H "Authorization: Bearer $DOCTORX_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "shopId": "string",
  "name": "string"
}'
POST/ebay/policies/return

eBay accepts a return window of 14, 30 or 60 days ONLY. A 10 or 15 day window is rejected by eBay with an error that does not explain why, so it is refused here.

Request body

shopIdstringrequired

DoctorX 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}$

marketplaceIdstring

eBay marketplace, e.g. EBAY_US. Policies are per-marketplace and cannot be used across marketplaces.

One of: "EBAY_US", "EBAY_GB", "EBAY_DE", "EBAY_AU", "EBAY_CA", "EBAY_FR", "EBAY_IT", "EBAY_ES", "EBAY_IE", "EBAY_AT", "EBAY_CH", "EBAY_NL", "EBAY_BE", "EBAY_PL", "EBAY_CA_FR"

namestringrequired

eBay caps policy names at 64 characters.

min length 1 · max length 64

returnsAcceptedbooleanrequired
returnDays14 | 30 | 60

Return window. eBay accepts 14, 30 or 60 ONLY: a 10 or 15 day window is rejected by eBay with an error that does not say why, so it is refused here. Ignored when returnsAccepted is false.

returnShippingPayerstring

One of: "BUYER", "SELLER"

refundMethodstring

One of: "MONEY_BACK", "MERCHANDISE_CREDIT"

restockingFeePercentinteger

min 0 · max 20

Responses

201EbayPolicyResponse
StatusMeaning (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 error.code).

422

The marketplace rejected the request; error.details carries its own message.

429

Back off and retry. error.code says whose limit was hit: rate_limited is ours (honour Retry-After), channel_rate_limited is the marketplace throttling us, channel_unavailable is the marketplace being unreachable.

500

A defect on our side (internal_error), and the only status left outside the 4xx range. The origin emits the envelope below, but the edge in front of api.doctorx.vn replaces the body of a 5xx with its own plain-text page, so do NOT require this body to parse: branch on the status.

Request sample

curl -X POST 'https://api.doctorx.vn/api/public/v1/ebay/policies/return' \
  -H "Authorization: Bearer $DOCTORX_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "shopId": "string",
  "name": "string",
  "returnsAccepted": false
}'
PUT/ebay/policies/fulfillment/{id}

Updated IN PLACE on eBay, so every offer already using it picks up the change. The eBay policy id does not change.

Parameters

NameInTypeDescription
idrequired
pathstring

Request body

shopIdstringrequired

DoctorX 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}$

marketplaceIdstring

eBay marketplace, e.g. EBAY_US. Policies are per-marketplace and cannot be used across marketplaces.

One of: "EBAY_US", "EBAY_GB", "EBAY_DE", "EBAY_AU", "EBAY_CA", "EBAY_FR", "EBAY_IT", "EBAY_ES", "EBAY_IE", "EBAY_AT", "EBAY_CH", "EBAY_NL", "EBAY_BE", "EBAY_PL", "EBAY_CA_FR"

namestringrequired

eBay caps policy names at 64 characters.

min length 1 · max length 64

handlingTimeDaysintegerrequired

Business days before dispatch (eBay handlingTime).

min 0 · max 30

shippingServiceCodestringrequired

eBay shipping service code, e.g. USPSGround. See GET /ebay/shipping-services.

min length 1 · max length 60

shippingCostTypestringrequired

One of: "FLAT_RATE", "CALCULATED", "FREE"

shippingCoststring

Required when shippingCostType is FLAT_RATE, ignored otherwise.

pattern ^\d+(\.\d{1,2})?$

shipToInternationalboolean
internationalShippingServiceCodestring

Required when shipToInternational is true.

max length 60

internationalShippingCoststring

Required when shipToInternational is true and shippingCostType is FLAT_RATE.

pattern ^\d+(\.\d{1,2})?$

Responses

200EbayPolicyResponse
StatusMeaning (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 error.code).

422

The marketplace rejected the request; error.details carries its own message.

429

Back off and retry. error.code says whose limit was hit: rate_limited is ours (honour Retry-After), channel_rate_limited is the marketplace throttling us, channel_unavailable is the marketplace being unreachable.

500

A defect on our side (internal_error), and the only status left outside the 4xx range. The origin emits the envelope below, but the edge in front of api.doctorx.vn replaces the body of a 5xx with its own plain-text page, so do NOT require this body to parse: branch on the status.

Request sample

curl -X PUT 'https://api.doctorx.vn/api/public/v1/ebay/policies/fulfillment/string' \
  -H "Authorization: Bearer $DOCTORX_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "shopId": "string",
  "name": "string",
  "handlingTimeDays": 0,
  "shippingServiceCode": "string",
  "shippingCostType": "FLAT_RATE"
}'
PUT/ebay/policies/payment/{id}

Parameters

NameInTypeDescription
idrequired
pathstring

Request body

shopIdstringrequired

DoctorX 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}$

marketplaceIdstring

eBay marketplace, e.g. EBAY_US. Policies are per-marketplace and cannot be used across marketplaces.

One of: "EBAY_US", "EBAY_GB", "EBAY_DE", "EBAY_AU", "EBAY_CA", "EBAY_FR", "EBAY_IT", "EBAY_ES", "EBAY_IE", "EBAY_AT", "EBAY_CH", "EBAY_NL", "EBAY_BE", "EBAY_PL", "EBAY_CA_FR"

namestringrequired

eBay caps policy names at 64 characters.

min length 1 · max length 64

immediatePayboolean

Require payment before the order is created.

Responses

200EbayPolicyResponse
StatusMeaning (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 error.code).

422

The marketplace rejected the request; error.details carries its own message.

429

Back off and retry. error.code says whose limit was hit: rate_limited is ours (honour Retry-After), channel_rate_limited is the marketplace throttling us, channel_unavailable is the marketplace being unreachable.

500

A defect on our side (internal_error), and the only status left outside the 4xx range. The origin emits the envelope below, but the edge in front of api.doctorx.vn replaces the body of a 5xx with its own plain-text page, so do NOT require this body to parse: branch on the status.

Request sample

curl -X PUT 'https://api.doctorx.vn/api/public/v1/ebay/policies/payment/string' \
  -H "Authorization: Bearer $DOCTORX_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "shopId": "string",
  "name": "string"
}'
PUT/ebay/policies/return/{id}

Parameters

NameInTypeDescription
idrequired
pathstring

Request body

shopIdstringrequired

DoctorX 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}$

marketplaceIdstring

eBay marketplace, e.g. EBAY_US. Policies are per-marketplace and cannot be used across marketplaces.

One of: "EBAY_US", "EBAY_GB", "EBAY_DE", "EBAY_AU", "EBAY_CA", "EBAY_FR", "EBAY_IT", "EBAY_ES", "EBAY_IE", "EBAY_AT", "EBAY_CH", "EBAY_NL", "EBAY_BE", "EBAY_PL", "EBAY_CA_FR"

namestringrequired

eBay caps policy names at 64 characters.

min length 1 · max length 64

returnsAcceptedbooleanrequired
returnDays14 | 30 | 60

Return window. eBay accepts 14, 30 or 60 ONLY: a 10 or 15 day window is rejected by eBay with an error that does not say why, so it is refused here. Ignored when returnsAccepted is false.

returnShippingPayerstring

One of: "BUYER", "SELLER"

refundMethodstring

One of: "MONEY_BACK", "MERCHANDISE_CREDIT"

restockingFeePercentinteger

min 0 · max 20

Responses

200EbayPolicyResponse
StatusMeaning (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 error.code).

422

The marketplace rejected the request; error.details carries its own message.

429

Back off and retry. error.code says whose limit was hit: rate_limited is ours (honour Retry-After), channel_rate_limited is the marketplace throttling us, channel_unavailable is the marketplace being unreachable.

500

A defect on our side (internal_error), and the only status left outside the 4xx range. The origin emits the envelope below, but the edge in front of api.doctorx.vn replaces the body of a 5xx with its own plain-text page, so do NOT require this body to parse: branch on the status.

Request sample

curl -X PUT 'https://api.doctorx.vn/api/public/v1/ebay/policies/return/string' \
  -H "Authorization: Bearer $DOCTORX_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "shopId": "string",
  "name": "string",
  "returnsAccepted": false
}'
PATCH/ebay/policies/{id}/default

Publish uses the default when a template names no policy. At most one default per shop, marketplace and type, so this clears the previous one.

Parameters

NameInTypeDescription
idrequired
pathstring

Responses

200EbayPolicyResponse
StatusMeaning (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 error.code).

422

The marketplace rejected the request; error.details carries its own message.

429

Back off and retry. error.code says whose limit was hit: rate_limited is ours (honour Retry-After), channel_rate_limited is the marketplace throttling us, channel_unavailable is the marketplace being unreachable.

500

A defect on our side (internal_error), and the only status left outside the 4xx range. The origin emits the envelope below, but the edge in front of api.doctorx.vn replaces the body of a 5xx with its own plain-text page, so do NOT require this body to parse: branch on the status.

Request sample

curl -X PATCH 'https://api.doctorx.vn/api/public/v1/ebay/policies/string/default' \
  -H "Authorization: Bearer $DOCTORX_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
DELETE/ebay/policies/{id}

Deleted on eBay as well. eBay refuses to delete a policy an active listing still uses, and that refusal is surfaced as channel_error with eBay's own reason.

Parameters

NameInTypeDescription
idrequired
pathstring

Responses

200DeleteResultResponse
StatusMeaning (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 error.code).

422

The marketplace rejected the request; error.details carries its own message.

429

Back off and retry. error.code says whose limit was hit: rate_limited is ours (honour Retry-After), channel_rate_limited is the marketplace throttling us, channel_unavailable is the marketplace being unreachable.

500

A defect on our side (internal_error), and the only status left outside the 4xx range. The origin emits the envelope below, but the edge in front of api.doctorx.vn replaces the body of a 5xx with its own plain-text page, so do NOT require this body to parse: branch on the status.

Request sample

curl -X DELETE 'https://api.doctorx.vn/api/public/v1/ebay/policies/string' \
  -H "Authorization: Bearer $DOCTORX_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
GET/ebay/locations

Locations are shop-scoped, not marketplace-scoped. An offer references one by merchantLocationKey, and publish refuses without one.

Parameters

NameInTypeDescription
shopIdrequired
querystring

DoctorX 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}$

Responses

200EbayLocationListResponse
StatusMeaning (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 error.code).

422

The marketplace rejected the request; error.details carries its own message.

429

Back off and retry. error.code says whose limit was hit: rate_limited is ours (honour Retry-After), channel_rate_limited is the marketplace throttling us, channel_unavailable is the marketplace being unreachable.

500

A defect on our side (internal_error), and the only status left outside the 4xx range. The origin emits the envelope below, but the edge in front of api.doctorx.vn replaces the body of a 5xx with its own plain-text page, so do NOT require this body to parse: branch on the status.

Request sample

curl -X GET 'https://api.doctorx.vn/api/public/v1/ebay/locations?shopId=string' \
  -H "Authorization: Bearer $DOCTORX_API_KEY"
POST/ebay/locations

Created on eBay and mirrored locally. merchantLocationKey is generated from the name when omitted and is immutable afterwards, because live offers reference it.

Request body

shopIdstringrequired

DoctorX 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}$

namestringrequired

min length 1 · max length 200

merchantLocationKeystring

Generated from the name when omitted. Immutable once created.

max length 36

addressLine1stringrequired

min length 1 · max length 300

addressLine2string

max length 300

citystringrequired

min length 1 · max length 150

stateOrProvincestringrequired

min length 1 · max length 150

postalCodestringrequired

min length 1 · max length 50

countrystringrequired

ISO 3166-1 alpha-2, e.g. US.

min length 2 · max length 10

Responses

201EbayLocationResponse
StatusMeaning (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 error.code).

422

The marketplace rejected the request; error.details carries its own message.

429

Back off and retry. error.code says whose limit was hit: rate_limited is ours (honour Retry-After), channel_rate_limited is the marketplace throttling us, channel_unavailable is the marketplace being unreachable.

500

A defect on our side (internal_error), and the only status left outside the 4xx range. The origin emits the envelope below, but the edge in front of api.doctorx.vn replaces the body of a 5xx with its own plain-text page, so do NOT require this body to parse: branch on the status.

Request sample

curl -X POST 'https://api.doctorx.vn/api/public/v1/ebay/locations' \
  -H "Authorization: Bearer $DOCTORX_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "shopId": "string",
  "name": "string",
  "addressLine1": "string",
  "city": "string",
  "stateOrProvince": "string",
  "postalCode": "string",
  "country": "string"
}'
PUT/ebay/locations/{id}

The address and name change; merchantLocationKey does not.

Parameters

NameInTypeDescription
idrequired
pathstring

Request body

shopIdstringrequired

DoctorX 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}$

namestringrequired

min length 1 · max length 200

merchantLocationKeystring

Generated from the name when omitted. Immutable once created.

max length 36

addressLine1stringrequired

min length 1 · max length 300

addressLine2string

max length 300

citystringrequired

min length 1 · max length 150

stateOrProvincestringrequired

min length 1 · max length 150

postalCodestringrequired

min length 1 · max length 50

countrystringrequired

ISO 3166-1 alpha-2, e.g. US.

min length 2 · max length 10

Responses

200EbayLocationResponse
StatusMeaning (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 error.code).

422

The marketplace rejected the request; error.details carries its own message.

429

Back off and retry. error.code says whose limit was hit: rate_limited is ours (honour Retry-After), channel_rate_limited is the marketplace throttling us, channel_unavailable is the marketplace being unreachable.

500

A defect on our side (internal_error), and the only status left outside the 4xx range. The origin emits the envelope below, but the edge in front of api.doctorx.vn replaces the body of a 5xx with its own plain-text page, so do NOT require this body to parse: branch on the status.

Request sample

curl -X PUT 'https://api.doctorx.vn/api/public/v1/ebay/locations/string' \
  -H "Authorization: Bearer $DOCTORX_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "shopId": "string",
  "name": "string",
  "addressLine1": "string",
  "city": "string",
  "stateOrProvince": "string",
  "postalCode": "string",
  "country": "string"
}'
DELETE/ebay/locations/{id}

Deleted on eBay as well. Deleting the location a live offer references breaks that offer, so eBay may refuse.

Parameters

NameInTypeDescription
idrequired
pathstring

Responses

200DeleteResultResponse
StatusMeaning (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 error.code).

422

The marketplace rejected the request; error.details carries its own message.

429

Back off and retry. error.code says whose limit was hit: rate_limited is ours (honour Retry-After), channel_rate_limited is the marketplace throttling us, channel_unavailable is the marketplace being unreachable.

500

A defect on our side (internal_error), and the only status left outside the 4xx range. The origin emits the envelope below, but the edge in front of api.doctorx.vn replaces the body of a 5xx with its own plain-text page, so do NOT require this body to parse: branch on the status.

Request sample

curl -X DELETE 'https://api.doctorx.vn/api/public/v1/ebay/locations/string' \
  -H "Authorization: Bearer $DOCTORX_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
PATCH/ebay/locations/{id}/default

Publish uses the default when a template names no location.

Parameters

NameInTypeDescription
idrequired
pathstring

Responses

200EbayLocationResponse
StatusMeaning (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 error.code).

422

The marketplace rejected the request; error.details carries its own message.

429

Back off and retry. error.code says whose limit was hit: rate_limited is ours (honour Retry-After), channel_rate_limited is the marketplace throttling us, channel_unavailable is the marketplace being unreachable.

500

A defect on our side (internal_error), and the only status left outside the 4xx range. The origin emits the envelope below, but the edge in front of api.doctorx.vn replaces the body of a 5xx with its own plain-text page, so do NOT require this body to parse: branch on the status.

Request sample

curl -X PATCH 'https://api.doctorx.vn/api/public/v1/ebay/locations/string/default' \
  -H "Authorization: Bearer $DOCTORX_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"