> ## 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 Campaigns API

> Get the list of all reward link campaigns created from the dashboard. Supports pagination and filtering by name or enabled status.

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


| \*\*Property \*\* | \*\* Type \*\* | \*\* Description\*\*                                               |
| :---------------- | :------------- | :----------------------------------------------------------------- |
| `limit`           | `Int`          | Number of campaigns to fetch (pagination limit).                   |
| `offset`          | `Int`          | Starting index for fetching campaigns (pagination offset).         |
| `name`            | `String`       | Filter campaigns by name (optional, empty string means no filter). |
| `enabled`         | `Int`          | Filter by campaign status (1 = enabled, 0 = disabled).             |

## Response Schema

| \*\*Path \*\*                                 | \*\* Type \*\* | \*\* Description\*\*                                         |
| --------------------------------------------- | -------------- | ------------------------------------------------------------ |
| data                                          | object         | Root response object.                                        |
| data.campaignList                             | object         | Container for campaign list.                                 |
| data.campaignList.success                     | number         | API execution status (`1` = success).                        |
| data.campaignList.data                        | array          | List of campaigns.                                           |
| data.campaignList.data\[].campaignId          | number         | Unique campaign identifier.                                  |
| data.campaignList.data\[].campaignName        | string         | Name of the campaign.                                        |
| data.campaignList.data\[].denomination\_value | number         | Campaign denomination or value associated with the campaign. |
| data.campaignList.data\[].countryName         | string         | Country where campaign is applicable.                        |
| data.campaignList.data\[].currencyCode        | string         | Currency code for denomination.                              |
| data.campaignList.data\[].created\_date       | string         | Creation timestamp of the campaign.                          |
| data.campaignList.data\[].product\_count      | number         | Number of products linked to this campaign.                  |
| data.campaignList.data\[].status              | number         | Status (`1` = active, `0` = inactive).                       |


## OpenAPI

````yaml specs/reward-link-api.yaml POST /campaignList
openapi: 3.0.3
info:
  title: Xoxoday Reward Link API
  version: '1.2'
  description: >
    APIs for automating reward distribution via personalized reward links and
    campaigns.


    **Auth endpoints** resolve against
    `https://stagingstores.xoxoday.com/chef/v1/oauth`

    using a per-operation server override.


    **Campaign + Link operations** use
    `https://stagingstores.xoxoday.com/chef/v1/oauth/api`

    as the base. `/generateLink` and `/sendLinks` have dedicated real paths.

    Campaign operations (`/campaignList`, `/campaignDetails`) use short virtual
    path

    suffixes because both operations share the same real URL (`/v1/oauth/api`)
    and

    OpenAPI does not allow two POST operations on the same path.
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: Authentication
    description: Token management — validate and refresh access tokens.
  - name: Campaigns
    description: Fetch reward link campaigns and their details.
  - name: Links
    description: Generate and send reward links to recipients.
paths:
  /campaignList:
    post:
      tags:
        - Campaigns
      summary: Get Campaigns API
      description: >
        Get the list of all reward link campaigns created from the dashboard.
        Supports pagination and filtering by name or enabled status.


        **Real URL:** `POST https://stagingstores.xoxoday.com/chef/v1/oauth/api`
      operationId: getCampaigns
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - query
                - tag
                - variables
              properties:
                query:
                  type: string
                  enum:
                    - xoxo_link.query.campaignList
                  default: xoxo_link.query.campaignList
                  description: Always use `xoxo_link.query.campaignList`.
                tag:
                  type: string
                  enum:
                    - xoxo_link
                  default: xoxo_link
                  description: Always use `xoxo_link`.
                variables:
                  type: object
                  required:
                    - add_data
                  properties:
                    add_data:
                      type: object
                      properties:
                        limit:
                          type: integer
                          description: Number of campaigns to fetch (pagination limit).
                          example: 10
                        offset:
                          type: integer
                          description: Starting index for pagination.
                          example: 0
                        name:
                          type: string
                          description: >-
                            Filter by campaign name. Omit or pass empty string
                            for no filter.
                        enabled:
                          type: integer
                          enum:
                            - 0
                            - 1
                          description: 'Filter by status: `1` = enabled, `0` = disabled.'
                          example: 1
            example:
              query: xoxo_link.query.campaignList
              tag: xoxo_link
              variables:
                add_data:
                  limit: 10
                  offset: 0
                  enabled: 1
      responses:
        '200':
          description: Campaign list returned successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      campaignList:
                        type: object
                        properties:
                          success:
                            type: integer
                            description: '`1` = success.'
                          data:
                            type: array
                            items:
                              type: object
                              properties:
                                campaignId:
                                  type: integer
                                campaignName:
                                  type: string
                                denomination_value:
                                  type: number
                                countryName:
                                  type: string
                                currencyCode:
                                  type: string
                                created_date:
                                  type: string
                                product_count:
                                  type: number
                                status:
                                  type: integer
                                  description: 1 = active, 0 = inactive.
              example:
                data:
                  campaignList:
                    success: 1
                    data:
                      - campaignId: 2461
                        campaignName: Summer Rewards
                        denomination_value: 10
                        countryName: USA
                        currencyCode: USD
                        created_date: '2025-06-01 10:00:00'
                        product_count: 5
                        status: 1
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '502':
          $ref: '#/components/responses/BadGateway'
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |
            curl --request POST \
              --url https://stagingstores.xoxoday.com/chef/v1/oauth/api \
              --header 'accept: application/json' \
              --header 'authorization: Bearer YOUR_ACCESS_TOKEN' \
              --header 'content-type: application/json' \
              --data '{
                "query": "xoxo_link.query.campaignList",
                "tag": "xoxo_link",
                "variables": {
                  "add_data": {
                    "limit": 10,
                    "offset": 0,
                    "enabled": 1
                  }
                }
              }'
components:
  responses:
    BadRequest:
      description: Invalid request body or parameters.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              message:
                type: string
    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>`'

````