Skip to main content

Receivables Management

Get by Id

Get a receivable resource by id.

VerbGET
Urlhttps://api.s.unit.sh/receivables/{id}
Timeout (Seconds)5

Response

Response is a JSON:API document.

200 OK

FieldTypeDescription
dataReceivableA receivable resource.
curl -X GET 'https://api.s.unit.sh/receivables/1' \
-H "Authorization: Bearer ${TOKEN}"

List

List receivables resources. Paging can be applied.

VerbGET
Urlhttps://api.s.unit.sh/receivables
Timeout (Seconds)5

Query Parameters

NameTypeDefaultDescription
page[limit]integer100Optional. Maximum number of resources that will be returned. Maximum is 1000 resources. See Pagination.
page[offset]integer0Optional. 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

Response is a JSON:API document.

200 OK

FieldTypeDescription
dataArray of ReceivablesArray of receivable resources.
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

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

VerbGET
Urlhttps://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.

NameTypeDefaultDescription
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

Response is a JSON:API document.

200 OK

FieldTypeDescription
dataReceivablesBalanceA receivables balance resource.
Example Response:
{
"data": {
"type": "receivablesBalance",
"attributes": {
"pendingPurchaseReceivablesAmount": 100
}
}
}