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

# Get Filter API

> Retrieve available filters for the airmiles catalog. Pass empty values to get all filters. `includeFilters` and `excludeFilters` only take effect when `filterGroupCode` is also provided.

**Note:** `variables` fields are passed flat — no `data` wrapper.

**Real URL:** `POST https://stagingstores.xoxoday.com/chef/v1/oauth/api`


1. In the getFilter API Request, "includeFilters" & " excludeFilters " will only work by passing value in " filterGroupCode "
2. You can pass empty values in the getFilters API request for all the parameters to get a list of all the available filters

## Request Schema

| \*\*Property \*\* | \*\* Type \*\* | \*\* Description\*\*                                              |
| :---------------- | :------------- | :---------------------------------------------------------------- |
| `filterGroupCode` | `string`       | filter category name representing a specific filter group applied |
| `includeFilters`  | `string`       | Filters that should be explicitly included                        |
| `excludeFilters`  | `string`       | Filters that should be explicitly excluded                        |

## Response Schema

| \*\*Path \*\*                                          | \*\* Type \*\* | \*\* Description\*\*                                                |
| ------------------------------------------------------ | -------------- | ------------------------------------------------------------------- |
| **data**                                               | object         | Root object containing the `getFilters` payload.                    |
| **data.getFilters**                                    | object         | Main container for filter metadata.                                 |
| **data.getFilters.status**                             | number         | API execution status. `1` indicates success.                        |
| **data.getFilters.data**                               | array          | List of filter groups supported by the catalog.                     |
| **data.getFilters.data\[].filterGroupName**            | string         | Display name of the filter group (e.g., Country).                   |
| **data.getFilters.data\[].filterGroupDescription**     | string         | Description of the filter group.                                    |
| **data.getFilters.data\[].filterGroupCode**            | string         | Internal code for the filter group (e.g., `country`).               |
| **data.getFilters.data\[].filters**                    | array          | List of filter values inside the group.                             |
| **data.getFilters.data\[].filters\[].filterValue**     | string         | Display name of the filter value (e.g., Afghanistan).               |
| **data.getFilters.data\[].filters\[].isoCode**         | string         | Short ISO code for the filter (e.g., AF).                           |
| **data.getFilters.data\[].filters\[].filterValueCode** | string         | Internal system code used in downstream APIs (e.g., `afghanistan`). |

## List of available filterGroupCode

| \*\*Filter name \*\* | \*\* Functionality\*\*                                                                     |
| :------------------- | :----------------------------------------------------------------------------------------- |
| country              | Users can filter products based on the country                                             |
| price                | Users can filter products based on price range (0 – 1,000, 10,000 – above, etc.)           |
| voucher\_category    | Users can filter products based on categories like Electronics, Food & Restaurant          |
| product\_category    | Users can filter products based on types like e-gift voucher, Experience, Physical voucher |
| currency             | Users can filter products based on the product currency (INR, USD, AUD, etc.)              |
| lounge               | Users can filter products based on available lounge locations (e.g., airport lounges)      |


## OpenAPI

````yaml specs/rewards-airmiles.yaml POST /getFilters
openapi: 3.0.3
info:
  title: Xoxoday Rewards API – Airmiles
  version: '1.2'
  description: >
    Airmiles API endpoints for browsing the miles catalog, placing orders, and
    reporting.


    All operations dispatch to `POST /v1/oauth/api`. Virtual path suffixes are
    used

    for playground differentiation since OpenAPI does not allow multiple POST
    operations

    on the same path.


    **Host split:**

    - `getFilters`, `getBalance`, `paymentHistory` → `stagingstores.xoxoday.com`

    - `getAirmilesCatalog`, `placeOrder`, `getOrderDetails`, `getOrderHistory` →
    `accounts.xoxoday.com`


    **Get Balance** sends parameters as URL query string (not request body).
servers:
  - url: https://stagingstores.xoxoday.com/chef/v1/oauth/api
    description: Sandbox
  - url: https://accounts.xoxoday.com/chef/v1/oauth/api
    description: Production
  - url: https://canvas.xoxoday.com/chef/v1/oauth/api
    description: Testing
security:
  - BearerAuth: []
tags:
  - name: Catalog
  - name: Orders
  - name: Reporting
paths:
  /getFilters:
    post:
      tags:
        - Catalog
      summary: Get Filter API
      description: >
        Retrieve available filters for the airmiles catalog. Pass empty values
        to get all filters. `includeFilters` and `excludeFilters` only take
        effect when `filterGroupCode` is also provided.


        **Note:** `variables` fields are passed flat — no `data` wrapper.


        **Real URL:** `POST https://stagingstores.xoxoday.com/chef/v1/oauth/api`
      operationId: airmilesGetFilters
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - query
                - tag
                - variables
              properties:
                query:
                  type: string
                  enum:
                    - plumProAPI.mutation.getFilters
                  default: plumProAPI.mutation.getFilters
                tag:
                  type: string
                  enum:
                    - plumProAPI
                  default: plumProAPI
                variables:
                  type: object
                  properties:
                    filterGroupCode:
                      type: string
                      description: Filter category (e.g. `Country`, `price`, `currency`).
                      example: Country
                    includeFilters:
                      type: string
                      description: Filters to explicitly include.
                      example: usa
                    excludeFilters:
                      type: string
                      description: Filters to explicitly exclude.
                      example: uae
            example:
              query: plumProAPI.mutation.getFilters
              tag: plumProAPI
              variables:
                filterGroupCode: Country
                includeFilters: usa
                excludeFilters: uae
      responses:
        '200':
          description: Filter list returned successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      getFilters:
                        type: object
                        properties:
                          status:
                            type: number
                          data:
                            type: array
                            items:
                              type: object
                              properties:
                                filterGroupName:
                                  type: string
                                filterGroupDescription:
                                  type: string
                                filterGroupCode:
                                  type: string
                                filters:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      filterValue:
                                        type: string
                                      isoCode:
                                        type: string
                                      filterValueCode:
                                        type: string
              example:
                data:
                  getFilters:
                    status: 1
                    data:
                      - filterGroupName: Country
                        filterGroupDescription: Filter by country
                        filterGroupCode: country
                        filters:
                          - filterValue: United States
                            isoCode: US
                            filterValueCode: usa
        '401':
          $ref: '#/components/responses/Unauthorized'
        '502':
          $ref: '#/components/responses/BadGateway'
components:
  responses:
    Unauthorized:
      description: Missing or invalid access token.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Unauthorized
    BadGateway:
      description: Upstream service error.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: '`Authorization: Bearer <access_token>`'

````