HTTP Headers

It is important to have certain HTTP headers as part of your Rye API requests.

Authorization

The authorization header is required for developers to be able to access all queries/mutations of Product API and Cart API. Currently, the Search and Recommendations API does not require it but in the near future, they will require this header as well.

The header is of the following format:

{
  "Authorization": "<<encoded-API-key>>",
}

Where <<encoded-API-key>> is the Base-64 encoded string of your Rye API key suffixed with a ":" (colon).


x-rye-shopper-ip (optional)

This header is required for making requests on behalf of the end user because some systems such as Shopify have fraud risk calculations based on the end user IP (ex: if the IP matches the billing address IP).

{
    "x-rye-shopper-ip": "xx.xxx.xx.xx"
}

🚧

x-rye-shopper-ip header is required to use the submitCart mutation from the Cart API.


Where to find these headers

These headers can be found if you head to https://console.rye.com/graphql and click on the HTTP Headers tab at the bottom of the screen.