> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thanx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Features

> This endpoint returns the configuration for a merchant's features. If a merchant does not have a particular feature defined or enabled, the value for the associated feature key will be empty.

<Note>
  Please review proper request headers [here](/consumer/usage/headers).
</Note>

### Parameters

<ParamField query="merchant_id" type="string">
  Only return features for this merchant if you have access to multiple
  merchants
</ParamField>

### Response

<ResponseField name="merchant_id" type="string">
  The merchant ID
</ResponseField>

<ResponseField name="loyalty" type="hash">
  **This attribute is deprecated and will be removed at the end of Q3 2023.
  Instead, use the [points experiences](/consumer/points/get-experiences)
  endpoints.**

  Describes the configuration for the loyalty campaign

  <Expandable title="loyalty">
    <ResponseField name="earn" type="hash">
      Describes how the loyalty reward is earned

      <Expandable title="earn">
        <ResponseField name="description" type="string">
          What the user should do to earn the reward
        </ResponseField>

        <ResponseField name="type" type="enum">
          Whether the user earns progress via how much they spend or how many
          times they visit. Returns 'spend' or 'visit'.
        </ResponseField>

        <ResponseField name="threshold" type="integer">
          How much the user needs to spend or how many visits the user needs to
          make to earn the reward.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="redeem" type="hash">
      Describes what the reward is

      <Expandable title="redeem">
        <ResponseField name="type" type="enum">
          How the reward can be redeemed (`manual`, `automatic`)
        </ResponseField>

        <ResponseField name="text" type="string">
          Description of what the loyalty reward is
        </ResponseField>

        <ResponseField name="venue" type="enum">
          Where the reward can be used: (`instore`, `online`, `all`)
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="intro" type="hash">
  Describes the configuration for the introductory campaign

  <Expandable title="intro">
    <ResponseField name="earn" type="hash">
      Describes how the introductory reward is earned

      <Expandable title="earn">
        <ResponseField name="earn.description" type="string">
          What the user should do to earn the reward
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="redeem" type="hash">
      Describes what the reward is

      <Expandable title="redeem">
        <ResponseField name="type" type="enum">
          How the reward can be redeemed (`manual`, `automatic`)
        </ResponseField>

        <ResponseField name="text" type="string">
          Description of what the introductory reward is
        </ResponseField>

        <ResponseField name="venue" type="enum">
          Where the reward can be used: (`instore`, `online`, `all`)
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="birthday" type="hash">
  Describes the configuration for the birthday campaign

  <Expandable title="birthday">
    <ResponseField name="earn" type="hash">
      Describes how the birthday reward is earned

      <Expandable title="birthday">
        <ResponseField name="earn.description" type="string">
          What the user should do to earn the reward
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="redeem" type="hash">
      Describes what the reward is

      <Expandable title="redeem">
        <ResponseField name="type" type="enum">
          How the reward can be redeemed (`manual`, `automatic`)
        </ResponseField>

        <ResponseField name="text" type="string">
          Description of what the birthday reward is
        </ResponseField>

        <ResponseField name="venue" type="enum">
          Where the reward can be used: (`instore`, `online`, `all`)
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash Get Features theme={null}
  curl https://api.thanxsandbox.com/features \
    -X GET \
    -H "Content-Type: application/json"  \
    -H "Accept-Version: v4.0" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer ${token}" \
    -H "X-ClientId: ${client_id}" 
  ```
</RequestExample>

<ResponseExample>
  ```json Response Example theme={null}
  {
    "features": [
      {
        "merchant_id": "wourhfslur",
        "loyalty": { // deprecated
          "earn": {
            "description": "spend $150",
            "threshold": 150,
            "type": "spend"
          },
          "redeem": {
            "type": "manual",
            "text": "$10 off",
            "venue": "all"
          }
        },
        "intro": {
          "earn": {
            "description": "sign up"
          },
          "redeem": {
            "type": "manual",
            "text": "free sandwich",
            "venue": "online"
          }
        },
        "birthday": {
          "earn": {
            "description": "provide your birthday"
          },
          "redeem": {
            "type": "automatic",
            "text": "10% off",
            "venue": "instore"
          }
        }
      }
    ]
  }
  ```
</ResponseExample>
