API Reference

Sign up

This endpoint allows you to sign up patients on Serenity

URL: {{base_url}}/auth/signup

{
    "title": "Mr",
    "email": "[email protected]",
    "address": "No. 3 North Bridge",
    "mobile": "+233262260986",
    "date_of_birth": "07-20-1986",
    "last_name": "User",
    "other_name": "",
    "first_name": "Test",
    "password": "password",
    "gender": "MALE"
}

Login

This endpoint allows you to log in as a patient user on Serenity

URL: {{base_url}}/auth/patients/login

{
    "email": "{{serenity_user_email}}",
    "password": "{{serenity_user_password}}"
}
{
    "refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTYzMjQwNTU2MSwianRpIjoiNjhjYmIwM2ZjMTU1NGUzNzgxMTg5ODVhOGZhODU4YmYiLCJ1c2VyX2lkIjoxfQ.hITENC_s5SBp8rxPbwM3tOhURulSEmuFhD58MNGViwc",
    "access": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjMyMzIwOTYxLCJqdGkiOiI3ZDNhNmQwMjcxYTg0NWI1OWY3NjFjNzNlMzcyZjQ1NiIsInVzZXJfaWQiOjF9.p4pPCa1VgeXLJhgoijh7CPOjatkMSMz7_kyavYf1ytI",
    "user": {
        "id": 1,
        "uuid": "18fbeae0-37c9-400c-ab8d-37a629d88562",
        "email": "[email protected]",
        "mobile": "233262260986",
        "first_name": "Chris",
        "last_name": "Dare"
    },
    "patient": {
        "full_name": "Chris  Dare",
        "gender": "MALE",
        "birth_date": "1976-10-01",
        "mobile": "233262260986",
        "medical_record_uuid": "4bf734c9-f28a-40fc-9564-2ba750820915",
        "serenity_health_user_record_uuid": "18fbeae0-37c9-400c-ab8d-37a629d88562"
    }
}

Update/Upload patient profile picture

This Endpoint allows you to upload a patient's profile picture

URL: {{base_url}}/providers/{{provider_id}}/patient-photos/{{patient_id}}

Method: POST

{
	"object_name":file,
}
{
    "success": true,
    "message": "Photo uploaded successfully",
    "data": {
        "id": 6,
        "is_deleted": false,
        "modified_at": "2021-10-12T22:38:34.408432Z",
        "uuid": "3504e094-6143-48ab-810b-46a652c802c1",
        "content_type": "image/jpeg",
        "language": "ENGLISH",
        "object_name": "/media/download_peViodQ.jpg",
        "hash": null,
        "created_at": "2021-10-12T22:38:34.408546Z",
        "patient": "5f46b190-fab9-40b9-96d2-078b3c5e4204"
    },
    "errors": null
}

Get patient profile picture

This endpoint allows a provider to get all patient profile pictures

URL: {{base_url}}/providers/{{provider_id}}/patient-photos/{{patient_id}}

Method: GET

{
    "success": true,
    "message": "Photo retrieved successfully",
    "data": [
        {
            "id": 1,
            "is_deleted": false,
            "modified_at": "2021-10-12T22:23:10.990488Z",
            "uuid": "b10bbb1f-7181-449a-b803-88eb6a6cba97",
            "content_type": "image/jpeg",
            "language": "ENGLISH",
            "object_name": "/media/download.jpg",
            "hash": null,
            "created_at": "2021-10-12T22:23:10.990807Z",
            "patient": "5f46b190-fab9-40b9-96d2-078b3c5e4204"
        },
        {
            "id": 2,
            "is_deleted": false,
            "modified_at": "2021-10-12T22:25:16.560856Z",
            "uuid": "64bd606b-209d-4ea4-ac4d-4f018246ee40",
            "content_type": "image/jpeg",
            "language": "ENGLISH",
            "object_name": "/media/download_XsvxwTM.jpg",
            "hash": null,
            "created_at": "2021-10-12T22:25:16.561032Z",
            "patient": "5f46b190-fab9-40b9-96d2-078b3c5e4204"
        }
       
    ],
    "errors": null
}