Read Open Balance
The ReadOpenBalance API in OCS.io is designed to retrieve the open balance of a specific account.
API Overview
Parameters Required for Reading Open Balance
The following table lists and describes the parameters required to read an open balance through the ReadOpenBalance API:
| Parameter | Description | 
|---|---|
refId  | 
Ref ID of the Account  | 
externalId  | 
External ID of the Account  | 
detailIncluded  | 
Indicates whether Detail per Document Type is included.  | 
calculationForced  | 
Indicates whether Open Balance calculation is forced.  | 
| Detailed API documentation and endpoint specifics are available here. | 
Request Validations
The following validations are performed when reading an open balance:
- 
Account must be provided in the request, it must be already created in the system and must not be in Deactivated State.
 - 
Payer must be already created in the system.
 
Read Open Balance Example
Here is a cURL example for the ReadOpenBalance API:
curl -X GET 'https://api.ocs.io/v1/rm/payer/read-open-balance?externalId=<account_external_id>&detailIncluded=true&calculationForced=true'
The outcome of the API call is as follows:
- 
The open balance of the account with external ID
<account_external_id>is retrieved. - 
If
detailIncludedis set totrue, detailed figures of the open balance are included. - 
If
calculationForcedis set totrue, the open balance calculation is forced.