Skip to main content
Version: 3.x

Add headers in Magento API calls

Front-Commerce allows you to send additional headers in all API calls. To do so, you must define the magento.api.extraHeaders (for storefront API) and/or magento.api.extraAdminHeaders (for admin API) configuration values from a configuration provider.

These additional headers could be useful if you want to add additional context to your queries, depending on the request or to detect Front-Commerce requests from your Magento server.

tip

You can refer to our Quanta module example for a working example using this feature.