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
formIdfrom the received forms collection. Each received form has a propertyidwhich should be used as theformIdwhen creating a candidate form.
2. Formulate the Relation:
- Combine the
candidateId,formId, and required actions to create thecandidateFormrelation.
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. ThesignatureIdshould be obtained from the signature flow documentation: Get Signature by ID. If the signature flow requires a candidate signature, you need to add theeSignaction 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 haveisPreliminaryset 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:
readeSign(only if the candidate is part of the signature flow)download
- Editable type:
completeeSign(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
idof the desired form from the received forms collection, and use thisidas theformId.
Create the Relation:
- Ensure you have the
candidateIdfor the candidate you want to assign the form to.
- Combine
candidateId,formId, actions, and any additional properties for thecandidateFormrelation.
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
candidateIdandformIdare correctly formatted and valid.
- Do not forget to include
actionsas 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
fileIdfield if the form type is a file.
- Use the
signatureIdfield if the form requires a signature process, and include theeSignaction for the candidate to go through the signature process.
- Set
isMandatorytotrueif the candidate must complete the form.
- Only one form can have
isPreliminaryset totrueto 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
formIdvalues.
By following these steps, you will be able to successfully relate forms to the candidate entity using the candidateForms relation.
