Base URLs
Every marketplace serves its APIs from its own address. There is no global API host.
| API | Path |
|---|---|
| Admin API | https://<primary address>/api/v1 |
| Partners API | https://<primary address>/api/partners/v1 |
| Front API | https://<primary address>/front_api/v1 |
The primary address
Section titled “The primary address”A marketplace’s primary address is:
- its custom domain, when one is connected and enabled in Settings → Domains
(
/admin/settings/domains), for instancewww.acme-bikes.com. When several domains are connected, the one marked as primary wins; - otherwise its subdomain,
<subdomain>.mykreezalid.com, for instanceacme.mykreezalid.com.
The simplest way to find it: open the marketplace’s home page in a browser and copy the address it lands on.
https://acme.mykreezalid.com/api/v1/listings ← no custom domainhttps://www.acme-bikes.com/api/v1/listings ← custom domain connectedRequests to another address are redirected
Section titled “Requests to another address are redirected”A request sent to any other address of the marketplace, for example the mykreezalid.com
subdomain once a custom domain is connected, or acme-bikes.com without www, is answered
with a 301 Moved Permanently to the same path on the primary address.
That is harmless for a browser, but not for an API client:
- many HTTP clients do not follow redirects by default, so you receive an empty
301; - clients that do follow it usually replay a
POST,PATCHorDELETEas aGETwithout its body, and some drop theAuthorizationheader when the host changes.
Call the APIs over HTTPS only. Redirects always point to an https:// address.
Unknown and suspended marketplaces
Section titled “Unknown and suspended marketplaces”A subdomain that matches no marketplace does not answer with an API error: the request is
redirected to www.kreezalid.com. A marketplace in maintenance answers 503 Service Unavailable with a Retry-After header and an HTML page. Treat any response that is not
JSON as a configuration problem or a temporary outage, not as data.