Questionnaires
Xref reference checks are based on customised questionnaires, which are answered by referees in order to provide feedback on a candidate.
The API provides details of the questionnaires that you, or other users in your company, have created.
List Questionnaires
|
|
| Method |
GET |
| Path |
/questionnaires{?search}{?limit}{?page} |
This endpoint returns the list of active questionnaires that you and other users in your company can choose from when requesting a reference check.
The pages attribute in the response allows you to link to the current, previous and next pages of the list of questionnaires.
Request
Authorization: Bearer YOUR_JWT_TOKEN_HERE
Content-Type: application/json
Parameters
| Name |
Example / default |
Required |
Type |
Description |
search |
"" |
No |
string |
Filter the list of items by searching on title. Default: "" |
limit |
20 |
No |
integer |
Limit the list of items to a certain number. Defaults to 20, maximum can be 100. Default: 20 |
page |
1 |
No |
integer |
The page number in the list of items. Default: 1 |
Response
200 — application/json
{
"pages": {
"total": 5,
"links": {
"this": "/questionnaires",
"prev": "",
"next": "/questionnaires?search=""&&limit=20&page=2"
}
},
"data": [
{
"id": 100,
"title": "Management Questionnaire",
"questions": [
{"title": "How is the candidate's attention to detail?"},
{"title": "How is the candidate's punctuality?"},
],
"url": "/questionnaire/101"
},
{
"id": 101,
"title": "Marketing Questionnaire",
"questions": [
{"title": "How is the candidate's attention to detail?"},
{"title": "How is the candidate's punctuality?"},
],
"url": "/questionnaire/101"
},
]
}
401 — application/json
{
"detail": "Authentication credentials were not provided."
}
403
Questionnaire Operations
Retrieve a Questionnaire
|
|
| Method |
GET |
| Path |
/questionnaire/{id} |
This endpoint returns the title and the list of questions included in a questionnaire.
It returns a 404 response if the questionnaire is not found, and a 403 response if the requesting user does not have the permissions required to view the questionnaire.
Request
Authorization: Bearer YOUR_JWT_TOKEN_HERE
Content-Type: application/json
Parameters
| Name |
Example / default |
Required |
Type |
Description |
id |
1000 |
Yes |
number |
A unique identifier of the questionnaire |
Response
200 — application/json
Attributes (object)
| Attribute | Type | Description |
id | number | ID of the questionnaire |
title | string | Title of the questionnaire |
questions | array | List of questions for this questionnaire |
question | object | |
title | string | Title of the question |
url | string | API endpoint to retrieve this questionnaire |
Body
{
"id": 1000,
"title": "Xref Standard",
"questions": [
{"title": "How is the candidate's attention to detail?"},
{"title": "How is the candidate's punctuality?"}
],
"url": "/questionnaire/1000"
}
404
401 — application/json
{
"detail": "Authentication credentials were not provided."
}
403
Deactivate a Questionnaire
|
|
| Method |
DELETE |
| Path |
/questionnaire/{id} |
A questionnaire can only be deactivated if the requesting user has permission to edit it.
This endpoint returns a 404 response if the questionnaire is not found, and a 403 response if the requesting user does not have the permissions required to edit it.
Once a questionnaire is deactivated, this endpoint will return a 200 response.
Request
Authorization: Bearer YOUR_JWT_TOKEN_HERE
Content-Type: application/json
Parameters
| Name |
Example / default |
Required |
Type |
Description |
id |
1000 |
Yes |
number |
A unique identifier of the questionnaire. |
Response
200 — application/json
{
"detail": "Questionnaire has been deleted"
}
400 — application/json
{
"detail": "Error",
"message": "Some error message"
}
404
403