Afya-Health
  1. Auth
Afya-Health
  • Auth
    • Login
      POST
    • Signup
      POST
  • ForgotPassword
    • Verify OTP
      POST
    • ForgotPassword
      POST
    • ResetPassword
      POST
  • Profile
    • Get User Profile
      GET
    • Update user profile
      POST
  • Family Members
    • Add Family Member
      POST
    • Update Family Members
      PUT
    • Delete Family Member
      DELETE
  • Address
    • Get User address
      GET
    • Add Address
      POST
    • Update address
      PUT
    • Delete Address
      DELETE
  • Languages
    • List AppLabels
      GET
    • Add/Update Label
      POST
    • List Languages
      GET
  • Products
    • Get Products
      GET
    • Create Product
      POST
    • Update Product
      PUT
    • Delete Product
      DELETE
    • Update product items
      PUT
  • Permissions
    • Get Permissions
  • Config
    • List Practice Config
    • Add Update Config
    • List Master Config
    • Add Update Master Config
  • Appointment Schedule
    • Create Schedule
    • Update Schedule
    • Delete Schedule
    • Get Schedule by ID
    • Get Schedule list
  • Test Tags
    • Get Test Tags
    • Create Test Tag
    • Update Test Tag
    • Delete Test Tag
  • Test Parameters
    • Get Test Parameters
    • Create Test Parameters
    • Update Test Parameters
    • Delete Test Parameters
  • Category
    • Get Category
    • Create Category
    • Update Category
    • Delete Category
  • Device
    • Register Device
  • File
    • Upload File
  • Appointment
    • Create Appointment Order
    • Get Appointments List
    • Update Appointment Status
    • Get Appointment by ID
    • Get Appointment Slots
    • GetStartJourneyDirection
  • Reports
    • Upload Report
    • List All Reports
    • List Reports By Appointment
    • Delete Report
    • Update Report File
  • Staff
    • Add Staff Member
    • List Staff Member
    • Update Staff Member
    • Delete Staff Member
    • Get Staff member by ID
  • Patient
    • List Patients
    • Add Patient
    • Update Patient
    • Delete Patient
    • Get patient by ID
  • Notifications
    • List User Notifications
    • Update Notification read status
  1. Auth

Login

POST
/api/service/v1/user/login

Request

Header Params
Accept
string 
optional
Example:
application/json
Content-Type
string 
optional
Example:
application/json
Device-Platform
string 
required
can be "web", "android", "ios"
Example:
web
App-Type
string 
optional
provider or patient. required if device platform present.
Example:
provider
Body Params application/json
email
string 
required
password
string 
required
Example
{
    "email": "deep.marsonia@plenartech.com",
    "password": "Plenar@123!"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://afyahealth.doctodoor.com:5600/api/service/v1/user/login' \
--header 'Accept: application/json' \
--header 'Device-Platform: web' \
--header 'App-Type: provider' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "deep.marsonia@plenartech.com",
    "password": "Plenar@123!"
}'

Responses

🟢200OK
application/json
Body
error
boolean 
required
status_code
integer 
required
message
string 
required
data
object 
required
user
object 
required
token
string 
required
Example
{
    "error": false,
    "status_code": 200,
    "message": "",
    "data": {
        "user": {
            "is_master_admin": 0,
            "is_deleted": 0,
            "is_active": 1,
            "deleted_at": null,
            "first_name": "Agent",
            "middle_name": "",
            "last_name": "User",
            "full_name": "Agent User",
            "email": "agent.demo@plenartech.com",
            "created_at": "2024-06-11T12:26:59.873Z",
            "updated_at": "2024-06-11T12:26:59.873Z",
            "id": "66684293f0ba0009121b1367"
        },
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY2Njg0MjkzZjBiYTAwMDkxMjFiMTM2NyIsImVtYWlsIjoiYWdlbnQuZGVtb0BwbGVuYXJ0ZWNoLmNvbSIsInN1YiI6IjY2Njg0MjkzZjBiYTAwMDkxMjFiMTM2NyIsImlhdCI6MTcxODExNjAzNCwiZXhwIjoxNzI1ODkyMDM0fQ.Ii0dArR6co4j_fuhXRim5Ag7NTewAPIEOyctGVOxdeY"
    }
}
🟠400Bad Request
🟠401Unauthorized
🟠401Password Error
Next
Signup
Built with