Skip to content

Instantly share code, notes, and snippets.

@Adophilus
Last active June 20, 2023 16:28
Show Gist options
  • Save Adophilus/8680fb7c528fe123b9ace8022e1d8349 to your computer and use it in GitHub Desktop.
Save Adophilus/8680fb7c528fe123b9ace8022e1d8349 to your computer and use it in GitHub Desktop.
Famasi recurring debits documentation

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment