# Customer Context

Customer is the most basic entity representing a party that uses our system.

When endpoint is in `Customer` context there are two ways to indicate which customer(s) you want to use:
* [`X-Loyalty-Club-Slug` header](https://docs.mpc.placewise.com/doc-342138) which internally translates to correct customer
* use `X-Customer` header

The `X-Customer` header is the only way to make cross-customer requests (for endpoints which supports cross-customer contexts).

<TipGood>Prefer using `X-Loyalty-Club-Slug` over `X-Customer`</TipGood>

## `X-Customer` header specification

### Make request in context of customer with id

`id=<id_of_customer>`

Example
:::highlight blue
 `X-Customer: id=1000941`
:::

### Make request in context of multiple customers via ids

Join ids of customers with `_` and set them after `id=` prefix. 

`id=<id_of_customer1>_<id_of_customer2>`


Example
:::highlight blue
 `X-Customer: id=1000941_1000942`
 `X-Customer: id=1000941_1000942_1000943`
:::

:::note
Too long list of customer ids isn't allowed as headers have finite buffer limit. We recommend to use always less than 40.
:::

### Make requests in context of all customers available

`all=all`

Example
:::highlight blue
 `X-Customer: all=all`
:::

### Make requests in context of customers filtered by provided filters

`<filter>=<filter_value>`

You can join filters with `AND` logical condition by joining them with `;`: `<filter>=<filter_value>;<filter2>=<filter2_value>`

Example
:::highlight blue
 `X-Customer: chain=Cats`
 `X-Customer: chain=Cats;country=PL`
:::

:::note
In order to receive list of available filters, contact our support.
:::