Appointments

This part of the documentation will show you how to call the APIs in order to search for clinics, members of each clinic, the availibility of each member, and finally book an appointment.

The Appointments Flow


GET/v2/KarazCare/GetClinics

List all Clinics

This endpoint allows you to retrieve a list of all the available Clinics/Health Care Providers.

Request Headers

  • Pass the Authorization header with the Bearer scheme and the user's access token.

Response attributes

  • Name
    ID
    Type
    integer
    Description

    The Clinics ID

  • Name
    Name
    Type
    array
    Description

    Name of the Clinic.

  • Name
    Image
    Type
    string
    Description

    URL of the Clinic's image.

  • Name
    Address
    Type
    string
    Description

    Address of the Clinic.

  • Name
    Latitude
    Type
    float
    Description

    Latitude of the Clinic.

  • Name
    Longitude
    Type
    float
    Description

    Longitude of the Clinic.

  • Name
    Description
    Type
    string
    Description

    Description of the Clinic.

  • Name
    Phone
    Type
    string
    Description

    Phone number of the Clinic.

  • Name
    Timezone
    Type
    string
    Description

    Timezone of the Clinic.

  • Name
    StartTime
    Type
    string
    Description

    Start time of the Clinic. String in the format YYYY-MM-DDThh:mm:ssTZD.

  • Name
    EndTime
    Type
    string
    Description

    End time of the Clinic. String in the format YYYY-MM-DDThh:mm:ssTZD.

  • Name
    SlotMinutes
    Type
    integer
    Description

    Duration of each time slot in minutes.

  • Name
    Email
    Type
    string
    Description

    Email of the Clinic.

Request

GET
/v2/Users/GetClinics
curl --request GET \
--url https://api.karaz.app/v2/Users/GetClinics \
--header 'Authorization: Bearer {token}'

Response

{
    "clinics": [
        {
            "ID": 1,
            "DeletedAt": null,
            "Name": "Not Rick's Clinic",
            "Image": "/media/images/clinics_Image_dSZJrcS0y5/wallpaper.jpeg",
            "Address": "Will Probably",
            "Latitude": 420.69,
            "Longitude": 69.42,
            "Description": "Give You",
            "Phone": "Up",
            "Timezone": "Asia/Riyadh",
            "StartTime": "2020-01-01T12:00:00+04:00",
            "EndTime": "2020-01-01T21:00:00+04:00",
            "SlotMinutes": 30,
            "Email": "[email protected]"
        },
        {
            "ID": 2,
            "DeletedAt": null,
            "Name": "Rick's Clinic",
            "Image": "/media/images/clinic/clinic_Photo2.jpg",
            "Address": "Never Gonna",
            "Latitude": 69.69,
            "Longitude": 420.42,
            "Description": "Give You",
            "Phone": "Up",
            "Timezone": "Asia/Riyadh",
            "StartTime": "2020-01-01T09:00:00+04:00",
            "EndTime": "2020-01-01T18:00:00+04:00",
            "SlotMinutes": 60,
            "Email": "[email protected]"
        }
    ],
    "status": "success"
}

POST/v2/KarazCare/GetClinics

Filter Clinics

This endpoint allows you to retrieve a list of all the available Clinics/Health Care Providers and filter them by name.

Request Headers

  • Pass the Authorization header with the Bearer scheme and the user's access token.

Request attributes

  • Name
    Search
    Type
    string
    Description

    Search keyword to search for clinics by name.

Response attributes

  • Name
    ID
    Type
    integer
    Description

    The Clinics ID

  • Name
    Name
    Type
    array
    Description

    Name of the Clinic.

  • Name
    Image
    Type
    string
    Description

    URL of the Clinic's image.

  • Name
    Address
    Type
    string
    Description

    Address of the Clinic.

  • Name
    Latitude
    Type
    float
    Description

    Latitude of the Clinic.

  • Name
    Longitude
    Type
    float
    Description

    Longitude of the Clinic.

  • Name
    Description
    Type
    string
    Description

    Description of the Clinic.

  • Name
    Phone
    Type
    string
    Description

    Phone number of the Clinic.

  • Name
    Timezone
    Type
    string
    Description

    Timezone of the Clinic.

  • Name
    StartTime
    Type
    string
    Description

    Start time of the Clinic. String in the format YYYY-MM-DDThh:mm:ssTZD.

  • Name
    EndTime
    Type
    string
    Description

    End time of the Clinic. String in the format YYYY-MM-DDThh:mm:ssTZD.

  • Name
    SlotMinutes
    Type
    integer
    Description

    Duration of each time slot in minutes.

  • Name
    Email
    Type
    string
    Description

    Email of the Clinic.

Request

GET
/v2/Users/GetClinics
curl --request POST \
--url http://localhost:8090/v2/KarazCare/GetClinics \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
"Search": "not"
}'

Response

{
    "clinics": [
        {
            "ID": 1,
            "DeletedAt": null,
            "Name": "Not Rick's Clinic",
            "Image": "/media/images/clinics_Image_dSZJrcS0y5/wallpaper.jpeg",
            "Address": "Will Probably",
            "Latitude": 420.69,
            "Longitude": 69.42,
            "Description": "Give You",
            "Phone": "Up",
            "Timezone": "Asia/Riyadh",
            "StartTime": "2020-01-01T12:00:00+04:00",
            "EndTime": "2020-01-01T21:00:00+04:00",
            "SlotMinutes": 30,
            "Email": "[email protected]"
        }
    ],
    "status": "success"
}