Just Recruit will provide the username and password credentials to access the account.
Username - xxxx-xxxx-xxxx-xxxx
Password - xxxx-xxxx-xxxx-xxxx
AccountID - xxxx-xxxx-xxxx-xxxx
Authentication
Bearer Token authentication
Endpoint - https://api.justrecruit.co/auth/login
HTTP Verb – POST
Content-Type – application/json
Request - { username : xxxx-xxxx-xxxx-xxxx, password: xxxx-xxxx-xxxx-xxxx }
Response - { result: { token: 'token_string', refreshToken: 'refresh_token_string', expiry: '2019-01-01T00:00:00.0000000Z' }, statusCode: 200 }
Once a token is granted this must be used in the header of every subsequent request in Bear Token format. This token is valid for 7 days from the date of issue.
Bear Token authorisation header example – To be included in all below endpoints
{
Authorization: Bearer token_string
}
To refresh the current valid token, use the following endpoint.
Refresh Token
Endpoint – https://api.justrecruit.co/token/refresh
HTTP Verb – POST
Content-Type – application/json
Request - { refreshToken : 'refresh_token_string', }
Response - { result: { token: 'new_token_string', refreshToken: 'new_refresh_token_string', expiry: '2019-01-01T00:00:00.0000000Z' }, statusCode: 200 }
Jobs (returns JSON array)
Endpoint – https://api.justrecruit.co/jobs
HTTP Verb – GET
Content-Type – application/json
Querystring Params – q (string searches job title), city (string searches city), contractType (GUID searches contract type), page (int pages the list, zero bound), pageSize (int default 10, max 15)
Response - { result: [{ id: '', title: '', refNum: '', applyLimit: '', location: '', city: '' , county: '', intro: '', description: '', salary: '', contract: '', jobtype: '', canApply: '', startDate: '', endDate: '', publishedOn: '' }], page: 0, pageSize: 10, totalRecords: 2, statusCode: 200 }
Job (returns JSON singular)
Endpoint – https://api.justrecruit.co/job/{JobIDGuid}
HTTP Verb – GET
Content-Type – application/json
Response - { result: { id: '', title: '', refNum: '', applyLimit: '', location: '', city: '' , county: '', intro: '', description: '', salary: '', contract: '', jobtype: '', canApply: '', startDate: '', endDate: '', publishedOn: '' }, statusCode: 200 }
Applicants
Endpoint – https://api.justrecruit.co/apply/{JobIDGuid}
HTTP Verb – POST
Content-Type – application/x-www-form-urlencoded
Request – Firstname (string max length 200), Surname (string max length 200), Email (string max length 200), Phone (string max length 200), Html (string max length 4000), File (file upload)
Response - { result: 'You have successfully applied.', statusCode: 200 }
Response - { errors : [ 'Error One', 'Error Two' ] , statusCode: 200 }
Successful application will trigger alert emails to all consultants on the account who have got the “Email on Application” checkbox check within their profile settings.
Registrants
Endpoint – https://api.justrecruit.co/registrant/{AccountIDGuid}
HTTP Verb – POST
Content-Type – application/x-www-form-urlencoded
Request - Firstname (string max length 200), Surname (string max length 200), Email (string max length 200), Phone (string max length 200), Html (string max length 4000), File (file upload), AgreeTerms (bool)
Response - { result: 'You have successfully registered.', statusCode: 200 }
Response - { errors : [ 'Error One', 'Error Two' ] , statusCode: 200 }
Successful registrant will trigger alert emails to all consultants on the account who have got the “Email on Registrant” checkbox check within their profile settings and also to the account's global email address if one has been set.
Contract Types (returns JSON array)
Endpoint – https://api.justrecruit.co/contract-types/get
HTTP Verb – GET
Content-Type – application/json
Response - { result: [{ ID: xxxx-xxxx-xxxx-xxxx, title: 'My Contract Type' }] }, statusCode: 200 }
Note – The ID can used to filter the jobs with the “contractType“ querystring parameter, at this endpoint https://api.justrecruit.co/jobs
Status Codes
401 – Unauthorised - Something wrong with credentials
404 – Not found – Either endpoint or requested information does not exist
400 – Bad Request - Validation has been triggered – Applicants and Registrants
200 – OK - Success