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

> Fetch the available balance in your Admin wallet. Parameters are passed as **URL query string** for this endpoint, not as a JSON body.

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


## Response Schema

| **Path**                      | **Type** | **Description**                             |
| ----------------------------- | -------- | ------------------------------------------- |
| data                          | object   | Root response object.                       |
| data.getBalance               | object   | Container for balance details.              |
| data.getBalance.status        | number   | API execution status (`1` = success).       |
| data.getBalance.data          | object   | Balance information object.                 |
| data.getBalance.data.value    | number   | Available balance value.                    |
| data.getBalance.data.currency | string   | Currency code of the balance (e.g., `USD`). |

> Note\
> Rather than fetching the balance before every order, you can use the Low Balance Notification option in the Admin Dashboard to receive alerts when the balance reaches the set threshold. [Click here to know more.](https://app.supademo.com/demo/cm9i4wxn923rmljv5hap9e5ic)


## OpenAPI

````yaml specs/rewards-airmiles.yaml POST /getBalance
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:
  /getBalance:
    post:
      tags:
        - Catalog
      summary: Get Balance API
      description: >
        Fetch the available balance in your Admin wallet. Parameters are passed
        as **URL query string** for this endpoint, not as a JSON body.


        **Real URL:** `POST https://stagingstores.xoxoday.com/chef/v1/oauth/api`
      operationId: airmilesGetBalance
      parameters:
        - name: query
          in: query
          required: true
          schema:
            type: string
            enum:
              - plumProAPI.query.getBalance
            default: plumProAPI.query.getBalance
          description: Always use `plumProAPI.query.getBalance`.
        - name: tag
          in: query
          required: true
          schema:
            type: string
            enum:
              - plumProAPI
            default: plumProAPI
          description: Always use `plumProAPI`.
        - name: variables
          in: query
          required: true
          schema:
            type: string
            default: '{"data":{}}'
          description: URL-encoded JSON. Pass `{"data":{}}`.
      responses:
        '200':
          description: Balance fetched successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      getBalance:
                        type: object
                        properties:
                          status:
                            type: number
                            description: '`1` = success.'
                          data:
                            type: object
                            properties:
                              value:
                                type: number
                                description: Available balance.
                              currency:
                                type: string
                                description: Currency code (e.g. `USD`).
              example:
                data:
                  getBalance:
                    status: 1
                    data:
                      value: 5000
                      currency: USD
        '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>`'

````