Concepts
Requests and responses
- Unknown query parameters fail with
400 unknown_parameter. A typo such asskus=never silently returns everything. - Repeat a parameter to send several values:
?sku=A&sku=B. Commas are part of a SKU, not separators. - Every documented field is always present.
nullmeans "no value", and lists are[], nevernull. - Ignore fields you don't recognise. We add fields within v1.
- Expect new enum values in
review,reviewed_by,status,availabilityand error codes. Treat an unknown value like the most cautious one you know. - Every
GETendpoint also answersHEAD, with the same status and headers and no body. GETresponses carry a weakETagandCache-Control: private, max-age=60. Send theETagback asIf-None-Matchto get304 Not Modified, with no body, when nothing changed.- A single SKU link is the exception.
GETandPUT /v1/sku-mappings/{sku}return a strongETag, the link's version (such as"v42"), withCache-Control: private, no-cache. Send it asIf-Matchto change the link only if nobody else has. - Every response has an
X-Request-Idheader, and every error body has the same value asrequest_id. Log it: it's the fastest way for support to find your request. - Percent-encode a SKU in a URL path:
AB/12 Xbecomes/v1/sku-mappings/AB%2F12%20X. Python'surllib.parse.quote(sku, safe="")and JavaScript'sencodeURIComponent(sku)both do this.