PHR Database Service
POST /account/signup User signup (used to creat only UserRole User)
| Name | Type | Description | |
|---|---|---|---|
| first_name |
string
|
First name |
|
| last_name |
string
|
Last name |
|
string
|
|||
| password |
string
|
Password |
|
| confirmPassword |
string
|
Confirm Password |
|
| consent |
boolean
|
Consent |
|
| privacy_statement |
boolean
|
Privacy statement |
|
| reCaptchaToken |
string
|
Google reCaptcha Token |
|
| sendemail |
boolean
|
Sendemail status |
object
Response object with jwt token wirh user data
POST /account/login User login only by sending auth token in header
| Name | Type | Description | |
|---|---|---|---|
string
|
|||
| password |
string
|
Password |
|
| reCaptchaToken |
string
|
Google reCaptcha token |
obeject
Response object with jwt token
GET /account/auth/user Get User details for teacher,carer and clinican only by sending auth token in header
arrary
Response array
GET /account/user Get current user details only by sending auth token in header
object
Response object
GET /account/userDetail Get epjs user details only by sending auth token in header
object
Resonse object
GET /account/getUserByToken Get user detail by id with token only by sending auth token in header
| Name | Type | Description | |
|---|---|---|---|
| id |
Integer
|
UserId |
object
Response object
PUT /account/userData Update user details only by sending auth token in header
| Name | Type | Description | |
|---|---|---|---|
| consent |
String
|
accepting the consent. |
Object
Response object
GET /account/update/privacy Update privacy details only by sending auth token in header
| Name | Type | Description | |
|---|---|---|---|
| terms_and_condition |
boolean
|
Accept terms_and_condition status |
|
| privacy_statement |
boolean
|
Accept privacy_statement status |
object
Update status with message
GET /account/userProblem Get user probelm and description only by sending auth token in header
object
Response object
POST /account/auth/user Create User only by sending auth token in header
| Name | Type | Description | |
|---|---|---|---|
| first_name |
string
|
First name |
|
| last_name |
string
|
Last name |
|
| designation |
string
|
Designation |
|
| organization |
string
|
Organization |
|
| relationship |
string
|
Relationship |
|
| user_id |
Integer
|
User id |
|
| date_of_birth |
date
|
Date of birth |
|
string
|
|||
| password |
string
|
Password |
|
| reCaptchaToken |
string
|
Google reCaptcha Token |
|
| roles |
string
|
User roles |
object
Response object
PUT /account/update/password Update user password only by sending auth token in header
| Name | Type | Description | |
|---|---|---|---|
| current_password |
string
|
Current password |
|
| new_password |
string
|
New password |
|
| confirm_password |
string
|
Confirm password |
obeject
Response object
POST /account/forgot Send forgot password detils through mail only by sending auth token in header
| Name | Type | Description | |
|---|---|---|---|
string
|
object
Response object
POST /account/reset Reset user password only by sending auth token in header
| Name | Type | Description | |
|---|---|---|---|
| first_name |
string
|
First name |
|
| last_name |
string
|
Last name |
|
string
|
|||
| sendemail |
string
|
Sendemail status |
|
| password |
string
|
Password |
|
| confirm_password |
string
|
Confirm password |
|
| token |
string
|
Invited token |
object
Response object with jwt token
GET /account/getUserData Get user data for apostrophe authentication only by sending auth token in header
object
Response object
GET /account/unsubscribe Get notification status only by sending auth token in header
object
Response obect
GET /account/consent Get consent status only by sending auth token in header
object
Response object
PUT /account/unsubscribe User unsubscribe notification only by sending auth token in header
| Name | Type | Description | |
|---|---|---|---|
| userId |
Integer
|
User Id |
|
| notification |
boolean
|
Notification status |
object
Response object
PUT /account/update/profile Update user profile only by sending auth token in header
| Name | Type | Description | |
|---|---|---|---|
| first_name |
string
|
First name |
|
| last_name |
string
|
Last name |
|
string
|
|||
| phone_number |
string
|
Phone number |
object
Response object
PUT /account/update/problemName Update probelm name and description
| Name | Type | Description | |
|---|---|---|---|
| problem_name |
string
|
Problem name |
|
| problem_description |
string
|
Problem description |
object
Response object
PUT /account/update/consent Update consent only by sending auth token in header
| Name | Type | Description | |
|---|---|---|---|
| consent |
boolean
|
Consent status |
object
Response object
PUT /problem/{id} Update user profile picture
| Name | Type | Description | |
|---|---|---|---|
| id |
Integer
|
(Required) Numeric ID of the user. |
|
| useravathar |
String
|
Image of the user. |
Object
Response object
GET /account Verify the user account
| Name | Type | Description | |
|---|---|---|---|
| id |
Integer
|
Numeric ID of the user |
|
| signup_token |
String
|
Sign up token of the user |
Object
Response object
GET /diary/{id}Get user diary details
| Name | Type | Description | |
|---|---|---|---|
| id |
Integer
|
(Required) id of the diary. |
Object
Resonse object
POST /diary Save user diary details
| Name | Type | Description | |
|---|---|---|---|
| content |
String
|
(Required) content field of the diary. |
Object
Resonse object
PUT /diary/{id} Update user diary details
| Name | Type | Description | |
|---|---|---|---|
| id |
Integer
|
(Required) id of the diary. |
|
| content |
String
|
(Required) content field of the diary. |
Object
Resonse object
GET /circle/{id} Get user circle details
| Name | Type | Description | |
|---|---|---|---|
| id |
Integer
|
(Required) id of the circle. |
Object
Resonse object
GET /circle/{id} Get shared circle details of user by id
| Name | Type | Description | |
|---|---|---|---|
| id |
Integer
|
Numeric ID of the circle. |
Object
Resonse object
GET /circle/received Get circle received details
Object
Resonse object
POST /circle Save user circle details
| Name | Type | Description | |
|---|---|---|---|
| from_id |
Integer
|
Form Id. |
|
| to_id |
Integer
|
To Id. |
|
| first_name |
String
|
First Name. |
|
| last_name |
String
|
Last Name. |
|
| mode |
String
|
Mode. |
|
| status |
String
|
Status. |
|
| rejected_by |
String
|
Rejected by. |
|
| contact_by |
String
|
Contact by. |
Object
Resonse object
GET /circle/resend/{id} Get shared circle details
| Name | Type | Description | |
|---|---|---|---|
| id |
Integer
|
id of the circle. |
|
| circle_id |
Integer
|
circle id. |
|
| to_id |
String
|
To id. |
Object
Resonse object
PUT /circle/updatePassword Update user circle password
Object
Resonse object
PUT /circle/{id} Update circle detials by id
| Name | Type | Description | |
|---|---|---|---|
| id |
Integer
|
id of the circle. |
|
| from_id |
Integer
|
Form Id. |
|
| to_id |
Integer
|
To Id. |
|
| first_name |
String
|
First Name. |
|
| last_name |
String
|
Last Name. |
|
| mode |
String
|
Mode. |
|
| status |
String
|
Status. |
|
| rejected_by |
String
|
Rejected by. |
|
| rejected_by |
String
|
Contact by. |
Object
Resonse object
DELETE /circle/{id} Delete circle details by id
| Name | Type | Description | |
|---|---|---|---|
| id |
Integer
|
id of the circle. |
Object
Resonse object
GET /coping/{id} Get coping details or details by id
array
Resonse array
POST /coping Save user coping details
| Name | Type | Description | |
|---|---|---|---|
| content |
string
|
Content |
|
| description |
string
|
Description |
|
| archieved |
boolean
|
Archieved |
object
Resonse object
PUT /coping/{id} Update coping details
| Name | Type | Description | |
|---|---|---|---|
| user_id |
string
|
User Id |
|
| content |
string
|
Coping Title |
|
| description |
string
|
Description |
|
| archieved |
boolean
|
Archieved status |
object
Resonse object
DELETE /coping/{id} Delete coping details by id
| Name | Type | Description | |
|---|---|---|---|
| id |
string
|
Coping Id |
object
Resonse object
GET /goal/{id} Edit particular user goal by id
| Name | Type | Description | |
|---|---|---|---|
| inputs |
id
|
(Required) Numeric ID of the goal. |
Object
Resonse object
POST /goal Save user goal details
| Name | Type | Description | |
|---|---|---|---|
| name |
String
|
The name of the goal. |
|
| important |
Boolean
|
User make it as important. |
|
| achieved |
Boolean
|
user make it as achieved. |
|
| notes |
String
|
User notes. |
Object
Resonse object
PUT /goal/{id} Update user goal details
| Name | Type | Description | |
|---|---|---|---|
| id |
Integer
|
Numeric ID of the goal. |
|
| name |
String
|
The name of the goal. |
|
| important |
Boolean
|
User make it as important. |
|
| achieved |
Boolean
|
user make it as achieved. |
|
| notes |
String
|
User notes. |
Object
Response obect
DELETE /goal/{id} Delete goal details by id
| Name | Type | Description | |
|---|---|---|---|
| id |
Integer
|
(Required) Numeric ID of the goal. |
Object
Response object
{ "id": 64, "date_time": "2020-05-11T02:00:00.000Z", "status": "completed", "step_details": { "goal_step_id": 15, "step_name": "Watch master chef", "goal_details": { "goal_id": 16, "goal_name": "Learning to cook" } } }
{
goal_id: 16,
goal_name: 'foo',
steps: [
{ entry_id: 64 ,step_id: 15, step_name: 'bar', status: 'active', date_time: '' }
]
}
Void
POST /mood Save user mood details
| Name | Type | Description | |
|---|---|---|---|
| user_id |
Integer
|
(Required) User id. |
|
| date |
Date
|
(Required) Mood date. |
|
| mood |
String
|
User mood notes. |
Object
Response object
GET /problem/checkProblem Get user problem details
Object
Response object
Get problem by id
GET /problem/{id} Get problem by id
| Name | Type | Description | |
|---|---|---|---|
| id |
Integer
|
Numeric ID of the problem |
Object
Response object
POST /problem Save user problem details
| Name | Type | Description | |
|---|---|---|---|
| rate |
String
|
Rate the problem. |
|
| note |
String
|
Note the problem. |
Object
Response object
PUT /problem/{id} Update user problem details
| Name | Type | Description | |
|---|---|---|---|
| id |
Integer
|
(Required) Numeric ID of the problem. |
|
| rate |
String
|
(Required) Rate the problem. |
|
| note |
String
|
Note the problem. |
Object
Response object
DELETE /problem/{id} Delete problem details by id
| Name | Type | Description | |
|---|---|---|---|
| id |
Integer
|
(Required) Numeric ID of the problem. |
Object
Response object
GET /sleep/checkSleep Check user sleep details
Object
Response object
GET /sleep/{id} Get all sleep trakcer details or details by id
| Name | Type | Description | |
|---|---|---|---|
| id |
Integer
|
(Required) Numeric ID of the sleep tracker. |
Object
Response object
POST /sleep Save user sleep tracker details
| Name | Type | Description | |
|---|---|---|---|
| hours_slept |
String
|
(Required) number of hours slept. |
|
| wakeup_count |
String
|
(Required) wake up hours count. |
|
| notes |
String
|
User notes. |
Object
Response object