Accepted headers

Each request to the API resources can send a set of headers. Some of these headers are required, some are required depending on the resource (the documentation indicates if there are any required header), and some are recommended.

Header

Supported value

Description

Required

X-App-id

String with the API identifier.

Required in resource GET - /auth

X-App-key

String with the API key.

Required in resource GET - /auth

Authorization

String with auth token

Required for all resources except GET - /auth

Cookie

Cookies HTTP.

Contains HTTP cookies previously stored and sent by the API with the Set-Cookie header. It is allowed that, in addition to forwarding the collection generated by the API, other additional cookies are added. The API ignores them, but returns them in the response.

basketToken

String with the basket token.

Required in most Cart and OMS resources. The basket token is returned by the API as a cookie. If it is forwarded within Cookie together with the other cookies, this header is not necessary, otherwise it must be sent.

cache-hash

String with hash identifier.

This identifier speeds up the handling of the request, reducing the response time. If it is forwarded within Cookie together with the other cookies, this header is not necessary, otherwise it must be sent.

ip

String that indicates the ipv4.

It is used to forwarding the ipv4 of the user who is interacting in the Commerce presentation layer. With this header his country of origin is calculated.

Content-Type

application/json

Indicates that the content type is in JSON format.

Recommended

userAgent

Representative text string of the user-agent.

It is used to forwarding the User-Agent header of the user who is interacting in the Commerce presentation layer, which is generally different from the user-agent of the HTTP client executing the request to the API. This information can be used to determine the sales channel.

referer

String indicating the address of the web page that created the link to the resource that is being visited.

It is used to forwarding the Referer header of the user who is interacting in the Commerce presentation layer. If necessary, the header of the HTTP client executing the request to the API must be overwritten. This information can be used to determine the sales channel.

Accept

application/json

Indicates that the HTTP client can accept responses in JSON format.


Some resources may need some additional header, in which case the resource documentation will specify it.