Service API headers

Current version: 10.2

Sitecore XC uses HTTP request headers and header properties or fields passed in through the service APIs to establish context for calls. These headers and properties are available as methods and properties of the CommerceContext class, which must be included in all calls.

Sitecore XC supports standard known headers out-of-box, representing an extensibility point where additional headers can be established for specific plugins. Plugins can reference these headers when taking actions.

Some headers are only relevant in certain actions; however, you can include a header even if it is not used or needed for the particular call.

The following table lists headers and header properties or attributes that are supported out-of-the-box:

Header/Header property name



A standard entity-header field that indicates the media type of the entity-body sent to the recipient.


The environment targeted by the request.


The name of the current shop being accessed (string).


A unique identifier for a shopper (normally a GUID represented as a string).


If the shopper is registered, then an additional identifier is passed in, representing the unique identifier of a registered customer (normally a GUID represented as a string).


The currency to return in the response (string).


The language desired in the response (string).


The effective date to use during any date-based calculations. This supports hypothetical scenarios where you want to see results as if the interactions occurred at dates and times not in the present.

If an EffectivateDate is not passed in, then DateTime.UtcNow is used by default.


Properties to identify shopper location (for location-based personalization or marketing campaigns, for example

  • AreaCode

  • BusinessName

  • City

  • DnsAddress

  • IpAddress

  • IspName

  • Latitude

  • Longitude

  • MetroCode

  • Policies

  • PostalCode

  • Region

  • TimeZone


A list of roles for the caller, delimited by a pipe symbol ("|" ). This can determine what actions are allowed and what information is returned in queries, or whether the query can be performed at all (string).


A flag that indicates whether the customer is logged into their account (boolean represented as a string).


A list of flags delimited by a pipe symbol ("|" ) that alter the behavior of a command to obtain a required outcome.

Do you have some feedback for us?

If you have suggestions for improving this article,