Receivables Management
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
Field | Type | Description |
---|---|---|
data | Receivable | A receivable resource. |
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
Response is a JSON:API document.
200 OK
Field | Type | Description |
---|---|---|
data | Array of Receivables | Array 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
}
}
}