> For the complete documentation index, see [llms.txt](https://xoxoday.gitbook.io/plum/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xoxoday.gitbook.io/plum/developer-resources/overview-of-reward_api/api-endpoints-1/account-balance/getbalance-api.md).

# GetBalance API

#### **Base URL :**

{% hint style="info" %}

> **`Staging :`** [**https://stagingaccount.xoxoday.com/chef**](< https://stagingaccount.xoxoday.com/chef>)
>
> **`Production :`** [**https://accounts.xoxoday.com/chef**](https://accounts.xoxoday.com/chef)
> {% endhint %}

{% tabs %}
{% tab title="Request" %}

```bash

curl -X POST {OAUTH_URL}/v1/oauth/api 
--header 'Authorization: Bearer eyJ0b2tlbkNvbnRlbnQiOnsiaXNzdWVkRm9yIjoiRnJlc2h3b3JrcyIsInNjb3BlIjoiIiwiaXNzdWVkQXQiOjE1NTk4MDQ1Nzg1ODIsImV4cGlyZXNBdCI6IjIwMTktMDYtMjFUMDc6MDI6NTguNTgyWiIsInRva2VuX3R5cGUiOiJVU0VSIn0sImFfdCI6ImV5SmxibU1pT2lKQk1USTRRMEpETFVoVE1qVTJJaXdpWVd4bklqb2lSVU5FU0MxRlV5SXNJbXRwWkNJNkltVnVZeUlzSW1Wd2F5STZleUpyZEhraU9pSkZReUlzSW1OeWRpSTZJbEF0TWpVMklpd2llQ0k2SWpoMmJVTkVRMUZQZW1wQlNHWndabXQ0TVhjNVluZHphM1JhZWtRek0ySXRZamx0VVhSclEyRnhNV3NpTENKNUlqb2lZMGR0V2kxdWIySjBWbUptTVdGdVNraDBUMmxoWW5VMFZHUlVhRzVVYmpCYWRuWnJabGMwYzBWb2N5SjlmUS4uU1h3TlNUSWhFUXNlN0htaXpPUmFIQS5NRzBVUy1lek1IOEFsbWFLc2ZTY3Nwa2FlYzBIcW9FcUV1YXRoNHRSTTRpeVg2dFByX1ZjTnlsdnk5YjlGLTZHR01DbjY1TjYwYnpIUUJtRVZvZGRYVWlvQS1kTkpuaE9KdThHczRfeW9pM042VGFOdWhjRENCUGtwWk1CeTlDRjJBaEh4UGotQkd0SzdEamhNbjBBQXpTM1VhTE11eUdrTmNwSGxQSUxNcFlVM' 
--header 'Content-Type: application/json'
  -d '{
	"query": "plumProAPI.query.getBalance",
	"tag": "plumProAPI",
	"variables": {
		"data":{
			
		}
	}
}

```

{% endtab %}

{% tab title="Response" %}

#### `200 : Success`

`returns list of vouchers filtered by the applicable filters`

```bash
{
    "data": {
        "getBalance": {
            "status": 1,
            "data": {
                "points": 109970,
                "value": 109970,
                "currency": "INR"
            }
        }
    }
}
```

#### `502 : Failure`&#x20;

`Failed to fetch client's balance.`

```
{
	   code: 502,
	   errorId: "PLE10023",
	   errorInfo: "Failed to get client's balance",
   error: "Eg: Bad Gateway"
}
```

#### `500: Failure`

`Internal server error`

```
{ 
   code: 500, 
   error: "Eg: Internal server error"
}
```

{% endtab %}
{% endtabs %}

## Parameters

{% tabs %}
{% tab title="Request " %}

#### `Body Parameters`

| `Property`           | `Type`       | **`Description`**                                            |
| -------------------- | ------------ | ------------------------------------------------------------ |
| Authorization header | Bearer Token | This is the Bearer User access\_token obtained by the client |

{% hint style="info" %}
**"\*" means the request parameter is mandatory**
{% endhint %}
{% endtab %}

{% tab title="Response" %}

#### `Body Parameters`

| Property      | Type    | Description                                  |
| ------------- | ------- | -------------------------------------------- |
| Status        | Integer | 0 (Failure) / 1 (Successful)                 |
| Points        | Integer | Remaining points balance in Base Currency    |
| Value         | Integer | Value of the existing points in INR currency |
| Currency      | String  | Base currency                                |
| {% endtab %}  |         |                                              |
| {% endtabs %} |         |                                              |
