Request headers
HTTP request headers provide contextual information about your API request. Some headers and values are required, while others are optional or required only under certain conditions.
The following table describes the headers that you can use:
Header | Required | Description |
---|---|---|
Accept | The valid content types for the API response payload. Value must be application/json . | |
Accept-Language | The preferred natural language for the response payload. Values are en-US , en-CA , and fr-CA . If you don’t provide this header, the system uses the default value for your location: en-US for the United States or en-CA for Canada. You can override this header value by providing the locale parameter in the request body. For more information, see Localization. | |
Authorization | ✅ | The HTTP Bearer token authorizing the API request. For more information, see Generate an access token. |
Content-Type | ✅ | The content type used in the body of the request. Value must be application/json . |
X-Retailer-Id | ✅* | *Required for multi-banner retailers. A string that identifies a specific retailer banner. |
The following example shows the HTTP request headers:
curl --request POST \
--url 'https://<instacart_domain>/v2/<endpoint>' \
--header 'Accept: application/json' \
--header 'Accept-Language: en-CA' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Retailer-Id: <retailer_id>' \
--data '{
<parameters>
}'