This is an optional API that can be used to query the Partner's Distributor Balance.
Overview
The Distributor Balance API allows the Partner to query the status of their Balance in the Distributor Account's currency.
Pre Requisites
- An access token needs to be generated in order to use this API (see Authentication - Generate Access Token)
API Description
Headers
| Header | Description/Value |
|---|---|
| AccessToken | This is the Access Token field returned from the Authentication - Generate Access Token response. This should be in the format Bearer <AccessToken> |
| Content-Type | application/vnd.carry1st.products.distributorbalance+json |
URL Format
To retrieve a list of available payment methods, make a GET request to the following endpoint:
- GET /api/distributors/balance
Response
The API will respond with a JSON object.
{
"balance": 918.00,
"balanceCurrencyCode": "USD"
}Response Fields
| Name | Type | Mandatory | Description |
|---|---|---|---|
| balance | Number | Y | The balance amount |
| balanceCurrencyCode | Striong | Y | The currency code of the balance |
HTTP Response Codes
The User Validation API may return the following HTTP Response Codes:
| HTTP Status Code | Name | Description |
|---|---|---|
| 200 | Success | This indicates that the request has been successful |
| 400 | Bad Request | There might be an issue with the URL used (e.g. there might be a typo) |
| 401 | Unauthorized | The Access Token might be missing or invalid (see Authentication - Generate Access Token) |
| 403 | Forbidden | The credentials provided might not have access to the resources required |
Error Handling
See Handling Error Codes for more details on handling error responses.
