Receivables Management APIs
Get by Id
Get a receivable resource by id.
| Verb | GET |
| URL | https://api.s.unit.sh/receivables/{id} |
| Timeout (Seconds) | 5 |
Response
Response is a JSON:API document.
200 OK
curl -X GET 'https://api.s.unit.sh/receivables/1' \
-H "Authorization: Bearer ${TOKEN}"
List
List receivables resources. Paging can be applied.
| Verb | GET |
| URL | https://api.s.unit.sh/receivables |
| Timeout (Seconds) | 5 |
Query Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| page[limit] | integer | 100 | Optional. Maximum number of resources that will be returned. Maximum is 1000 resources. See Pagination. |
| page[offset] | integer | 0 | Optional. Number of resources to skip. See Pagination. |
| filter[customerId] | string | (empty) | Optional. Filters the results by the specified customer id. |
| filter[receivableType] | string | (empty) | Optional. Filters the results by one of the following receivable types ["bankReceivable", "orgReceivable", "capitalPartnerReceivable"] |
| filter[repaymentStatusType] | string | (empty) | Optional. Filters the results by one of the following repayment status types ["notRepaid", "partiallyRepaid", "fullyRepaid"] |
| filter[purchaseDueDate] | string | (empty) | Optional. Filters the results by the specified purchase due date e.g. 2023-05-25 |
curl -X GET 'https://api.s.unit.sh/receivables?page[limit]=20&page[offset]=10' \
-H "Authorization: Bearer ${TOKEN}"
Response
Example Response:
{
"data": [
{
"type": "bankReceivable",
"id": "5",
"attributes": {
"createdAt": "2024-12-08T08:58:55.515Z",
"updatedAt": "2024-12-08T08:58:55.515Z",
"version": 1,
"originalAmount": 100,
"remainingAmount": 100,
"purchaseDueDate": "2023-05-25",
"repaymentStatus": {
"type": "notRepaid"
}
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "10002"
}
},
"account": {
"data": {
"type": "account",
"id": "10027"
}
},
"transaction": {
"data": {
"type": "transaction",
"id": "154"
}
},
"lendingProgram": {
"data": {
"type": "lendingProgram",
"id": "15"
}
}
}
}
],
"meta": {
"pagination": {
"total": 1,
"limit": 100,
"offset": 0
}
}
}
Get Receivables Balance Report
Get receivables balance report resource. The resource contains information on the receivables balance that is due to be purchased by the specific date or on within specific number of days from today
| Verb | GET |
| URL | https://api.s.unit.sh/receivables |
| Timeout (Seconds) | 5 |
Query Parameters
Please note that you can use only one of the following filters at a time or use none of them.
| Name | Type | Default | Description |
|---|---|---|---|
| filter[purchaseDueDate] | string | (empty) | Optional. Filters the results by the receivable purchase due date. |
| filter[daysUntilPurchase] | string | (empty) | Optional. Filters the results by days until purchase |
curl -X GET 'https://api.s.unit.sh/receivablesreports/balance?' \
-H "Authorization: Bearer ${TOKEN}"
Response
Example Response:
{
"data": {
"type": "receivablesBalance",
"attributes": {
"pendingPurchaseReceivablesAmount": 100
}
}
}