BETA

Proxy Endpoints

The Merchant Center API Gateway exposes different proxy endpoints.

A proxy endpoint is meant to forward the request to the underlying configured service, while validating the authentication and authorization of the user.

Available endpoints

The following proxy endpoints are available:

  • /proxy/ctp: proxies requests to the commercetools platform HTTP API
  • /proxy/ml: proxies requests to the machine learning API
  • other endpoints that are only used for internal services

In addition to those endpoints, there is a /graphql endpoint that also works as a proxy.

Request format

Each proxy endpoint works with the same format. To send a request through the proxy, you append the real URL (according to the targeted API) after the proxy endpoint prefix.

For example, to make requests to the commercetools platform HTTP API, you would prefix the request with /proxy/ctp

// Proxied request to the commercetools platform HTTP API
fetch(`https://mc-api.europe-west1.gcp.commercetools.com/proxy/ctp/${projectKey}/orders`);
// Underlying request to the commercetools platform HTTP API
fetch(`https://api.europe-west1.gcp.commercetools.com/${projectKey}/orders`);
Sign upLog inTech BlogIntegrationsStatusSupportUser Research Program
Copyright © 2021 commercetools
Privacy PolicyImprint