> ## 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 Campaign Details API

> Fetch the products/vouchers included in a specific campaign by campaign ID.

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


| \*\*Property \*\* | \*\* Type \*\* | \*\* Description\*\*                        |
| :---------------- | :------------- | :------------------------------------------ |
| `campaignId`      | `Int`          | Unique identifier of the campaign to fetch. |

## Response Schema

| \*\*Property \*\*                                | \*\* Type \*\* | \*\* Description\*\*                                     |
| ------------------------------------------------ | -------------- | -------------------------------------------------------- |
| data                                             | object         | Root response object.                                    |
| data.campaignDetails                             | object         | Container for campaign details.                          |
| data.campaignDetails.success                     | number         | API execution status (`1` = success).                    |
| data.campaignDetails.data                        | array          | List containing campaign detail entries.                 |
| data.campaignDetails.data\[].campaignId          | number         | Unique campaign ID.                                      |
| data.campaignDetails.data\[].campaignName        | string         | Name of the campaign.                                    |
| data.campaignDetails.data\[].denomination\_value | number         | Denomination/value associated with the campaign.         |
| data.campaignDetails.data\[].currency\_code      | string         | Currency code for denomination.                          |
| data.campaignDetails.data\[].countryName         | string         | Applicable country for the campaign.                     |
| data.campaignDetails.data\[].vouchers            | array          | List of vouchers/products associated with this campaign. |
| data.campaignDetails.data\[].vouchers\[].name    | string         | Voucher/product name.                                    |
| data.campaignDetails.data\[].vouchers\[].image   | string         | Image URL for the voucher/product.                       |


## OpenAPI

````yaml specs/reward-link-api.yaml POST /campaignDetails
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:
  /campaignDetails:
    post:
      tags:
        - Campaigns
      summary: Get Campaign Details API
      description: >
        Fetch the products/vouchers included in a specific campaign by campaign
        ID.


        **Real URL:** `POST https://stagingstores.xoxoday.com/chef/v1/oauth/api`
      operationId: getCampaignDetails
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - query
                - tag
                - variables
              properties:
                query:
                  type: string
                  enum:
                    - xoxo_link.mutation.campaignDetails
                  default: xoxo_link.mutation.campaignDetails
                  description: Always use `xoxo_link.mutation.campaignDetails`.
                tag:
                  type: string
                  enum:
                    - xoxo_link
                  default: xoxo_link
                  description: Always use `xoxo_link`.
                variables:
                  type: object
                  required:
                    - data
                  properties:
                    data:
                      type: object
                      required:
                        - campaignId
                      properties:
                        campaignId:
                          type: integer
                          description: Unique identifier of the campaign to fetch.
                          example: 123
            example:
              query: xoxo_link.mutation.campaignDetails
              tag: xoxo_link
              variables:
                data:
                  campaignId: 123
      responses:
        '200':
          description: Campaign details returned successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      campaignDetails:
                        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
                                currency_code:
                                  type: string
                                countryName:
                                  type: string
                                vouchers:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      name:
                                        type: string
                                      image:
                                        type: string
                                        description: Image URL for the voucher.
              example:
                data:
                  campaignDetails:
                    success: 1
                    data:
                      - campaignId: 123
                        campaignName: Summer Rewards
                        denomination_value: 10
                        currency_code: USD
                        countryName: USA
                        vouchers:
                          - name: Amazon Gift Card
                            image: https://cdn.xoxoday.com/amazon.png
                          - name: Starbucks Gift Card
                            image: https://cdn.xoxoday.com/starbucks.png
        '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.mutation.campaignDetails",
                "tag": "xoxo_link",
                "variables": {
                  "data": {
                    "campaignId": 123
                  }
                }
              }'
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>`'

````