Introduction
This guideline will help you to add a Form to an existing candidate using our API
First of all, make sure to create your candidate (check our Guideline if youβre not familiar with this process)
Process
1. Retrieve formId
:
- Link to the API documentation: Get Form Collection
- Use Postman to make a GET request for the Forms collection and obtain the
formId
from the received forms collection. Each received form has a propertyid
which should be used as theformId
when creating a candidate form.
2. Formulate the Relation:
- Combine the
candidateId
,formId
, and required actions to create thecandidateForm
relation.
3. Create the Relation via API:
- Link to the API documentation: Create Candidate Form
- Endpoint:
/candidate-forms
- Method: POST
- Request Body:
{
"candidateId": "your_candidate_id",
"formId": "your_form_id",
"actions": [
"complete",
"download"
],
"fileId": "your_file_id",
"signatureId": "your_signature_id",
"isMandatory": false,
"isPreliminary": false
}
Important Details
Required Fields:
candidateId
: The unique identifier for the candidate.
formId
: The unique identifier for the form.
actions
: An array of actions to be performed on the form
Optional Fields:
fileId
: If the form type is a file you can replace original attachment with a personal one
signatureId
: Required if the form requires a signature process. ThesignatureId
should be obtained from the signature flow documentation: Get Signature by ID. If the signature flow requires a candidate signature, you need to add theeSign
action inactions
.
isMandatory
: Boolean value to indicate if the form is mandatory for the candidate (default isfalse
).
isPreliminary
: Boolean value to indicate if the form should be displayed first when the candidate opens the Filebox v2 (only one form can haveisPreliminary
set totrue
).
Actions Based on Form Type:
- Form actions: At least one action is required. The allowable actions depend on the type of the original form.
- Link to Form Types: Form Types
- Link to Actions: Form Actions
Form Types and Allowable Actions:
- File, Readonly, and Combo types:
read
eSign
(only if the candidate is part of the signature flow)download
- Editable type:
complete
eSign
(only if the candidate is part of the signature flow)download
Steps in Detail
Retrieve formId
:
- Open Postman or any other API client.
- Make a GET request to the appropriate endpoint: Get Form Collection
- Identify and note down the
id
of the desired form from the received forms collection, and use thisid
as theformId
.
Create the Relation:
- Ensure you have the
candidateId
for the candidate you want to assign the form to.
- Combine
candidateId
,formId
, actions, and any additional properties for thecandidateForm
relation.
API Request to Relate Form:
- In Postman or any other API client, create a new POST request: Create Candidate Form
- Set the endpoint to
/candidate-forms
.
- In the request body, include the
candidateId
,formId
, actions, and other properties as shown in the example above.
Add Multiple Forms:
- Repeat the POST request for each additional form you need to relate to the candidate.
Example Usage
Request Body for First Form:
{
"candidateId": "d3ccc75a-7f76-41f8-9ddf-c61622c8e091",
"formId": "d3ccc75a-7f76-41f8-9ddf-c61622c8e091",
"actions": [
"complete",
"download"
],
"isMandatory": true,
"isPreliminary": true
}
Request Body for Second Form:
{
"candidateId": "d3ccc75a-7f76-41f8-9ddf-c61622c8e091",
"formId": "d3ccc75a-7f76-41f8-9ddf-c61622c8e092",
"actions": [
"read",
"download"
],
"fileId": "d3ccc75a-7f76-41f8-9ddf-c61622c8e092",
"signatureId": "d3ccc75a-7f76-41f8-9ddf-c61622c8e093"
}
Additional Notes
- Ensure that the parameters
candidateId
andformId
are correctly formatted and valid.
- Do not forget to include
actions
as it is a required field.
- The allowable actions depend on the form type. Refer to the form type and actions documentation links provided above.
- Use the
fileId
field if the form type is a file.
- Use the
signatureId
field if the form requires a signature process, and include theeSign
action for the candidate to go through the signature process.
- Set
isMandatory
totrue
if the candidate must complete the form.
- Only one form can have
isPreliminary
set totrue
to ensure it is displayed first when the candidate opens the filebox.
- You can add as many forms as needed to the candidate entity by repeating the POST request with different
formId
values.
By following these steps, you will be able to successfully relate forms to the candidate entity using the candidateForms
relation.
Β