PRAMS API
API Written for the CSHP/PRAMS Residency Matching System/Service
Defaults / General Info
This section deals with some key default notions in this API.
The following is how all responses should come back from the API:
{
"message": "English message for developers",
"errors": [ "Localized Error Messages Array for display to users" ],
"status": 200 (status code which should already be the HTTP status of the response)
"data": { object or objects of data returned by the operation }
}
The default language for the API is English. If the user requests french, please send back the following header to any request:
Accept-Language: fr
Methods that require authentication must be supplied with an “Authorization” header containing the JWTToken, for example:
Authorization: Bearer header.payload.signature
Auth ¶
Resources related to Authentication, Registration, and Password Management
Authenticate ¶
Get a Login TokenPOST/api/auth/login
Send the email and password of the person attempting to login and get back a token that can be used for each subsequent request for this session.
Example URI
Body
{
"email": "somebody@somewhere.com",
"password": "123456"
}Schema
{
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "The user's email address"
},
"password": {
"type": "string",
"description": "The user's password"
}
},
"required": [
"email",
"password"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}200Headers
Content-Type: application/jsonBody
{
"message": "Successful Verification",
"errors": [],
"status": 200,
"data": {
"token": "JWTToken",
"user": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
},
"roles": [
{
"id": 1,
"name": "applicant",
"label": "Applicant"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Token for use in future operations in this App session"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"email": {
"type": "string"
},
"has_payment_token": {
"type": "boolean"
},
"created_at": {
"type": "string"
}
},
"required": [
"id",
"first_name",
"last_name",
"email",
"has_payment_token"
]
},
"roles": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json422Headers
Content-Type: application/json500Headers
Content-Type: application/jsonRegister ¶
Create a new accountPOST/api/auth/register
Create a new user in the application
Example URI
Body
{
"email": "somebody@somewhere.com",
"password": "123456",
"first_name": "John",
"last_name": "Doe"
}Schema
{
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "The user's email address"
},
"password": {
"type": "string",
"description": "The user's password"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
}
},
"required": [
"email",
"password"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}201Headers
Content-Type: application/jsonBody
{
"message": "User successfully created",
"errors": [],
"status": "201",
"data": {
"user": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "string",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"email": {
"type": "string"
},
"has_payment_token": {
"type": "boolean"
},
"created_at": {
"type": "string"
}
},
"required": [
"id",
"first_name",
"last_name",
"email",
"has_payment_token"
]
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json422Headers
Content-Type: application/json500Headers
Content-Type: application/jsonVerify Signup Token ¶
Verify TokenPOST/api/auth/verify
Confirm your ownership of the email address you registered with…in most cases, a token will be sent back which should effectively login the User.
Example URI
Body
{
"email": "somebody@somewhere.com",
"email_token": "7JaEWn6uj4ikyu9G0LsMWXn070mZM8"
}Schema
{
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "The user's email address"
},
"email_token": {
"type": "string",
"description": "The token provided by the app after registration"
}
},
"required": [
"email",
"email_token"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}200Headers
Content-Type: application/jsonBody
{
"message": "User successfully verified",
"errors": [],
"status": 200,
"data": {
"user": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
},
"token": "JWTToken"
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"email": {
"type": "string"
},
"has_payment_token": {
"type": "boolean"
},
"created_at": {
"type": "string"
}
},
"required": [
"id",
"first_name",
"last_name",
"email",
"has_payment_token"
]
},
"token": {
"type": "string"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json422Headers
Content-Type: application/json500Headers
Content-Type: application/jsonPassword Recovery ¶
Get a new passwordPOST/api/auth/recovery
Send an email to this person with a password reset token.
For role, send one of applicant, program, or administrator so we know where to direct the link button to in the email
Example URI
Body
{
"email": "somebody@somewhere.com",
"role": "program"
}Schema
{
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "The user's email address"
},
"role": {
"type": "string",
"description": "One of `applicant`, `program`, or `administrator` so we know where to direct the link button to in the email"
}
},
"required": [
"email"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}200Headers
Content-Type: application/jsonBody
{
"message": "User located, Password recovery email sent",
"errors": [],
"status": 200,
"data": {}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json422Headers
Content-Type: application/json500Headers
Content-Type: application/jsonPassword Reset ¶
Reset a user's passwordPOST/api/auth/reset
Supply the email, new password and reset token to reset this user’s password and then log them in
Example URI
Body
{
"email": "somebody@somewhere.com",
"password": "123456",
"password_confirmation": "123456",
"token": "bba0f0f161ab3326b9226419978708ece3bf9017f7a187b28f26808f1d2057f4"
}Schema
{
"type": "object",
"properties": {
"email": {
"type": "string"
},
"password": {
"type": "string"
},
"password_confirmation": {
"type": "string"
},
"token": {
"type": "string"
}
},
"required": [
"email",
"password",
"password_confirmation",
"token"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}200Headers
Content-Type: application/jsonBody
{
"message": "Successful Verification",
"errors": [],
"status": 200,
"data": {
"token": "JWTToken",
"user": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Token for use in future operations in this App session"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"email": {
"type": "string"
},
"has_payment_token": {
"type": "boolean"
},
"created_at": {
"type": "string"
}
},
"required": [
"id",
"first_name",
"last_name",
"email",
"has_payment_token"
]
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json422Headers
Content-Type: application/json500Headers
Content-Type: application/jsonAuthenticate Referee ¶
Login a RefereePOST/api/auth/referee/login
Verify a Referee from their email link sent when an Applicant requests their help (or reminds them)
Example URI
Body
{
"email": "someone@somewhere.com",
"token": "lksdhfhdfihahf2308748"
}Schema
{
"type": "object",
"properties": {
"email": {
"type": "string"
},
"token": {
"type": "string"
}
},
"required": [
"email",
"token"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}200Headers
Content-Type: application/jsonBody
{
"message": "Successful Verification",
"errors": [],
"status": 200,
"data": {
"token": "JWTToken",
"user": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
},
"roles": [
{
"id": 1,
"name": "applicant",
"label": "Applicant"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Token for use in future operations in this App session"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"email": {
"type": "string"
},
"has_payment_token": {
"type": "boolean"
},
"created_at": {
"type": "string"
}
},
"required": [
"id",
"first_name",
"last_name",
"email",
"has_payment_token"
]
},
"roles": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json422Headers
Content-Type: application/json500Headers
Content-Type: application/jsonUser ¶
Methods to deal with User and Profile management.
User ¶
Get a User's DetailsGET/api/users/{user_id}
Return basic information about a user. This can be retrieved by the user him/herself or someone with an admin role.
Example URI
- user_id
number(required) Example: 1The User ID of the details being fetched
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Retrieved User Data",
"errors": [],
"status": 200,
"data": {
"user": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
},
"roles": [
{
"id": 1,
"name": "applicant",
"label": "Applicant"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"email": {
"type": "string"
},
"has_payment_token": {
"type": "boolean"
},
"created_at": {
"type": "string"
}
},
"required": [
"id",
"first_name",
"last_name",
"email",
"has_payment_token"
]
},
"roles": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonProfile ¶
Get a User's ProfileGET/api/users/{user_id}/profile
Return a user’s Profile. This can be retrieved by the user him/herself or someone with an admin role.
Example URI
- user_id
number(required) Example: 1The User ID of the details being fetched
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Retrieved User Data",
"errors": [],
"status": 200,
"data": {
"profile": {
"organization": "MARSWorks Inc.",
"city": "Ottawa",
"state": "ON",
"country": "CA",
"address_formatted": "",
"phone": "6138606277 x. 203",
"fax": "6138606277 x. 203",
"percent_completed": 0,
"user": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
}
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"profile": {
"type": "object",
"properties": {
"organization": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"country": {
"type": "string"
},
"address_formatted": {
"type": "string",
"description": "HTML formatted Address from the data in this profile"
},
"phone": {
"type": "string"
},
"fax": {
"type": "string"
},
"percent_completed": {
"type": "number",
"description": "Percentage completion on their profile - 0 to 100"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"email": {
"type": "string"
},
"has_payment_token": {
"type": "boolean"
},
"created_at": {
"type": "string"
}
},
"required": [
"id",
"first_name",
"last_name",
"email",
"has_payment_token"
]
}
},
"required": [
"city",
"percent_completed"
]
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonUser - Password ¶
Change PasswordPUT/api/users/{user_id}/password
Change a password for a User, must be the logged in User or an Admin
Example URI
- user_id
number(required) Example: 1The User ID of the details being fetched
Headers
Authorization: Bearer JWTTokenBody
{
"password": "123456"
}Schema
{
"type": "object",
"properties": {
"password": {
"type": "string",
"description": "Must be at least 6 characters"
}
},
"required": [
"password"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}200Headers
Content-Type: application/jsonBody
{
"message": "Retrieved User Data",
"errors": [],
"status": 200,
"data": {
"user": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
},
"roles": [
{
"id": 1,
"name": "applicant",
"label": "Applicant"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"email": {
"type": "string"
},
"has_payment_token": {
"type": "boolean"
},
"created_at": {
"type": "string"
}
},
"required": [
"id",
"first_name",
"last_name",
"email",
"has_payment_token"
]
},
"roles": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonProgram User ¶
Program UserPOST/api/programs/{program_id}/users
Attach a user to a Program - the user may already exist, or may be created before being attached.
NOTE: This is also really an updating Endpoint as well…if you post the same details and change the type, or name this will work. Adding a different email address however will add a new person!
NOTE: If you add a Director and one already exists, the previous Director is changed to coordinator
Example URI
- program_id
number(required) Example: 1The Program ID we’re attaching this User to
Body
{
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@marsworks.com",
"type": "director"
}Schema
{
"type": "object",
"properties": {
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"email": {
"type": "string"
},
"type": {
"enum": [
"director",
"coordinator"
]
}
},
"required": [
"first_name",
"last_name",
"email",
"type"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}200Headers
Content-Type: application/jsonBody
{
"message": "User attached to Program",
"errors": [],
"status": "200",
"data": {
"programs": [
{
"id": 1,
"name": "Mercy Hospital",
"address1": "123 Oak Street",
"address2": "Unit 101",
"organization": "MARSWorks Inc.",
"city": "Ottawa",
"state": "ON",
"country": "CA",
"postal_code": "K1T 1W6",
"phone": "6138606277 x. 203",
"url": "https://cshp.ca/programs/program",
"extra_uploads": "Please submit a nice cover letter and send it to us!",
"positions": 10,
"directors": [
{
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
],
"coordinators": [
{
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
],
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "string",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"programs": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json422Headers
Content-Type: application/json500Headers
Content-Type: application/jsonProgram User ¶
Program UserDELETE/api/programs/{program_id}/users/{user_id}
Detach a user from a Program.
Example URI
- program_id
number(required) Example: 1The Program ID we’re attaching this User to
- user_id
number(required) Example: 1The User ID we’re attaching to this Program
200Headers
Content-Type: application/jsonBody
{
"message": "User attached to Program",
"errors": [],
"status": "200",
"data": {
"programs": [
{
"id": 1,
"name": "Mercy Hospital",
"address1": "123 Oak Street",
"address2": "Unit 101",
"organization": "MARSWorks Inc.",
"city": "Ottawa",
"state": "ON",
"country": "CA",
"postal_code": "K1T 1W6",
"phone": "6138606277 x. 203",
"url": "https://cshp.ca/programs/program",
"extra_uploads": "Please submit a nice cover letter and send it to us!",
"positions": 10,
"directors": [
{
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
],
"coordinators": [
{
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
],
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "string",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"programs": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json422Headers
Content-Type: application/json500Headers
Content-Type: application/jsonApplicants ¶
Methods to deal with Applicants
Applicants ¶
ApplicantsGET/api/applicants{?download,paid}
Return Applicants, all of them, only for Adminstrators!
Example URI
- download
string(required) Example: trueIf
true, returns an Excel file- paid
string(required) Example: trueIf
truereturns only Paid Applicants, otherwise returns them all
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Applicants Returned",
"errors": [],
"status": 200,
"data": {
"users": [
{
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"users": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json403Headers
Content-Type: application/json500Headers
Content-Type: application/jsonApplications ¶
Methods to deal with Applications
Applications ¶
ApplicationsGET/api/applications
Return Applications, all of them, only for Adminstrators!
Example URI
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Retrieved Application Data",
"errors": [],
"status": 200,
"data": {
"applications": [
{
"id": 1,
"user_id": 1,
"percent_completed": 100,
"credits": 8,
"paid": true,
"bc_exception_paid": false,
"references_completed": 1,
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00",
"applicant": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"applications": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonApplications ¶
Application DownloadGET/api/applications/{application_id}?{program_id}
Return a PDF of the Application
Applicants - get the Application and Attachments stuck together
Program Members or Admins - get Completed References as well
Example URI
- application_id
number(required) Example: 1The Application ID of the details being fetched
- program_id
number(optional) Example: 1If this is a Program User, then the ID they are currently using should be passed so we can return them the actual PDF for that program (which may have Program specific downloads)
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/octet-streamBody
+ File: A streamed response which is the requested file sent back to the Applicant401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonApplication Data Download ¶
Application Data DownloadGET/api/applications/data
Return an Excel of some of the Application Data for paid Applications
NOTE: this is for Admins only
Example URI
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/octet-streamBody
+ File: A streamed response which is the requested file sent back to the Applicant401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonUser Applications ¶
User ApplicationsGET/api/users/{user_id}/applications
Return the Applications for a User…this should almost always return a single Application. TODO - confirm we’ll only return the “active” Application
Example URI
- user_id
number(required) Example: 1The User ID of the details being fetched
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Retrieved Application Data",
"errors": [],
"status": 200,
"data": {
"applications": [
{
"id": 1,
"user_id": 1,
"application": {
"profile": {
"title": "Mr.",
"first_name": "Steve",
"last_name": "Rogers",
"former_last_name": "Johnston",
"preferred_name": "Smith",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"phone": "6138606277 x. 203",
"phone2": "6138606277",
"equity_seeking_group": "First Nations",
"equity_seeking_group_other": "Some other value",
"sharing_consent": true
},
"canadian_citizen": true,
"licensed": {
"status": true,
"expected_date": "2017-04-17T21:24:23+00:00"
},
"education": [
{
"school": "Carleton University",
"type": "post-secondary",
"program": "Bachelor of Commerce",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"achievement": "Certificate",
"transcript_id": 100
}
],
"pharmacy_education": {
"directed_studies": true,
"courses": [
{
"course": "Putting Pills into bottles",
"description": "Lorem ipsum dolor sit amet"
}
],
"experiential_placements": true,
"placements": [
{
"name": "MARSWorks Inc.",
"course_number": "42.101",
"facility_name": "Mercy Hospital",
"site_type": "Hospital Pharmacy",
"description": "Lorem ipsum dolor sit amet",
"length": "4 months",
"status": "complete",
"skill": "Lorem ipsum dolor sit amet"
}
]
},
"work_experience": [
{
"position": "Application Developer",
"organization": "MARSWorks Inc.",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"hours": "40 / week",
"supervisor": "John Doe",
"supervisor_phone": "613-555-1212",
"supervisor_email": "supervisor@somewhere.com",
"duties": "lorem ipsum"
}
],
"community_service": [
{
"position": "Application Developer",
"organization": "MARSWorks Inc.",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"hours": "40 / week",
"supervisor": "John Doe",
"supervisor_phone": "613-555-1212",
"supervisor_email": "supervisor@somewhere.com",
"duties": "lorem ipsum"
}
],
"leadership_experience": [
{
"position": "Application Developer",
"organization": "MARSWorks Inc.",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"hours": "40 / week",
"supervisor": "John Doe",
"supervisor_phone": "613-555-1212",
"supervisor_email": "supervisor@somewhere.com",
"duties": "lorem ipsum"
}
],
"extracurricular": [
{
"name": "Choir",
"organization": "MARSWorks Inc.",
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"description": "lorem ipsum",
"hours": "4 / week"
}
],
"publications": "lorem ipsum",
"memberships": [
{
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"description": "lorem ipsum"
}
],
"awards": [
{
"name": "Walkley Road Scholarship",
"description": "Lorem ipsum dolor sit amet",
"date": "2019-01-01"
}
],
"essay": "lorem ipsum"
},
"percent_completed": 100,
"credits": 8,
"paid": true,
"bc_exception_paid": false,
"empty_sections": {
"status": false,
"education": false,
"pharmacy_education": false,
"work experience": false,
"community service": false,
"leadership experience": false,
"essay": false
},
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00",
"applicant": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"applications": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonApplication ¶
Get an ApplicationGET/api/users/{user_id}/applications/{application_id}
Return the Application. This can be retrieved by the user him/herself, by someone with an admin role, or by someone in a Program to which this Applicant has Applied.
Example URI
- user_id
number(required) Example: 1The User ID of the details being fetched
- application_id
number(required) Example: 1The Application ID of the Application being fetched
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Retrieved Application Data",
"errors": [],
"status": 200,
"data": {
"applications": [
{
"id": 1,
"user_id": 1,
"application": {
"profile": {
"title": "Mr.",
"first_name": "Steve",
"last_name": "Rogers",
"former_last_name": "Johnston",
"preferred_name": "Smith",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"phone": "6138606277 x. 203",
"phone2": "6138606277",
"equity_seeking_group": "First Nations",
"equity_seeking_group_other": "Some other value",
"sharing_consent": true
},
"canadian_citizen": true,
"licensed": {
"status": true,
"expected_date": "2017-04-17T21:24:23+00:00"
},
"education": [
{
"school": "Carleton University",
"type": "post-secondary",
"program": "Bachelor of Commerce",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"achievement": "Certificate",
"transcript_id": 100
}
],
"pharmacy_education": {
"directed_studies": true,
"courses": [
{
"course": "Putting Pills into bottles",
"description": "Lorem ipsum dolor sit amet"
}
],
"experiential_placements": true,
"placements": [
{
"name": "MARSWorks Inc.",
"course_number": "42.101",
"facility_name": "Mercy Hospital",
"site_type": "Hospital Pharmacy",
"description": "Lorem ipsum dolor sit amet",
"length": "4 months",
"status": "complete",
"skill": "Lorem ipsum dolor sit amet"
}
]
},
"work_experience": [
{
"position": "Application Developer",
"organization": "MARSWorks Inc.",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"hours": "40 / week",
"supervisor": "John Doe",
"supervisor_phone": "613-555-1212",
"supervisor_email": "supervisor@somewhere.com",
"duties": "lorem ipsum"
}
],
"community_service": [
{
"position": "Application Developer",
"organization": "MARSWorks Inc.",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"hours": "40 / week",
"supervisor": "John Doe",
"supervisor_phone": "613-555-1212",
"supervisor_email": "supervisor@somewhere.com",
"duties": "lorem ipsum"
}
],
"leadership_experience": [
{
"position": "Application Developer",
"organization": "MARSWorks Inc.",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"hours": "40 / week",
"supervisor": "John Doe",
"supervisor_phone": "613-555-1212",
"supervisor_email": "supervisor@somewhere.com",
"duties": "lorem ipsum"
}
],
"extracurricular": [
{
"name": "Choir",
"organization": "MARSWorks Inc.",
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"description": "lorem ipsum",
"hours": "4 / week"
}
],
"publications": "lorem ipsum",
"memberships": [
{
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"description": "lorem ipsum"
}
],
"awards": [
{
"name": "Walkley Road Scholarship",
"description": "Lorem ipsum dolor sit amet",
"date": "2019-01-01"
}
],
"essay": "lorem ipsum"
},
"percent_completed": 100,
"credits": 8,
"paid": true,
"bc_exception_paid": false,
"empty_sections": {
"status": false,
"education": false,
"pharmacy_education": false,
"work experience": false,
"community service": false,
"leadership experience": false,
"essay": false
},
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00",
"applicant": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"applications": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonSave an ApplicationPOST/api/users/{user_id}/applications/{application_id}
Store the Application, this should only be possible by the Applicant him/herself
Example URI
- user_id
number(required) Example: 1The User ID of the details being fetched
- application_id
number(required) Example: 1The Application ID of the Application being fetched
Headers
Authorization: Bearer JWTTokenBody
{
"application": {
"profile": {
"title": "Mr.",
"first_name": "Steve",
"last_name": "Rogers",
"former_last_name": "Johnston",
"preferred_name": "Smith",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"phone": "6138606277 x. 203",
"phone2": "6138606277",
"equity_seeking_group": "LGBTQ2S+",
"equity_seeking_group_other": "Some other value",
"sharing_consent": true
},
"canadian_citizen": true,
"licensed": {
"status": true,
"expected_date": "2017-04-17T21:24:23+00:00"
},
"education": [
{
"school": "Carleton University",
"type": "post",
"program": "Bachelor of Commerce",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"achievement": "Certificate",
"transcript_id": 100
}
],
"pharmacy_education": {
"directed_studies": true,
"courses": [
{
"course": "Putting Pills into bottles",
"description": "Lorem ipsum dolor sit amet"
}
],
"experiential_placements": true,
"placements": [
{
"name": "MARSWorks Inc.",
"course_number": "42.101",
"facility_name": "Mercy Hospital",
"site_type": "Hospital Pharmacy",
"description": "Lorem ipsum dolor sit amet",
"length": "4 months",
"status": "complete",
"skill": "Lorem ipsum dolor sit amet"
}
]
},
"work_experience": [
{
"position": "Application Developer",
"organization": "MARSWorks Inc.",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"hours": "40 / week",
"supervisor": "John Doe",
"supervisor_phone": "613-555-1212",
"supervisor_email": "supervisor@somewhere.com",
"duties": "lorem ipsum"
}
],
"community_service": [
{
"position": "Application Developer",
"organization": "MARSWorks Inc.",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"hours": "40 / week",
"supervisor": "John Doe",
"supervisor_phone": "613-555-1212",
"supervisor_email": "supervisor@somewhere.com",
"duties": "lorem ipsum"
}
],
"leadership_experience": [
{
"position": "Application Developer",
"organization": "MARSWorks Inc.",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"hours": "40 / week",
"supervisor": "John Doe",
"supervisor_phone": "613-555-1212",
"supervisor_email": "supervisor@somewhere.com",
"duties": "lorem ipsum"
}
],
"extracurricular": [
{
"name": "Choir",
"organization": "MARSWorks Inc.",
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"description": "lorem ipsum",
"hours": "4 / week"
}
],
"publications": "lorem ipsum",
"memberships": [
{
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"description": "lorem ipsum"
}
],
"awards": [
{
"name": "Walkley Road Scholarship",
"description": "Lorem ipsum dolor sit amet",
"date": "2019-01-01"
}
],
"essay": "lorem ipsum"
}
}Schema
{
"type": "object",
"properties": {
"application": {
"type": "object",
"properties": {
"profile": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"former_last_name": {
"type": "string"
},
"preferred_name": {
"type": "string"
},
"address": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"country": {
"type": "string"
}
},
"required": [
"city"
]
},
"phone": {
"type": "string"
},
"phone2": {
"type": "string"
},
"equity_seeking_group": {
"enum": [
"LGBTQ2S+",
"First Nations",
"Inuit",
"Métis or other Indigenous group",
"Black or Person of Colour",
"Person with a disability",
"Woman",
"Other",
"No"
]
},
"equity_seeking_group_other": {
"type": "string"
},
"sharing_consent": {
"type": "boolean"
}
}
},
"canadian_citizen": {
"type": "boolean"
},
"licensed": {
"type": "object",
"properties": {
"status": {
"type": "boolean"
},
"expected_date": {
"type": "string"
}
}
},
"education": {
"type": "array",
"items": {
"type": "object",
"properties": {
"school": {
"type": "string"
},
"type": {
"enum": [
"post",
"secondary"
]
},
"program": {
"type": "string"
},
"address": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"country": {
"type": "string"
}
},
"required": [
"city"
]
},
"start_date": {
"type": "string"
},
"end_date": {
"type": "string"
},
"achievement": {
"enum": [
"Certificate",
"Diploma",
"Degree"
]
},
"transcript_id": {
"type": "number"
}
},
"required": [
"school",
"program",
"start_date",
"end_date"
]
}
},
"pharmacy_education": {
"type": "object",
"properties": {
"directed_studies": {
"type": "boolean"
},
"courses": {
"type": "array",
"items": {
"type": "object",
"properties": {
"course": {
"type": "string"
},
"description": {
"type": "string"
}
}
}
},
"experiential_placements": {
"type": "boolean"
},
"placements": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"course_number": {
"type": "string"
},
"facility_name": {
"type": "string"
},
"site_type": {
"type": "string"
},
"description": {
"type": "string"
},
"length": {
"type": "string"
},
"status": {
"enum": [
"complete",
"in-progress"
]
},
"skill": {
"type": "string"
}
},
"required": [
"length",
"status"
]
}
}
}
},
"work_experience": {
"type": "array",
"items": {
"type": "object",
"properties": {
"position": {
"type": "string"
},
"organization": {
"type": "string"
},
"address": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"country": {
"type": "string"
}
},
"required": [
"city"
]
},
"start_date": {
"type": "string"
},
"end_date": {
"type": "string"
},
"hours": {
"type": "string"
},
"supervisor": {
"type": "string"
},
"supervisor_phone": {
"type": "string"
},
"supervisor_email": {
"type": "string"
},
"duties": {
"type": "string"
}
}
}
},
"community_service": {
"type": "array",
"items": {
"type": "object",
"properties": {
"position": {
"type": "string"
},
"organization": {
"type": "string"
},
"address": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"country": {
"type": "string"
}
},
"required": [
"city"
]
},
"start_date": {
"type": "string"
},
"end_date": {
"type": "string"
},
"hours": {
"type": "string"
},
"supervisor": {
"type": "string"
},
"supervisor_phone": {
"type": "string"
},
"supervisor_email": {
"type": "string"
},
"duties": {
"type": "string"
}
}
}
},
"leadership_experience": {
"type": "array",
"items": {
"type": "object",
"properties": {
"position": {
"type": "string"
},
"organization": {
"type": "string"
},
"address": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"country": {
"type": "string"
}
},
"required": [
"city"
]
},
"start_date": {
"type": "string"
},
"end_date": {
"type": "string"
},
"hours": {
"type": "string"
},
"supervisor": {
"type": "string"
},
"supervisor_phone": {
"type": "string"
},
"supervisor_email": {
"type": "string"
},
"duties": {
"type": "string"
}
}
}
},
"extracurricular": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"organization": {
"type": "string"
},
"start_date": {
"type": "string"
},
"end_date": {
"type": "string"
},
"description": {
"type": "string"
},
"hours": {
"type": "string"
}
}
}
},
"publications": {
"type": "string"
},
"memberships": {
"type": "array",
"items": {
"type": "object",
"properties": {
"start_date": {
"type": "string"
},
"end_date": {
"type": "string"
},
"description": {
"type": "string"
}
},
"required": [
"start_date",
"end_date",
"description"
]
}
},
"awards": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"date": {
"type": "string"
}
}
}
},
"essay": {
"type": "string"
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}200Headers
Content-Type: application/jsonBody
{
"message": "Retrieved Application Data",
"errors": [],
"status": 200,
"data": {
"applications": [
{
"id": 1,
"user_id": 1,
"application": {
"profile": {
"title": "Mr.",
"first_name": "Steve",
"last_name": "Rogers",
"former_last_name": "Johnston",
"preferred_name": "Smith",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"phone": "6138606277 x. 203",
"phone2": "6138606277",
"equity_seeking_group": "First Nations",
"equity_seeking_group_other": "Some other value",
"sharing_consent": true
},
"canadian_citizen": true,
"licensed": {
"status": true,
"expected_date": "2017-04-17T21:24:23+00:00"
},
"education": [
{
"school": "Carleton University",
"type": "post-secondary",
"program": "Bachelor of Commerce",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"achievement": "Certificate",
"transcript_id": 100
}
],
"pharmacy_education": {
"directed_studies": true,
"courses": [
{
"course": "Putting Pills into bottles",
"description": "Lorem ipsum dolor sit amet"
}
],
"experiential_placements": true,
"placements": [
{
"name": "MARSWorks Inc.",
"course_number": "42.101",
"facility_name": "Mercy Hospital",
"site_type": "Hospital Pharmacy",
"description": "Lorem ipsum dolor sit amet",
"length": "4 months",
"status": "complete",
"skill": "Lorem ipsum dolor sit amet"
}
]
},
"work_experience": [
{
"position": "Application Developer",
"organization": "MARSWorks Inc.",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"hours": "40 / week",
"supervisor": "John Doe",
"supervisor_phone": "613-555-1212",
"supervisor_email": "supervisor@somewhere.com",
"duties": "lorem ipsum"
}
],
"community_service": [
{
"position": "Application Developer",
"organization": "MARSWorks Inc.",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"hours": "40 / week",
"supervisor": "John Doe",
"supervisor_phone": "613-555-1212",
"supervisor_email": "supervisor@somewhere.com",
"duties": "lorem ipsum"
}
],
"leadership_experience": [
{
"position": "Application Developer",
"organization": "MARSWorks Inc.",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"hours": "40 / week",
"supervisor": "John Doe",
"supervisor_phone": "613-555-1212",
"supervisor_email": "supervisor@somewhere.com",
"duties": "lorem ipsum"
}
],
"extracurricular": [
{
"name": "Choir",
"organization": "MARSWorks Inc.",
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"description": "lorem ipsum",
"hours": "4 / week"
}
],
"publications": "lorem ipsum",
"memberships": [
{
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"description": "lorem ipsum"
}
],
"awards": [
{
"name": "Walkley Road Scholarship",
"description": "Lorem ipsum dolor sit amet",
"date": "2019-01-01"
}
],
"essay": "lorem ipsum"
},
"percent_completed": 100,
"credits": 8,
"paid": true,
"bc_exception_paid": false,
"empty_sections": {
"status": false,
"education": false,
"pharmacy_education": false,
"work experience": false,
"community service": false,
"leadership experience": false,
"essay": false
},
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00",
"applicant": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"applications": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonRankings ¶
Apply To/Rank a ProgramPOST/api/applications/{application_id}/rankings
Create an Application to this Program, which creates a Ranking Object
Example URI
- application_id
number(required) Example: 1The Application ID of the Application being fetched
Headers
Authorization: Bearer JWTTokenBody
{
"program_id": 10
}Schema
{
"type": "object",
"properties": {
"program_id": {
"type": "number"
}
},
"required": [
"program_id"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}200Headers
Content-Type: application/jsonBody
{
"message": "Ranked Program",
"errors": [],
"status": 200,
"data": {
"rankings": [
{
"id": 1,
"application_id": 1,
"program_id": 1,
"program_rank": 1,
"applicant_rank": 1,
"no_interview": false,
"status": "prematch",
"status_description": "Pre-Match",
"applicant": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
},
"program": {
"id": 1,
"name": "Mercy Hospital",
"address1": "123 Oak Street",
"address2": "Unit 101",
"organization": "MARSWorks Inc.",
"city": "Ottawa",
"state": "ON",
"country": "CA",
"postal_code": "K1T 1W6",
"phone": "6138606277 x. 203",
"url": "https://cshp.ca/programs/program",
"extra_uploads": "Please submit a nice cover letter and send it to us!",
"positions": 10,
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"rankings": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonRankings ¶
Delete RankingDELETE/api/applications/{application_id}/rankings/{ranking_id}
Deletes an Application to this Program, which deletes a Ranking Object
Example URI
- application_id
number(required) Example: 1The Application ID of the Application being fetched
- ranking_id
number(required) Example: 1The Ranking ID of the Ranking being deleted
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Successfully canceled a Ranking",
"errors": [],
"status": 200,
"data": {
"rankings": [
{
"id": 1,
"application_id": 1,
"program_id": 1,
"program_rank": 1,
"applicant_rank": 1,
"no_interview": false,
"status": "prematch",
"status_description": "Pre-Match",
"applicant": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
},
"program": {
"id": 1,
"name": "Mercy Hospital",
"address1": "123 Oak Street",
"address2": "Unit 101",
"organization": "MARSWorks Inc.",
"city": "Ottawa",
"state": "ON",
"country": "CA",
"postal_code": "K1T 1W6",
"phone": "6138606277 x. 203",
"url": "https://cshp.ca/programs/program",
"extra_uploads": "Please submit a nice cover letter and send it to us!",
"positions": 10,
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"rankings": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonRankings ¶
Rankings from an ApplicationGET/api/users/{user_id}/applications/{application_id}/rankings
Return the Rankings made by an Application/Applicant. This can be retrieved by the user him/herself, by someone with an admin role, or by someone in a Program to which this Applicant has Applied.
NOTE: Return shape may differ depending on Role…if Program Member, ranking orders are null and includes of Applicant and Program info are not included, and “program_name” is added.
Example URI
- user_id
number(required) Example: 1The User ID of the details being fetched
- application_id
number(required) Example: 1The Application ID of the Application being fetched
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Retrieved Application Data",
"errors": [],
"status": 200,
"data": {
"rankings": [
{
"id": 1,
"application_id": 1,
"program_id": 1,
"program_rank": 1,
"applicant_rank": 1,
"no_interview": false,
"status": "prematch",
"status_description": "Pre-Match",
"applicant": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
},
"program": {
"id": 1,
"name": "Mercy Hospital",
"address1": "123 Oak Street",
"address2": "Unit 101",
"organization": "MARSWorks Inc.",
"city": "Ottawa",
"state": "ON",
"country": "CA",
"postal_code": "K1T 1W6",
"phone": "6138606277 x. 203",
"url": "https://cshp.ca/programs/program",
"extra_uploads": "Please submit a nice cover letter and send it to us!",
"positions": 10,
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"rankings": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonRanking Orders ¶
Change Rankings by ApplicantPOST/api/applications/{application_id}/ranking-orders
Only the Applicant should be able to order their Program Rankings
NOTE: TODO - Policy to lock this down to the Applicant, its OPEN at the moment!
Example URI
- application_id
number(required) Example: 1The Application ID of the Application being fetched
Headers
Authorization: Bearer JWTTokenBody
{
"new_ranking_ids": [
1,
14,
25,
12
]
}Schema
{
"type": "object",
"properties": {
"new_ranking_ids": {
"type": "array",
"items": {
"type": "number"
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}200Headers
Content-Type: application/jsonBody
{
"message": "Applicant Rankings Re-Ordered",
"errors": [],
"status": 200,
"data": {
"rankings": [
{
"id": 1,
"application_id": 1,
"program_id": 1,
"program_rank": 1,
"applicant_rank": 1,
"no_interview": false,
"status": "prematch",
"status_description": "Pre-Match",
"applicant": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
},
"program": {
"id": 1,
"name": "Mercy Hospital",
"address1": "123 Oak Street",
"address2": "Unit 101",
"organization": "MARSWorks Inc.",
"city": "Ottawa",
"state": "ON",
"country": "CA",
"postal_code": "K1T 1W6",
"phone": "6138606277 x. 203",
"url": "https://cshp.ca/programs/program",
"extra_uploads": "Please submit a nice cover letter and send it to us!",
"positions": 10,
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"rankings": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonProgram Rankings ¶
Program RankingPUT/api/rankings/{ranking_id}
Only an Admin or Program Member can do this.
Pass in an integer from 1 to 1000 to move this Ranking to that place in the Order.
NOTE: you can pass null to de-rank an Applicant.
NOTE: if you pass an integer already taken, others may be bumped lower
Example URI
- ranking_id
number(required) Example: 1The Ranking ID being re-ordered
Headers
Authorization: Bearer JWTTokenBody
{
"program_rank": 1
}Schema
{
"type": "object",
"properties": {
"program_rank": {
"type": "number",
"description": "Can be `null` as well if de-ranking the Applicant"
}
},
"required": [
"program_rank"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}200Headers
Content-Type: application/jsonBody
{
"message": "Successful Re-Ordered a Program Ranking",
"errors": [],
"status": 200,
"data": {
"rankings": [
{
"id": 1,
"application_id": 1,
"application_phone": "+1-613-555-1212 x. 203",
"application_phone2": "+1-613-555-1212 x. 203",
"program_id": 1,
"program_rank": 1,
"status": "prematch",
"status_description": "Pre-Match",
"applicant": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"rankings": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonProgram Rankings ¶
Program RankingsGET/api/programs/{program_id}/rankings
Only a Member of the chosen Program should be able to see this list
Example URI
- program_id
number(required) Example: 1The Program ID that you’re fetching Rankings for
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Retrieved Program Rankings",
"errors": [],
"status": 200,
"data": {
"rankings": [
{
"id": 1,
"application_id": 1,
"application_phone": "+1-613-555-1212 x. 203",
"application_phone2": "+1-613-555-1212 x. 203",
"program_id": 1,
"program_rank": 1,
"status": "prematch",
"status_description": "Pre-Match",
"applicant": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"rankings": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonProgram Applications ¶
Program ApplicationsGET/api/programs/{program_id}/applications{?download}
Only a Member of the chosen Program should be able to see this list of Applications
NOTE: Not sure we actually need this method…it uses an abbreviated “Application” object in the response
Example URI
- program_id
number(required) Example: 1The Program ID that you’re fetching Applications for
- download
boolean(required) Example: trueIf
truethis will return a .zip file of all applications to a program
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Retrieved Application Data",
"errors": [],
"status": 200,
"data": {
"rankings": [
{
"id": 1,
"user_id": 1,
"percent_completed": 100,
"references_completed": 2,
"rankings": 4,
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00",
"applicant": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"rankings": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonApplication File Operations ¶
Application FilesGET/api/applications/{application_id}/files?{ranking_id}
Get a list of the files attached to an Application
Example URI
- application_id
number(required) Example: 1The Application we want files from
- ranking_id
number(optional) Example: 1Specify the Ranking ID to retrieve files for this Ranking only
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Retrieved Application Files",
"errors": [],
"status": 200,
"data": {
"files": [
{
"id": 1,
"title": "File Title",
"description": "Lorem ipsum dolor si amet",
"filename": "Some_File_Name.pdf",
"filesize": 123456,
"filetype": "application/pdf",
"created_at": "2017-04-17T21:24:23+00:00"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"files": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json422Headers
Content-Type: application/json500Headers
Content-Type: application/jsonApplication FilePOST/api/applications/{application_id}/files?
Upload a file linked to this Application
Example URI
- application_id
number(required) Example: 1The Application this Applicant is uploading a file to
Headers
Authorization: Bearer JWTTokenBody
{
"title": "My Resume",
"filename": "resume.pdf",
"filesize": 12345,
"filetype": "application/pdf",
"ranking_id": 1,
"attachment": "JHIUH6f8agsdgfqgw876fq8werfgfd"
}Schema
{
"type": "object",
"properties": {
"title": {
"type": "string"
},
"filename": {
"type": "string"
},
"filesize": {
"type": "number"
},
"filetype": {
"type": "string"
},
"ranking_id": {
"type": "number",
"description": "If this is a Ranking/Program specific upload, supply the Ranking ID"
},
"attachment": {
"type": "string",
"description": "Base64 encoded string representing the file to upload"
}
},
"required": [
"title",
"filename",
"filesize",
"filetype",
"attachment"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}200Headers
Content-Type: application/jsonBody
{
"message": "File successfully uploaded",
"errors": [],
"status": 200,
"data": {
"file": {
"id": 1,
"title": "File Title",
"description": "Lorem ipsum dolor si amet",
"filename": "Some_File_Name.pdf",
"filesize": 123456,
"filetype": "application/pdf",
"created_at": "2017-04-17T21:24:23+00:00"
}
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"file": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"filename": {
"type": "string"
},
"filesize": {
"type": "number"
},
"filetype": {
"type": "string"
},
"created_at": {
"type": "string"
}
},
"required": [
"id",
"title"
]
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json422Headers
Content-Type: application/json500Headers
Content-Type: application/jsonFile ¶
Download a FileGET/api/files/{file_id}
Download a file to the browser
Example URI
- file_id
number(required) Example: 1The file being requested
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/octet-streamBody
+File: A streamed response which is the requested file sent back to the Applicant401Headers
Content-Type: application/json422Headers
Content-Type: application/json500Headers
Content-Type: application/jsonDelete a FileDELETE/api/files/{file_id}
Delete a file attached to this Application.
This should return a list of all Files remaining on this Application
Example URI
- file_id
number(required) Example: 1The file being requested
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "File Successfully Deleted",
"errors": [],
"status": 200,
"data": {
"files": [
{
"id": 1,
"title": "File Title",
"description": "Lorem ipsum dolor si amet",
"filename": "Some_File_Name.pdf",
"filesize": 123456,
"filetype": "application/pdf",
"created_at": "2017-04-17T21:24:23+00:00"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"files": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json422Headers
Content-Type: application/json500Headers
Content-Type: application/jsonReferees ¶
Methods to deal with Referees
Referees ¶
RefereesGET/api/referees{?download}
Return Referees, all of them, only for Adminstrators!
Example URI
- download
string(required) Example: trueIf
true, returns an Excel file
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Referees Returned",
"errors": [],
"status": 200,
"data": {
"users": [
{
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"users": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json403Headers
Content-Type: application/json500Headers
Content-Type: application/jsonReferences ¶
Methods to deal with References and Referees
References ¶
Get ReferencesGET/api/references{?own}
Return References for a Referee, or the entire list if you are an Administrator
Example URI
- own
string(optional) Example: trueIf this parameter is passed (with any value other than
false) and the authorized User is an Administrator, they will only get References returned that belong to them (as the Referee)
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Retrieved References",
"errors": [],
"status": 200,
"data": {
"references": [
{
"id": 1,
"application_id": 1,
"referee_id": 96,
"request": "Nemo quis nihil accusantium voluptatem.",
"reference": {
"profile": {
"position": "Professor",
"organization": "Last Chance U",
"location": "Ottawa, ON",
"phone": "613"
},
"relationship": {
"faculty": true,
"preceptor": false,
"employer": true,
"other": true,
"other_description": "Other relationship value"
},
"known": "post-secondary",
"hours": "10",
"ratings": {
"independence": 1,
"problem_solving": 1,
"communication": 1,
"adpatability": 1,
"professionalism": 1,
"feedback": 1
},
"opportunity_for_improvement": "Lorem ipsum dolor sit amet",
"comments": "Lorem ipsum dolor sit amet",
"would_hire": true,
"would_hire_comments": "Lorem ipsum dolor sit amet"
},
"status": "requested",
"percent_complete": 100,
"valid_sections": {
"relationship": true,
"ratings": true,
"recommendations": true,
"your_info": true
},
"token_sent": "2017-08-23T17:12:18+00:00",
"token_resend": "2017-08-30T17:12:18+00:00",
"can_resend": false,
"link_login": "http://localhost:4200/referees/login",
"link_decline": "http://localhost:4200/referees/decline",
"created_at": "2017-08-08T17:13:50+00:00",
"updated_at": "2017-08-08T17:13:50+00:00",
"referee": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"references": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonReference ¶
Get a ReferenceGET/api/references/{reference_id}{?download}
Return a specific References, only the Referee, Administrator, or a Program user who has been ranked by the Application can “get” this Reference
NOTE: The Reference sent back in the Response will not contain the Reference “Content” if this is the Applicant!
NOTE: If an Applicant tries to download a PDF, they will simply be returned the reference info they can see in a normal JSON response
Example URI
- reference_id
number(required) Example: 1The ID of the Reference being fetched
- download
boolean(required) Example: trueIf
truea PDF is sent instead
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Retrieved References",
"errors": [],
"status": 200,
"data": {
"references": [
{
"id": 1,
"application_id": 1,
"referee_id": 96,
"request": "Nemo quis nihil accusantium voluptatem.",
"reference": {
"profile": {
"position": "Professor",
"organization": "Last Chance U",
"location": "Ottawa, ON",
"phone": "613"
},
"relationship": {
"faculty": true,
"preceptor": false,
"employer": true,
"other": true,
"other_description": "Other relationship value"
},
"known": "post-secondary",
"hours": "10",
"ratings": {
"independence": 1,
"problem_solving": 1,
"communication": 1,
"adpatability": 1,
"professionalism": 1,
"feedback": 1
},
"opportunity_for_improvement": "Lorem ipsum dolor sit amet",
"comments": "Lorem ipsum dolor sit amet",
"would_hire": true,
"would_hire_comments": "Lorem ipsum dolor sit amet"
},
"status": "requested",
"percent_complete": 100,
"valid_sections": {
"relationship": true,
"ratings": true,
"recommendations": true,
"your_info": true
},
"token_sent": "2017-08-23T17:12:18+00:00",
"token_resend": "2017-08-30T17:12:18+00:00",
"can_resend": false,
"link_login": "http://localhost:4200/referees/login",
"link_decline": "http://localhost:4200/referees/decline",
"created_at": "2017-08-08T17:13:50+00:00",
"updated_at": "2017-08-08T17:13:50+00:00",
"referee": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"references": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonCancel/Decline ReferenceDELETE/api/references/{reference_id}{?download}
Cancel or Decline a Reference - must be the Applicant who requested it, or the Referee
NOTE: The Reference sent back in the Response will not contain the Reference “Content” if this is the Applicant!
Example URI
- reference_id
number(required) Example: 1The ID of the Reference being fetched
- download
boolean(required) Example: trueIf
truea PDF is sent instead
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Reference successfully deleted",
"errors": [],
"status": 200,
"data": {
"references": [
{
"id": 1,
"application_id": 1,
"referee_id": 96,
"request": "Nemo quis nihil accusantium voluptatem.",
"reference": {
"profile": {
"position": "Professor",
"organization": "Last Chance U",
"location": "Ottawa, ON",
"phone": "613"
},
"relationship": {
"faculty": true,
"preceptor": false,
"employer": true,
"other": true,
"other_description": "Other relationship value"
},
"known": "post-secondary",
"hours": "10",
"ratings": {
"independence": 1,
"problem_solving": 1,
"communication": 1,
"adpatability": 1,
"professionalism": 1,
"feedback": 1
},
"opportunity_for_improvement": "Lorem ipsum dolor sit amet",
"comments": "Lorem ipsum dolor sit amet",
"would_hire": true,
"would_hire_comments": "Lorem ipsum dolor sit amet"
},
"status": "requested",
"percent_complete": 100,
"valid_sections": {
"relationship": true,
"ratings": true,
"recommendations": true,
"your_info": true
},
"token_sent": "2017-08-23T17:12:18+00:00",
"token_resend": "2017-08-30T17:12:18+00:00",
"can_resend": false,
"link_login": "http://localhost:4200/referees/login",
"link_decline": "http://localhost:4200/referees/decline",
"created_at": "2017-08-08T17:13:50+00:00",
"updated_at": "2017-08-08T17:13:50+00:00",
"referee": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"references": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonUpdate a ReferencePUT/api/references/{reference_id}{?download}
Save a Reference, this can be done by either the
-
Referee - who would send the
referencecontent and optionally astatus -
Applicant - who would send the
token_sentvalue, which must be 7 days from the time the Referee was last reminded, OR could try touncancelacanceledreference by sending the status ofrequested
NOTE: Only one of token_sent or status can be sent by the Applicant on a single request
At the moment, the value of token_sent is irrelevant, any non-NULL value will trigger a Notification if enough time has passed since the last Notification to the Referee.
Example URI
- reference_id
number(required) Example: 1The ID of the Reference being fetched
- download
boolean(required) Example: trueIf
truea PDF is sent instead
Headers
Authorization: Bearer JWTTokenBody
{
"reference": {
"profile": {
"position": "Professor",
"organization": "Last Chance U",
"location": "Ottawa, ON",
"phone": "613"
},
"relationship": {
"faculty": true,
"preceptor": false,
"employer": true,
"other": true,
"other_description": "Other relationship value"
},
"known": "less_than_1_year",
"hours": "10",
"ratings": {
"independence": 1,
"problem_solving": 1,
"communication": 1,
"adpatability": 1,
"professionalism": 1,
"feedback": 1
},
"opportunity_for_improvement": "Lorem ipsum dolor sit amet",
"comments": "Lorem ipsum dolor sit amet",
"would_hire": true,
"would_hire_comments": "Lorem ipsum dolor sit amet"
},
"status": "requested",
"token_sent": "2017-04-17T21:24:23+00:00"
}Schema
{
"type": "object",
"properties": {
"reference": {
"type": "object",
"properties": {
"profile": {
"type": "object",
"properties": {
"position": {
"type": "string"
},
"organization": {
"type": "string"
},
"location": {
"type": "string"
},
"phone": {
"type": "string",
"description": "555-1212"
}
}
},
"relationship": {
"type": "object",
"properties": {
"faculty": {
"type": "boolean"
},
"preceptor": {
"type": "boolean"
},
"employer": {
"type": "boolean"
},
"other": {
"type": "boolean"
},
"other_description": {
"type": "string"
}
}
},
"known": {
"enum": [
"less_than_1_year",
"1_or_2_years",
"3_to_5_years",
"more_than_5_years",
"null"
]
},
"hours": {
"type": "string"
},
"ratings": {
"type": "object",
"properties": {
"independence": {
"type": "number"
},
"problem_solving": {
"type": "number"
},
"communication": {
"type": "number"
},
"adpatability": {
"type": "number"
},
"professionalism": {
"type": "number"
},
"feedback": {
"type": "number"
}
}
},
"opportunity_for_improvement": {
"type": "string"
},
"comments": {
"type": "string"
},
"would_hire": {
"type": "boolean"
},
"would_hire_comments": {
"type": "string"
}
}
},
"status": {
"enum": [
"requested",
"completed"
]
},
"token_sent": {
"type": "string"
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}200Headers
Content-Type: application/jsonBody
{
"message": "Retrieved References",
"errors": [],
"status": 200,
"data": {
"references": [
{
"id": 1,
"application_id": 1,
"referee_id": 96,
"request": "Nemo quis nihil accusantium voluptatem.",
"reference": {
"profile": {
"position": "Professor",
"organization": "Last Chance U",
"location": "Ottawa, ON",
"phone": "613"
},
"relationship": {
"faculty": true,
"preceptor": false,
"employer": true,
"other": true,
"other_description": "Other relationship value"
},
"known": "post-secondary",
"hours": "10",
"ratings": {
"independence": 1,
"problem_solving": 1,
"communication": 1,
"adpatability": 1,
"professionalism": 1,
"feedback": 1
},
"opportunity_for_improvement": "Lorem ipsum dolor sit amet",
"comments": "Lorem ipsum dolor sit amet",
"would_hire": true,
"would_hire_comments": "Lorem ipsum dolor sit amet"
},
"status": "requested",
"percent_complete": 100,
"valid_sections": {
"relationship": true,
"ratings": true,
"recommendations": true,
"your_info": true
},
"token_sent": "2017-08-23T17:12:18+00:00",
"token_resend": "2017-08-30T17:12:18+00:00",
"can_resend": false,
"link_login": "http://localhost:4200/referees/login",
"link_decline": "http://localhost:4200/referees/decline",
"created_at": "2017-08-08T17:13:50+00:00",
"updated_at": "2017-08-08T17:13:50+00:00",
"referee": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"references": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonReference Quick Decline ¶
Quick Decline ReferenceDELETE/api/references/decline
One-Click Decline a Reference.
Example URI
Body
{
"email": "someone@somewhere.com",
"token": "lksdhfhdfihahf2308748"
}Schema
{
"type": "object",
"properties": {
"email": {
"type": "string"
},
"token": {
"type": "string"
}
},
"required": [
"email",
"token"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}200Headers
Content-Type: application/jsonBody
{
"message": "Reference successfully declined",
"errors": [],
"status": 200,
"data": {}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonApplication References ¶
Get Application ReferencesGET/api/applications/{application_id}/references
Return the References for a specific Application
Example URI
- application_id
number(required) Example: 1The Application ID of the Application References being fetched
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Retrieved Application References",
"errors": [],
"status": 200,
"data": {
"references": [
{
"id": 1,
"application_id": 1,
"referee_id": 96,
"request": "Nemo quis nihil accusantium voluptatem.",
"reference": {
"profile": {
"position": "Professor",
"organization": "Last Chance U",
"location": "Ottawa, ON",
"phone": "613"
},
"relationship": {
"faculty": true,
"preceptor": false,
"employer": true,
"other": true,
"other_description": "Other relationship value"
},
"known": "post-secondary",
"hours": "10",
"ratings": {
"independence": 1,
"problem_solving": 1,
"communication": 1,
"adpatability": 1,
"professionalism": 1,
"feedback": 1
},
"opportunity_for_improvement": "Lorem ipsum dolor sit amet",
"comments": "Lorem ipsum dolor sit amet",
"would_hire": true,
"would_hire_comments": "Lorem ipsum dolor sit amet"
},
"status": "requested",
"percent_complete": 100,
"valid_sections": {
"relationship": true,
"ratings": true,
"recommendations": true,
"your_info": true
},
"token_sent": "2017-08-23T17:12:18+00:00",
"token_resend": "2017-08-30T17:12:18+00:00",
"can_resend": false,
"link_login": "http://localhost:4200/referees/login",
"link_decline": "http://localhost:4200/referees/decline",
"created_at": "2017-08-08T17:13:50+00:00",
"updated_at": "2017-08-08T17:13:50+00:00",
"referee": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"references": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonRequest Application ReferencePOST/api/applications/{application_id}/references
Request a Reference for an Application/Applicant
Example URI
- application_id
number(required) Example: 1The Application ID of the Application References being fetched
Headers
Authorization: Bearer JWTTokenBody
{
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@somewhere.com",
"request": "Please provide me with a reference!"
}Schema
{
"type": "object",
"properties": {
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"email": {
"type": "string"
},
"request": {
"type": "string"
}
},
"required": [
"first_name",
"last_name",
"email",
"request"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}200Headers
Content-Type: application/jsonBody
{
"message": "Retrieved Application References",
"errors": [],
"status": 200,
"data": {
"references": [
{
"id": 1,
"application_id": 1,
"referee_id": 96,
"request": "Nemo quis nihil accusantium voluptatem.",
"reference": {
"profile": {
"position": "Professor",
"organization": "Last Chance U",
"location": "Ottawa, ON",
"phone": "613"
},
"relationship": {
"faculty": true,
"preceptor": false,
"employer": true,
"other": true,
"other_description": "Other relationship value"
},
"known": "post-secondary",
"hours": "10",
"ratings": {
"independence": 1,
"problem_solving": 1,
"communication": 1,
"adpatability": 1,
"professionalism": 1,
"feedback": 1
},
"opportunity_for_improvement": "Lorem ipsum dolor sit amet",
"comments": "Lorem ipsum dolor sit amet",
"would_hire": true,
"would_hire_comments": "Lorem ipsum dolor sit amet"
},
"status": "requested",
"percent_complete": 100,
"valid_sections": {
"relationship": true,
"ratings": true,
"recommendations": true,
"your_info": true
},
"token_sent": "2017-08-23T17:12:18+00:00",
"token_resend": "2017-08-30T17:12:18+00:00",
"can_resend": false,
"link_login": "http://localhost:4200/referees/login",
"link_decline": "http://localhost:4200/referees/decline",
"created_at": "2017-08-08T17:13:50+00:00",
"updated_at": "2017-08-08T17:13:50+00:00",
"referee": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"references": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json422Headers
Content-Type: application/jsonBody
There can be many reasons to get this response, invalid parameters/data sent, but also the Application may be at the max number, or the proposed Referee may have already referred this application.500Headers
Content-Type: application/jsonPrograms ¶
Methods to deal with Programs
Programs ¶
Get ProgramsGET/api/programs
Return a list of Programs, only Applicants and Admins can do this
Example URI
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Retrieved Programs",
"errors": [],
"status": 200,
"data": {
"programs": [
{
"id": 1,
"name": "Mercy Hospital",
"address1": "123 Oak Street",
"address2": "Unit 101",
"organization": "MARSWorks Inc.",
"city": "Ottawa",
"state": "ON",
"country": "CA",
"postal_code": "K1T 1W6",
"phone": "6138606277 x. 203",
"url": "https://cshp.ca/programs/program",
"extra_uploads": "Please submit a nice cover letter and send it to us!",
"positions": 10,
"directors": [
{
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
],
"coordinators": [
{
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
],
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"programs": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonProgram ¶
Get ProgramGET/api/programs/{program_id}
Return a specific Program’s details, only Applicants and Admins can do this, or a Program User for this Program
Example URI
- program_id
number(required) Example: 1The Program ID of the details being fetched
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Retrieved Program",
"errors": [],
"status": 200,
"data": {
"programs": [
{
"id": 1,
"name": "Mercy Hospital",
"address1": "123 Oak Street",
"address2": "Unit 101",
"organization": "MARSWorks Inc.",
"city": "Ottawa",
"state": "ON",
"country": "CA",
"postal_code": "K1T 1W6",
"phone": "6138606277 x. 203",
"url": "https://cshp.ca/programs/program",
"extra_uploads": "Please submit a nice cover letter and send it to us!",
"positions": 10,
"directors": [
{
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
],
"coordinators": [
{
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
],
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"programs": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonUpdate ProgramPUT/api/programs/{program_id}
Update a Program - only a Director assigned to this Program, and an Admin can do this!
Example URI
- program_id
number(required) Example: 1The Program ID of the details being fetched
Headers
Authorization: Bearer JWTTokenBody
{
"name": "Hello, world!",
"address1": "Hello, world!",
"city": "Hello, world!",
"state": "Hello, world!",
"country": "Hello, world!",
"postal_code": "Hello, world!",
"phone": "Hello, world!",
"url": "Hello, world!",
"positions": 1,
"extra_uploads": "Hello, world!"
}Schema
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"address1": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"country": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"phone": {
"type": "string"
},
"url": {
"type": "string"
},
"positions": {
"type": "number",
"description": "Must be between 1 and 100"
},
"extra_uploads": {
"type": "string"
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}200Headers
Content-Type: application/jsonBody
{
"message": "Retrieved Program",
"errors": [],
"status": 200,
"data": {
"programs": [
{
"id": 1,
"name": "Mercy Hospital",
"address1": "123 Oak Street",
"address2": "Unit 101",
"organization": "MARSWorks Inc.",
"city": "Ottawa",
"state": "ON",
"country": "CA",
"postal_code": "K1T 1W6",
"phone": "6138606277 x. 203",
"url": "https://cshp.ca/programs/program",
"extra_uploads": "Please submit a nice cover letter and send it to us!",
"positions": 10,
"directors": [
{
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
],
"coordinators": [
{
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
],
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"programs": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonMember Programs ¶
Member's ProgramGET/api/users/{user_id}/programs
Return the list of Programs to which this user has been assigned
Example URI
- user_id
number(required) Example: 1The Member fetching a list of Programs
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Retrieved Programs for this Member",
"errors": [],
"status": 200,
"data": {
"programs": [
{
"id": 1,
"name": "Mercy Hospital",
"address1": "123 Oak Street",
"address2": "Unit 101",
"organization": "MARSWorks Inc.",
"city": "Ottawa",
"state": "ON",
"country": "CA",
"postal_code": "K1T 1W6",
"phone": "6138606277 x. 203",
"url": "https://cshp.ca/programs/program",
"extra_uploads": "Please submit a nice cover letter and send it to us!",
"positions": 10,
"directors": [
{
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
],
"coordinators": [
{
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
],
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"programs": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonPayments ¶
Methods to deal with Payments
Payments ¶
Get PaymentsGET/api/payments
Example URI
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Returned Payments",
"errors": [],
"status": 200,
"data": {
"payments": [
{
"id": 1,
"user_id": 1,
"application_id": 1,
"amount": 75,
"fee": 1.75,
"card_details": {
"brand": "Visa",
"last4": "1234",
"exp_year": 2019,
"exp_month": 11
},
"description": "PRAMS Registration Fee",
"charge_id: `ch_1AuXOqCb8oe0EMPlWFvPXgic`": "",
"created_at": "2017-04-17T21:24:23+00:00",
"payer": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"payments": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonApplication Payments ¶
Make PaymentPOST/api/applications/{application_id}/payments
Buy credits for Applying to Programs, or the BC Exception, or the initial Registration Fee.
If this is the initial Registration Fee…credits is ignored and set to the default value you get when you Register
email presumably comes from what they entered into the Stripe form?
token if they already have a Stripe Token saved in their record, this can be ommitted. Look for has_payment_token in the Applicant information returned with the Application.
Example URI
- application_id
number(required) Example: 1The Application ID of the Application being fetched
Headers
Authorization: Bearer JWTTokenBody
{
"email": "sean+applicant@marsworks.com",
"token": "tok_1AuXOqCb8oe0EMPlWFvPXgic",
"credits": 1,
"bc_exception": true
}Schema
{
"type": "object",
"properties": {
"email": {
"type": "string"
},
"token": {
"type": "string"
},
"credits": {
"type": "number"
},
"bc_exception": {
"type": "boolean"
}
},
"required": [
"email",
"credits",
"bc_exception"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}200Headers
Content-Type: application/jsonBody
{
"message": "Payment Successful",
"errors": [],
"status": 200,
"data": {
"applications": [
{
"id": 1,
"user_id": 1,
"application": {
"profile": {
"title": "Mr.",
"first_name": "Steve",
"last_name": "Rogers",
"former_last_name": "Johnston",
"preferred_name": "Smith",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"phone": "6138606277 x. 203",
"phone2": "6138606277",
"equity_seeking_group": "First Nations",
"equity_seeking_group_other": "Some other value",
"sharing_consent": true
},
"canadian_citizen": true,
"licensed": {
"status": true,
"expected_date": "2017-04-17T21:24:23+00:00"
},
"education": [
{
"school": "Carleton University",
"type": "post-secondary",
"program": "Bachelor of Commerce",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"achievement": "Certificate",
"transcript_id": 100
}
],
"pharmacy_education": {
"directed_studies": true,
"courses": [
{
"course": "Putting Pills into bottles",
"description": "Lorem ipsum dolor sit amet"
}
],
"experiential_placements": true,
"placements": [
{
"name": "MARSWorks Inc.",
"course_number": "42.101",
"facility_name": "Mercy Hospital",
"site_type": "Hospital Pharmacy",
"description": "Lorem ipsum dolor sit amet",
"length": "4 months",
"status": "complete",
"skill": "Lorem ipsum dolor sit amet"
}
]
},
"work_experience": [
{
"position": "Application Developer",
"organization": "MARSWorks Inc.",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"hours": "40 / week",
"supervisor": "John Doe",
"supervisor_phone": "613-555-1212",
"supervisor_email": "supervisor@somewhere.com",
"duties": "lorem ipsum"
}
],
"community_service": [
{
"position": "Application Developer",
"organization": "MARSWorks Inc.",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"hours": "40 / week",
"supervisor": "John Doe",
"supervisor_phone": "613-555-1212",
"supervisor_email": "supervisor@somewhere.com",
"duties": "lorem ipsum"
}
],
"leadership_experience": [
{
"position": "Application Developer",
"organization": "MARSWorks Inc.",
"address": {
"city": "Ottawa",
"state": "ON",
"country": "CA"
},
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"hours": "40 / week",
"supervisor": "John Doe",
"supervisor_phone": "613-555-1212",
"supervisor_email": "supervisor@somewhere.com",
"duties": "lorem ipsum"
}
],
"extracurricular": [
{
"name": "Choir",
"organization": "MARSWorks Inc.",
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"description": "lorem ipsum",
"hours": "4 / week"
}
],
"publications": "lorem ipsum",
"memberships": [
{
"start_date": "2010-09-01",
"end_date": "2013-04-30",
"description": "lorem ipsum"
}
],
"awards": [
{
"name": "Walkley Road Scholarship",
"description": "Lorem ipsum dolor sit amet",
"date": "2019-01-01"
}
],
"essay": "lorem ipsum"
},
"percent_completed": 100,
"credits": 8,
"paid": true,
"bc_exception_paid": false,
"empty_sections": {
"status": false,
"education": false,
"pharmacy_education": false,
"work experience": false,
"community service": false,
"leadership experience": false,
"essay": false
},
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00",
"applicant": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"applications": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}401Headers
Content-Type: application/json500Headers
Content-Type: application/jsonUtility ¶
Utility Methods to help with the app
Get App Phases ¶
Get PhasesGET/api/phases
Return a list of the key app Phase “End” times, along with the current “Phase” we’re actually in right now
Example URI
200Headers
Content-Type: application/jsonBody
{
"message": "Application Phases Returned",
"errors": [],
"status": 200,
"data": {
"phases": {
"application": "2017-10-16T00:00:00+00:00",
"rankings": "2018-01-08T00:00:00+00:00",
"match": "2018-03-31T00:00:00+00:00"
},
"current": "application",
"match_status: `not_started`": "tentative"
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"phases": {
"type": "object",
"properties": {
"application": {
"type": "string"
},
"rankings": {
"type": "string"
},
"match": {
"type": "string"
}
}
},
"current": {
"type": "string",
"description": "Possible values can also include `ranking` and `match`\nPossible values can also include `ranking` and `match`"
},
"match_status: `not_started`": {
"type": "string",
"enum": [
"tentative",
"complete"
]
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}500Headers
Content-Type: application/jsonGet Countries ¶
Get CountriesGET/api/countries
Return a list of the Countries we are using in this application for user Profiles
Example URI
200Headers
Content-Type: application/jsonBody
{
"message": "List of countries returned",
"errors": [],
"status": 200,
"data": {
"countries": [
{
"id": "CA",
"name": "Canada"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"countries": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}500Headers
Content-Type: application/jsonGet States ¶
Get Provinces or StatesGET/api/states/{country_id}
Return a list of the Provinces or States for a supplied Country, we are using in this application for user Profiles
Example URI
- country_id
string(required) Example: CAThe country for which you wish to see province/states
200Headers
Content-Type: application/jsonBody
{
"message": "List of states returned",
"errors": [],
"status": 200,
"data": {
"states": [
{
"id": "BC",
"name": "British Columbia"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"states": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}404Headers
Content-Type: application/json500Headers
Content-Type: application/jsonApp Stats ¶
Get App StatsGET/api/admin/stats
Return some stats to display on the Admin Dashboard
Example URI
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Retrieved Application Data",
"errors": [],
"status": 200,
"data": {
"applications": 486,
"applicantsComplete": 354,
"applicantsIncomplete": 132,
"applicantsByProvince": {
"CA": [
{
"id": "BC",
"count": 112
},
{
"id": "ON",
"count": 114
}
],
"US": [
{
"id": "NY",
"count": 1
}
]
},
"registrationPayments": 353,
"bcExceptionPayments": 180,
"creditsPurchased": 546,
"rankingTotals": [
{
"id": "1",
"count": 1
},
{
"id": "2",
"count": 5
}
],
"rankingsByProgramProvince": [
{
"id": "BC",
"count": 112
},
{
"id": "ON",
"count": 114
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"applications": {
"type": "number"
},
"applicantsComplete": {
"type": "number"
},
"applicantsIncomplete": {
"type": "number"
},
"applicantsByProvince": {
"type": "object",
"properties": {
"CA": {
"type": "array"
},
"US": {
"type": "array"
}
}
},
"registrationPayments": {
"type": "number"
},
"bcExceptionPayments": {
"type": "number"
},
"creditsPurchased": {
"type": "number"
},
"rankingTotals": {
"type": "array"
},
"rankingsByProgramProvince": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}404Headers
Content-Type: application/json500Headers
Content-Type: application/jsonMatch ¶
Retrieve the MatchGET/api/admin/match{?sort}
Retrieves the Match - may be empty if it hasn’t been run yet!
Example URI
- sort
string(required) Example: programSorts by
applicantby default, but byprogramif that value is provided
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Match Data Returned",
"errors": [],
"status": 200,
"data": {
"rankings": [
{
"id": 1,
"application_id": 1,
"program_id": 1,
"program_rank": 1,
"applicant_rank": 1,
"no_interview": false,
"status": "prematch",
"status_description": "Pre-Match",
"applicant": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
},
"program": {
"id": 1,
"name": "Mercy Hospital",
"address1": "123 Oak Street",
"address2": "Unit 101",
"organization": "MARSWorks Inc.",
"city": "Ottawa",
"state": "ON",
"country": "CA",
"postal_code": "K1T 1W6",
"phone": "6138606277 x. 203",
"url": "https://cshp.ca/programs/program",
"extra_uploads": "Please submit a nice cover letter and send it to us!",
"positions": 10,
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00"
}
}
],
"match_status: `not_started`": "tentative"
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"rankings": {
"type": "array"
},
"match_status: `not_started`": {
"type": "string",
"enum": [
"tentative",
"complete"
]
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}404Headers
Content-Type: application/json500Headers
Content-Type: application/jsonRun the MatchPOST/api/admin/match
Runs the Match - may just retrieve it if its already been run!
Example URI
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Match Data Returned",
"errors": [],
"status": 200,
"data": {
"rankings": [
{
"id": 1,
"application_id": 1,
"program_id": 1,
"program_rank": 1,
"applicant_rank": 1,
"no_interview": false,
"status": "prematch",
"status_description": "Pre-Match",
"applicant": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
},
"program": {
"id": 1,
"name": "Mercy Hospital",
"address1": "123 Oak Street",
"address2": "Unit 101",
"organization": "MARSWorks Inc.",
"city": "Ottawa",
"state": "ON",
"country": "CA",
"postal_code": "K1T 1W6",
"phone": "6138606277 x. 203",
"url": "https://cshp.ca/programs/program",
"extra_uploads": "Please submit a nice cover letter and send it to us!",
"positions": 10,
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00"
}
}
],
"match_status: `not_started`": "tentative"
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"rankings": {
"type": "array"
},
"match_status: `not_started`": {
"type": "string",
"enum": [
"tentative",
"complete"
]
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}404Headers
Content-Type: application/json500Headers
Content-Type: application/jsonReset the MatchDELETE/api/admin/match
Resets the Match
Example URI
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Match Reset",
"errors": [],
"status": 200,
"data": {
"match_status: `not_started`": "tentative"
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"match_status: `not_started`": {
"type": "string",
"enum": [
"tentative",
"complete"
]
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}404Headers
Content-Type: application/json500Headers
Content-Type: application/jsonMatch - Confirm ¶
Confirm the MatchGET/api/admin/match/confirm
The match must be in a tentative state, this confirms the match and ends the program for this year.
Example URI
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Match Data Returned",
"errors": [],
"status": 200,
"data": {
"rankings": [
{
"id": 1,
"application_id": 1,
"program_id": 1,
"program_rank": 1,
"applicant_rank": 1,
"no_interview": false,
"status": "prematch",
"status_description": "Pre-Match",
"applicant": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
},
"program": {
"id": 1,
"name": "Mercy Hospital",
"address1": "123 Oak Street",
"address2": "Unit 101",
"organization": "MARSWorks Inc.",
"city": "Ottawa",
"state": "ON",
"country": "CA",
"postal_code": "K1T 1W6",
"phone": "6138606277 x. 203",
"url": "https://cshp.ca/programs/program",
"extra_uploads": "Please submit a nice cover letter and send it to us!",
"positions": 10,
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"rankings": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}404Headers
Content-Type: application/json500Headers
Content-Type: application/jsonMatched Applications ¶
Matched ApplicationsGET/api/admin/matched/applications{?export}
A list of the Applications/Applicants without a match
Example URI
- export
string(required) Example: trueExports the names and email addresses to Excel if this is present
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Matched Applications Returned",
"errors": [],
"status": 200,
"data": {
"applications": [
{
"id": 1,
"user_id": 1,
"percent_completed": 100,
"references_completed": 2,
"rankings": 4,
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00",
"applicant": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"applications": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}404Headers
Content-Type: application/json500Headers
Content-Type: application/jsonUnmatched Applications ¶
Unmatched ApplicationsGET/api/admin/unmatched/applications{?export}
A list of the Applications/Applicants without a match
Example URI
- export
string(required) Example: trueExports the names and email addresses to Excel if this is present
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Unmatched Applications Returned",
"errors": [],
"status": 200,
"data": {
"applications": [
{
"id": 1,
"user_id": 1,
"percent_completed": 100,
"references_completed": 2,
"rankings": 4,
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00",
"applicant": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@marsworks.com",
"has_payment_token": false,
"created_at": "2017-04-17T21:24:23+00:00"
}
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"applications": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}404Headers
Content-Type: application/json500Headers
Content-Type: application/jsonUnmatched Programs ¶
Unmatched ProgramsGET/api/admin/unmatched/programs
A list of the Programs with 1 or more unfilled positions
Example URI
Headers
Authorization: Bearer JWTToken200Headers
Content-Type: application/jsonBody
{
"message": "Unmatched Programs Returned",
"errors": [],
"status": 200,
"data": {
"programs": [
{
"id": 1,
"name": "Mercy Hospital",
"address1": "123 Oak Street",
"address2": "Unit 101",
"organization": "MARSWorks Inc.",
"city": "Ottawa",
"state": "ON",
"country": "CA",
"postal_code": "K1T 1W6",
"phone": "6138606277 x. 203",
"url": "https://cshp.ca/programs/program",
"extra_uploads": "Please submit a nice cover letter and send it to us!",
"positions": 10,
"filled": 9,
"created_at": "2017-04-17T21:24:23+00:00",
"updated_at": "2017-04-17T21:24:23+00:00"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message for developers, not for display to App users"
},
"errors": {
"type": "array",
"description": "Localized error messages if any are relevant, to display to the App user"
},
"status": {
"type": "number",
"description": "HTTP Status code repeated here for some reason"
},
"data": {
"type": "object",
"properties": {
"programs": {
"type": "array"
}
},
"description": "Data and objects appropriate to the API call"
}
},
"required": [
"status"
]
}404Headers
Content-Type: application/json500Headers
Content-Type: application/json