GetBalance API
Use the GetBalance API to fetch the account balance of your plum account
Base URL :
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":{
}
}
}
200 : Success
returns list of vouchers filtered by the applicable filters
{
"data": {
"getBalance": {
"status": 1,
"data": {
"points": 109970,
"value": 109970,
"currency": "INR"
}
}
}
}
502 : Failure
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"
}
Parameters
Body Parameters
This is the Bearer User access_token obtained by the client
"*" means the request parameter is mandatory
Body Parameters
0 (Failure) / 1 (Successful)
Remaining points balance in Base Currency
Value of the existing points in INR currency