Brent App (1.0.0)

Download OpenAPI specification:Download

The Brent app rest api docs

user

Operations related to the app users

/user/register

Identify / register the user by it's hash received from email

Request Body schema: application/json
nonce
string

Ensure the request is done only once

hash
string

The unique user identifier, hash based on the email with added salt

password
string

The password

security_question
string

The security question user input

security_answer
string

The security answer user input

Responses

Request samples

Content type
application/json
{
  • "nonce": "string",
  • "hash": "string",
  • "password": "string",
  • "security_question": "string",
  • "security_answer": "string"
}

Response samples

Content type
application/json
{
  • "user_token": "string",
  • "user_id": 0,
  • "user_type": "string",
  • "expiry": 0
}

/user/forgot_password

forgot password request

Request Body schema: application/json
nonce
string

Ensure the request is done only once

email
string

The user email

security_answer
string

The security answer the user inputed

Responses

Request samples

Content type
application/json
{
  • "nonce": "string",
  • "email": "string",
  • "security_answer": "string"
}

Response samples

Content type
application/json
{
  • "user_id": 0,
  • "message": "string"
}

/user/reset_password

reset password request

Request Body schema: application/json
nonce
string

Ensure the request is done only once

hash
string

hash value

password
string

Your new password

Responses

Request samples

Content type
application/json
{
  • "nonce": "string",
  • "hash": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

/user/login

Login

query Parameters
auth
any
Request Body schema: application/json
nonce
string

Ensure the request is done only once

email
string

The user email

password
string

password

security_answer
string

The security answer the user inputed

Responses

Request samples

Content type
application/json
{
  • "nonce": "string",
  • "email": "string",
  • "password": "string",
  • "security_answer": "string"
}

Response samples

Content type
application/json
{
  • "user_token": "string",
  • "user_id": 0,
  • "user_type": "string",
  • "expiry": "string"
}

/user/login_password

Login password email

query Parameters
auth
any
Request Body schema: application/json
nonce
string

Ensure the request is done only once

email
string

The user email

password
string

password

Responses

Request samples

Content type
application/json
{
  • "nonce": "string",
  • "email": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "user_token": "string",
  • "user_type": 0,
  • "security_question": "string",
  • "expiry": "string"
}

/user/edit_profile

Edit user profile

Request Body schema: application/json
token
string

user token

avatar
string

User avatar

first_name
string

User first name

last_name
string

User last name

jobTitle
string

New user role

dob
string

User date of birth

gender
string

User gender (m/f)

gender_birth
string

User birth gender (yes/no)

first_language
string

User first language

other_languages
string

Other languages (comma separated)

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "avatar": "string",
  • "first_name": "string",
  • "last_name": "string",
  • "jobTitle": "string",
  • "dob": "string",
  • "gender": "string",
  • "gender_birth": "string",
  • "first_language": "string",
  • "other_languages": "string"
}

Response samples

Content type
application/json
{
  • "type": "string"
}

/user/edit_contact

Edit user contact

Request Body schema: application/json
token
string

user token

phone_number
number

Phone number

phone_numbers
string

Comma separated numbers

emails
string

Comma separated emails

address
string

User address

city
string

User city

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "phone_number": 0,
  • "phone_numbers": "string",
  • "emails": "string",
  • "address": "string",
  • "city": "string"
}

Response samples

Content type
application/json
{
  • "result": "string"
}

/user/edit_bio

Edit user bio

Request Body schema: application/json
token
string

user token

about_me
string

About user

allergies
string

Allergies

achievements
object

Multiple achievements

care_history
object

Care history

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "about_me": "string",
  • "allergies": "string",
  • "achievements": { },
  • "care_history": { }
}

Response samples

Content type
application/json
{
  • "result": "string"
}

/user/info

Get user data

Request Body schema: application/json
token
string

user token

yp_id
string

user token. To be sent ONLY when SW/PA want to get data for a specific YP

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "yp_id": "string"
}

Response samples

Content type
application/json
{
  • "avatar": "string",
  • "first_name": "string",
  • "last_name": "string",
  • "dob": "string",
  • "gender": "string",
  • "gender_birth": "string",
  • "first_language": "string",
  • "other_languages": [
    ],
  • "phone_number": 0,
  • "phone_numbers": 0,
  • "emails": [
    ],
  • "address": "string",
  • "about_me": "string",
  • "allergies": "string",
  • "achievements": [
    ],
  • "care_history": [
    ],
  • "sw_pa_email": "string",
  • "type": "string",
  • "supporting_people": [
    ]
}

/user/info_full

Get user data, inclusing info, tasks, pathway plans, contacts and badges

Request Body schema: application/json
token
string

user token

yp_id
string

user token. To be sent ONLY when SW/PA want to get data for a specific YP

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "yp_id": "string"
}

Response samples

Content type
application/json
{
  • "info": { },
  • "tasks": { },
  • "pathwayPlans": { },
  • "contacts": { },
  • "badges": { }
}

/user/get_young_persons

Get young persons of sw/pa

Request Body schema: application/json
token
string

user token

nonce
string

nonce value

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string"
}

Response samples

Content type
application/json
{
  • "avatar": "string",
  • "first_name": "string",
  • "last_name": "string",
  • "registerd": null,
  • "signed_by": "string",
  • "due_date": "string",
  • "status": "string"
}

/user/remove_yp_from_swpa

Remove yp users from swpa

Request Body schema: application/json
token
string

sw user token

nonce
string

nonce string

user_id
string

yp user hash

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "user_id": "string"
}

Response samples

Content type
application/json
{
  • "data": "string"
}

/user/add_yp_ids

Assign multiple YPs to SW/PA (you have to pass yp ids comma separated)

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

yp_ids
string

comma separated yp ids

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "yp_ids": "string"
}

Response samples

Content type
application/json
{
  • "data": "string"
}

/user/get_all_yp

Get all yp users and its sw or pa

Request Body schema: application/json
token
string

User token

nonce
string

nonce string

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string"
}

Response samples

Content type
application/json
{
  • "data": null
}

/user/push_notification

Send push notification with email and attachement file to all yp users

Request Body schema: application/json
token
string

User token

nonce
string

nonce string

due_date
string

due date in Y-m-d format

description
string

description

yp_ids
string

comma separated yp hash id

file
string

file data with base64

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "due_date": "string",
  • "description": "string",
  • "yp_ids": "string",
  • "file": "string"
}

Response samples

Content type
application/json
{
  • "data": "string"
}

/user/web_push_cred

Set web push credentials

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

/user/app_settings

Set app settings

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

/user/web_push_delete

Delete web push credentials

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

general_auth

General Auth Operations

/wpapp/auth/v2/verify

Verify the nonce token

Request Body schema: application/json
nonce
string

Ensure the request is done only once

Responses

Request samples

Content type
application/json
{
  • "nonce": "string"
}

Response samples

Content type
application/json
{
  • "is_valid": true
}

/auth/v2/nonce

Responses

Response samples

Content type
application/json
{
  • "nonce": "string",
  • "root": "string",
  • "expiry": 0
}

/socket.io/

query Parameters
EIO
any
transport
any
t
any
sid
any
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

/socket.io/

query Parameters
EIO
any
transport
any
t
any
sid
any

Responses

safari_push_notifications

Safari Web Push Notifications

Safari push notifications

path Parameters
version
required
any

version

websitePushID
required
any

websitePushID

Responses

Safari log errors

path Parameters
version
required
any

version

Responses

Safari push register device

path Parameters
version
required
any

version

deviceToken
required
any

device token

websitePushID
required
any

websitePushID

Responses

Safari push delete device

path Parameters
version
required
any

version

deviceToken
required
any

device token

websitePushID
required
any

websitePushID

Responses

Safari push register device

Responses

tasks

/task/get_assigned_users

get assigned users

Request Body schema: application/json
token
string

User token generated when user log in

user_id
string

Get assigned users for this user id (only for SW / PA)

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "user_id": "string"
}

Response samples

Content type
application/json
{
  • "user_id": 0,
  • "user_name": "string",
  • "avatar": "string"
}

/task/save_task

Assign task save to new table

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

pp_id
integer

pp id

user_id
integer

user id

assignee_id
integer

assignee id

due_date
string

Due date (Y-m-d) format

description
string

Description

type
string

task/event

section
string

section

badge
string

Description

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "pp_id": 0,
  • "user_id": 0,
  • "assignee_id": 0,
  • "due_date": "string",
  • "description": "string",
  • "type": "string",
  • "section": "string",
  • "badge": "string"
}

Response samples

Content type
application/json
{
  • "result": "string"
}

/task/get_task

Get tasks created or assigned to the user

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

yp_id
string

user token. To be sent ONLY when SW/PA want to get data for a specific YP

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "yp_id": "string"
}

Response samples

Content type
application/json
{
  • "tasks": null,
  • "result": "string"
}

/task/task_completed

Mark task as completed

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

ticket_id
integer

record id

status
string

(true/false) true is completed. false is incomplete

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "ticket_id": 0,
  • "status": "string"
}

Response samples

Content type
application/json
{
  • "result": "string"
}

/task/update_task

update task

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

task_id
string

task id hash

user_id
string

user id hash

due_date
string

due_date

description
string

description

badges
string

multiple badges comma separated

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "task_id": "string",
  • "user_id": "string",
  • "due_date": "string",
  • "description": "string",
  • "badges": "string"
}

Response samples

Content type
application/json
{
  • "result": "string"
}

/task/delete_task

Delete task

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

task_id
string

task id hash

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "task_id": "string"
}

Response samples

Content type
application/json
{
  • "result": "string"
}

badges

/badge/get_badges

Get all active badge

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

type
string

Based on this will return either whole list of badges or badges assigned to an YP (all/own - all by default)

yp_id
string

user token. To be sent ONLY when SW/PA want to get data for a specific YP

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "type": "string",
  • "yp_id": "string"
}

Response samples

Content type
application/json
{
  • "badges": { }
}

/badge/assign_badges

Assign multiple badges to user id

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

user_id
string

user hash id

badge_ids
string

comma separated badge ids

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "user_id": "string",
  • "badge_ids": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

/badge/delete_badge

Delete badge for a specific YP

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

badge_id
string

badge hash

yp_id
string

YP hash

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "badge_id": "string",
  • "yp_id": "string"
}

Response samples

Content type
application/json
{
  • "badges": { }
}

pathway

/pathway/create_pp

Create Pathway

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

user_id
string

id hash

created_date
string

Created date

due_date
string

Due date

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "user_id": "string",
  • "created_date": "string",
  • "due_date": "string"
}

Response samples

Content type
application/json
{
  • "pathway_id": "string"
}

/pathway/delete_pp

Delete pathway plan from pathway hash id

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

pathway_id
string

pathway hash

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "pathway_id": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

/pathway/update_pp

Update Pathway

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

pathway_id
string

encrypted pathway id

first_name
string

First Name

last_name
string

Last Name

dob
string

Date of birth

gender
string

Gender (m/f)

gender_birth
string

Gender birth(yes/no)

disabled
string

Any disability(yes/no)

communication_needs
string

communication_needs

legal_status
string

legal_status

leaving_care_status
string

leaving_care_status

Immigration_status
string

Immigration_status

who_has_got_my_birth_certificate
string

who_has_got_my_birth_certificate

birth_certificate
string

birth_certificate

birth_certificate_filename
string

birth_certificate_filename

who_has_got_my_passport
string

who_has_got_my_passport

passport
string

passport

passport_filename
string

passport filename

ni_number
string

ni_number

overall_plan_feeling
integer

number between 1 to 5

overall_care_plan
string

overall_care_plan

attempts
string

attempts

family_relationship
string

family_relationship

workers_assessment
string

workers_assessment

contact_arrangements
string

contact_arrangements

date_of_visiting
string

date_of_visiting

seen_alone
string

yes or no

comments
string

comments

outside_statutory
string

outside_statutory

visits
object

visit,member_name,professionals_name,date,update_visit:string

education_feeling
integer

Between 1 to 5

education_working_well
string

education_working_well

education_worried_about
string

education_worried_about

education_current_establishment
string

education_current_establishment

education_address
string

education_address

education_phone
string

education_phone

education_support_contact
string

education_support_contact

education_date
string

education_date

education_responsible_la
string

education_responsible_la

education_next_steps
string

education_next_steps

education_long_term_goals
string

education_long_term_goals

education_contingency
string

education_contingency

managing_feeling
integer

Number between 1 to 5

managing_working_well
string

managing_working_well

managing_worried_about
string

managing_worried_about

managing_next_steps
string

managing_next_steps

managing_long_term_goals
string

managing_long_term_goals

managing_contingency
string

managing_contingency

health_feeling
integer

Number between 1 to 5

health_working_well
string

health_working_well

health_worried_about
string

health_worried_about

health_next_steps
string

health_next_steps

health_long_term_goals
string

health_long_term_goals

health_contingency
string

health_contingency

money_feeling
integer

Number between 1 to 5

money_working_well
string

money_working_well

money_worried_about
string

money_worried_about

money_next_steps
string

money_next_steps

money_long_term_goals
string

money_long_term_goals

money_contingency
string

money_contingency

health_allergies
string

health_allergies

mental_health
string

mental_health

signed_by_sw
string

yes or no

date_signed_by_sw
string

Y-m-d date

signed_by_yp
string

yes or no

date_signed_by_yp
string

Y-m-d date

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "pathway_id": "string",
  • "first_name": "string",
  • "last_name": "string",
  • "dob": "string",
  • "gender": "string",
  • "gender_birth": "string",
  • "disabled": "string",
  • "communication_needs": "string",
  • "legal_status": "string",
  • "leaving_care_status": "string",
  • "Immigration_status": "string",
  • "who_has_got_my_birth_certificate": "string",
  • "birth_certificate": "string",
  • "birth_certificate_filename": "string",
  • "who_has_got_my_passport": "string",
  • "passport": "string",
  • "passport_filename": "string",
  • "ni_number": "string",
  • "overall_plan_feeling": 0,
  • "overall_care_plan": "string",
  • "attempts": "string",
  • "family_relationship": "string",
  • "workers_assessment": "string",
  • "contact_arrangements": "string",
  • "date_of_visiting": "string",
  • "seen_alone": "string",
  • "comments": "string",
  • "outside_statutory": "string",
  • "visits": { },
  • "education_feeling": 0,
  • "education_working_well": "string",
  • "education_worried_about": "string",
  • "education_current_establishment": "string",
  • "education_address": "string",
  • "education_phone": "string",
  • "education_support_contact": "string",
  • "education_date": "string",
  • "education_responsible_la": "string",
  • "education_next_steps": "string",
  • "education_long_term_goals": "string",
  • "education_contingency": "string",
  • "managing_feeling": 0,
  • "managing_working_well": "string",
  • "managing_worried_about": "string",
  • "managing_next_steps": "string",
  • "managing_long_term_goals": "string",
  • "managing_contingency": "string",
  • "health_feeling": 0,
  • "health_working_well": "string",
  • "health_worried_about": "string",
  • "health_next_steps": "string",
  • "health_long_term_goals": "string",
  • "health_contingency": "string",
  • "money_feeling": 0,
  • "money_working_well": "string",
  • "money_worried_about": "string",
  • "money_next_steps": "string",
  • "money_long_term_goals": "string",
  • "money_contingency": "string",
  • "health_allergies": "string",
  • "mental_health": "string",
  • "signed_by_sw": "string",
  • "date_signed_by_sw": "string",
  • "signed_by_yp": "string",
  • "date_signed_by_yp": "string"
}

Response samples

Content type
application/json
{
  • "id": "string"
}

/pathway/override

Override Pathway - Used to cancel the Current PP and update Due Date for Next PP

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

due_date
string

Due date

yp_id
string

YP hash

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "due_date": "string",
  • "yp_id": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

/pathway/get_pp

Get Pathway

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

pathway
string

current,next, past, all

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "pathway": "string"
}

Response samples

Content type
application/json
{
  • "pathways": [
    ]
}

/pathway/get_pp_by_id

Get Pathway by id

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

pathway_id
string

pathway hash id

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "pathway_id": "string"
}

Response samples

Content type
application/json
{
  • "pathways": [
    ]
}

/pathway/get_pp_sw_pa

Get ALL Pathway Plans for specific SW/PA

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string"
}

Response samples

Content type
application/json
{
  • "pathways": [
    ]
}

/pathway/get_preview

Generate pathway pdf with details by pathway hash id

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

pathway_id
string

pathway hash id

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "pathway_id": "string"
}

Response samples

Content type
application/json
{
  • "data": "string"
}

contact

/contact/add_contact

Add/update contact

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

user_id
string

user id

firstName
string

First Name

lastName
string

Last Name

avatar
string

Avatar image

organization
string

Organization

phone
string

phone number

phoneNumbers
string

multiple phone numbers comma separated

email
string

Email

favorite
boolean

0 or 1

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "user_id": "string",
  • "firstName": "string",
  • "lastName": "string",
  • "avatar": "string",
  • "organization": "string",
  • "phone": "string",
  • "phoneNumbers": "string",
  • "email": "string",
  • "favorite": true
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

/contact/get_all_contact

get all contacts and services

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

type
string

(contact/service) based on this value get data. If null then we get both data

yp_id
string

user token. To be sent ONLY when SW/PA want to get data for a specific YP

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "type": "string",
  • "yp_id": "string"
}

Response samples

Content type
application/json
{
  • "data": [ ]
}

/contact/set_quick_contact

Set quick contact

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

id
string

hash id of post type (contact or service)

user_id
string

hash user id

isQuickContact
boolean

0 or 1

type
string

contact/service

yp_id
string

user token. To be sent ONLY when SW/PA want to get data for a specific YP

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "id": "string",
  • "user_id": "string",
  • "isQuickContact": true,
  • "type": "string",
  • "yp_id": "string"
}

Response samples

Content type
application/json
{
  • "data": true
}

/contact/delete_my_contact

Delete contact by id

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

id
string

hash id of contact

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "id": "string"
}

Response samples

Content type
application/json
{
  • "data": { }
}

/contact/report_errors

Report errors

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

service_id
string

service id hash

message
string

report error message

date
string

report error date

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "service_id": "string",
  • "message": "string",
  • "date": "string"
}

Response samples

Content type
application/json
{
  • "data": "string"
}

/contact/share_contact

Share contact

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

yp_ids
string

comma separated yp hash ids

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string",
  • "yp_ids": "string"
}

Response samples

Content type
application/json
{
  • "data": "string"
}

options

/options/list

List of all articles with article tags

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string"
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

/options/page

Get info pages

Request Body schema: application/json
token
string

User token generated when user log in

nonce
string

nonce string

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "nonce": "string"
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}