This is the documentation for the recurring debits endpoint on Famasi API.
- the endpoint is protected by a JWT authentication layer.
- only users with admin level privileges can access this endpoint.
- the endoint can be accessed by hitting up
/admin/user-plans/due
. - upon hitting up the endpoint, it would return user plans in the following format:
{
"statusCode": 200,
"responseMessage": "",
"data": {
"totalPages": 1,
"currentPage": 1,
"count": 1,
"data": [
{
"id": 1,
"recurringInterval": "monthly",
"nextRefillDate": "2023-06-20T16:23:17.937Z",
"status": "active",
"prescriptionId": null,
"who": "myself",
"address": "my address",
"state": "Lagos",
"additionalRequest": null,
"quantity": 2,
"meta": null,
"debits": 0,
"expected_debits": 2,
"userId": "79a43959-5395-4bcd-b224-f2b5ec70e32b",
"planId": 3,
"consultId": null,
"createdAt": "2023-06-08T17:23:23.288Z",
"updatedAt": "2023-06-17T07:56:05.707Z",
"dependantId": null
}
]
},
"success": true,
"requestStatus": "success"
}
- by default, it fetches results in batches of 10, but it can be adjusted by passing in an optional
limit
query parameter - a specific page of results can also be obtained by passing in an optional
page
query parameter