API Documentation

A simple RESTful JSON web API to create and manage A2E assessments.

Your Access Token (or API Key) is available in the Account Administration section.

Create an Assessment

URL:

https://www.assess2educate.com/v2/assessments

HTTP Method:

POST

Parameters:

access_token
Your Access Token (or API Key)
type
Assessment Type (belongs to your Organisation)
candidate_id
Candidate ID
name
Name
email
Email

Successful response:

HTTP Code:

200 OK

Content:

{"assessment":{"token":"qRddQPQ8oQTohTxxh4fXSTXC","stage":null,"rating":"N/A", "probability":"N/A","completed_at":null,"created_at":"2017-04-13T05:56:36.635Z","updated_at":"2017-04-13T05:56:36.635Z","organisation_credit_balance":999}}
Error responses:

HTTP Code:

401 Unauthorized

Content:

nil
Sample cURL code:
curl -H "Content-Type: application/json" -X POST --data '{"access_token": "ND1sSWNNmXgut8u2P7W6wwby","type":"Education"}' "https://www.assess2educate.com/v2/assessments"

View an Assessment

URL:

https://www.assess2educate.com/v2/assessments/{token}

HTTP Method:

GET

Parameters:

token
The unique assessment token
access_token
Your Access Token (or API Key)

Successful response:

HTTP Code:

200 OK

Content:

{"assessment":{"token":"qRddQPQ8oQTohTxxh4fXSTXC","stage":null,"rating":"N/A", "probability":"N/A","completed_at":null,"created_at":"2017-04-13T05:56:36.635Z","updated_at":"2017-04-13T05:56:36.635Z","organisation_credit_balance":999}}
Error responses:

HTTP Code:

401 Unauthorized

Content:

nil

HTTP Code:

404 Not Found

Content:

{"error":"RecordNotFound"}
Sample cURL code:
curl -H "Content-Type: application/json" -X GET --data '{"access_token": "ND1sSWNNmXgut8u2P7W6wwby"}' "https://www.assess2educate.com/v2/assessments/qRddQPQ8oQTohTxxh4fXSTXC"

Retrieve Assessments

URL:

https://www.assess2educate.com/v2/assessments/?created_at[from]={from_date}&created_at[to]={to_date}

HTTP Method:

GET

Parameters:

created_at[from]
From Date. e.g: "2018-01-01"
created_at[to]
To Date. e.g: "2018-01-31"
completed_at[from]
From Date. e.g: "2018-01-01"
completed_at[to]
To Date. e.g: "2018-01-31"
per_page
Return results per request. e.g: 5 (optional)
page
Return results page per request. e.g: 1 (optional)
access_token
Your Access Token (or API Key). e.g: "MQvCGNFqxWeURhtHRt43ySa0"

Successful response:

HTTP Code:

200 OK

Content:

{"assessments":[{"token":"NJNMHCoapsdfdisi9A7oYtA5","stage":"Action","rating":"N/A","probability":"20%","completed_at":"2018-02-08T00:00:00.000+11:00","created_at":"2018-02-08T00:00:00.000+11:00","updated_at":"2018-02-09T18:55:22.451+11:00","organisation_credit_balance":999}]}

Error responses:

HTTP Code:

401 Unauthorized

Content:

nil
Sample cURL code:
curl -H "Content-Type: application/json" -X GET --data '{"access_token": "ND1sSWNNmXgut8u2P7W6wwby", "per_page": 10, "created_at": { "from": "2017-01-01", "to": "2018-01-01"}}' "https://www.assess2educate.com/v2/assessments"
curl -H "Content-Type: application/json" -X GET --data '{"access_token": "ND1sSWNNmXgut8u2P7W6wwby", "per_page": 10, "completed_at": { "from": "2017-01-01", "to": "2018-01-01"}}' "https://www.assess2educate.com/v2/assessments"

Assessment Callbacks

When an assessment is completed we will send an immediate callback to the URL nominated for your organistation during setup.

The callback content is the finished assessment record encrypted as a JSON Web Token.

Content:

{"jwt":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhc3Nlc3NtZW50Ijp7InRva2VuIjoiWXlURDVMSmNFa0NjYVNyTjVIdFoyem1LIiwic3RhZ2UiOiJVbnJlZmxlY3RpdmVBY3Rpb24iLCJyYXRpbmciOiJTaWx2ZXIiLCJjb21wbGV0ZWRfYXQiOiIyMDE3LTAzLTAzIDAzOjI3OjAyIFVUQyIsImNyZWF0ZWRfYXQiOiIyMDE3LTAzLTAzIDAzOjI2OjI4IFVUQyIsInVwZGF0ZWRfYXQiOiIyMDE3LTAzLTAzIDAzOjI3OjAyIFVUQyIsIm9yZ2FuaXNhdGlvbl9jcmVkaXRfYmFsYW5jZSI6OTk5OTk5MX19.iv6auvL7pRzSHcUcLV0I3Z_caAllVSxLQG16l0KDrX4"}

The JSON Web Token can be validated using your Access Token and the HS256 algorithm.

Sample Ruby Code:

# using https://github.com/jwt/ruby-jwt
require 'jwt'
JWT.decode(params[:jwt], ENV['A2E_API_KEY'], true, { algorithm: 'HS256' })
=> [{"assessment"=>{"token"=>"YyTD5LJcEkCcaSrN5HtZ2zmK", "stage"=>"UnauthenticAction", "rating"=>"Silver", "probability"=>"N/A", "completed_at"=>"2017-03-03 03:27:02 UTC", "created_at"=>"2017-03-03 03:26:28 UTC", "updated_at"=>"2017-03-03 03:27:02 UTC", "organisation_credit_balance"=>9999991}}, {"typ"=>"JWT", "alg"=>"HS256"}]

View Your Organisation

URL:

https://www.assess2educate.com/v2/organisation

HTTP Method:

GET

Parameters:

access_token
The unique organisation access token

Successful response:

HTTP Code:

200 OK

Content:

{"organisation":{"name":"Master","credit_count":100,"callback_url":"","assessment_types":["Workers Compensation","PaTH"],"created_at":"2018-04-09T16:26:55.102+10:00","updated_at":"2018-04-12T14:12:30.973+10:00"}}%
Error responses:

HTTP Code:

401 Unauthorized

Content:

nil
Sample cURL code:
curl -H "Content-Type: application/json" -X GET --data '{"access_token": "ND1sSWNNmXgut8u2P7W6wwby"}' "https://www.assess2educate.com/v2/organisation"

Download Coaching Guide

Coaching Guide is available when an assessment is completed.

URL:

https://www.assess2educate.com/v2/assessments/{token}/coaching_guide

HTTP Method:

GET

Parameters:

token
The unique assessment token
access_token
Your Access Token (or API Key)

Successful response:

HTTP Code:

200 OK

Content:

{"path":"coaching_guide_path","error":""}
Error responses:

HTTP Code:

401 Unauthorized

Content:

nil

HTTP Code:

404 Not Found

Content:

{"path":"","error":"Coaching Guide is not available"}
Sample cURL code:
curl -H "Content-Type: application/json" -X GET --data '{"access_token": "ND1sSWNNmXgut8u2P7W6wwby"}' "https://www.assess2educate.com/v2/assessments/qRddQPQ8oQTohTxxh4fXSTXC/coaching_guide"