Skip to content

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

A marketplace’s primary address is:

  • its custom domain, when one is connected and enabled in Settings → Domains (/admin/settings/domains), for instance www.acme-bikes.com. When several domains are connected, the one marked as primary wins;
  • otherwise its subdomain, <subdomain>.mykreezalid.com, for instance acme.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 domain
https://www.acme-bikes.com/api/v1/listings ← custom domain connected

Requests 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, PATCH or DELETE as a GET without its body, and some drop the Authorization header when the host changes.

Call the APIs over HTTPS only. Redirects always point to an https:// address.

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.