Get form template
const url = 'https://sender.api.kivra.com/v2/tenant/example/form/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://sender.api.kivra.com/v2/tenant/example/form/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>'Given a tenant key and a form template key returns the form template that the tenant created.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The unique key for a tenant for whom the form template belongs to
The form template key associated with the form template
Responses
Section titled “Responses”Form template
object
The title of the form.
The purpose of the form.
The id of the first question in questions that will be asked to the user.
The questions that you want to ask the user.
object
The input type required to answer the question.
free_text is a string.
number is an integer.
options is a list of FormOption objects.
multi_options is a list of FormMultiOption objects.
verified_account is a string containing the IBAN of the account.
Human readable description of what the question is.
A key used to identify the question.
Provides the user with more information about the question.
The question id of the next question that the user will be asked.
If question is of type options then this value is overridden if next_question is present on the option that the user selects.
If next_question is not present on the question or option then this will be the last question that the user is asked.
When type is options then use this to specify the answers that the user can select.
object
A key used to identify the answer.
A human readable description of the answer.
The question id of the next question that the user will be asked.
This value overrides any potential next_question value on the question level.
If next_question is not present on the question or option then this will be the last question that the user is asked.
When type is multi_options then use this to specify the answers that the user can select.
object
A key used to identify the answer.
A human readable description of the answer.
When type is number then use this to specify the minimum (inclusive) value to accept in the response.
When type is multi_option then use this to specify the minimum number of options that the user can select.
When type is number then use this to specify the maximum (inclusive) value to accept in the response.
When type is multi_option then use this to specify the maximum number of options that the user can select.
The key of the newly created form template.
The date the form template was created.
The form template version
Example
{ "title": "Customer KYC", "description": "Your bank has some questions", "start_question": "number_deposits", "questions": [ { "label": "How many times per month do you deposit into your account?", "id": "number_deposits", "type": "number", "next_question": "largest_sum" }, { "label": "What is the largest amount deposited?", "id": "largest_sum", "type": "options", "options": [ { "id": "small", "label": "10000 - 20000" }, { "id": "medium", "label": "20000 - 30000" }, { "id": "large", "label": "30000 - 40000", "next_question": "source" } ], "next_question": "citizenship" }, { "label": "Select your country of citizenship", "id": "citizenship", "type": "multi_options", "options": [ { "id": "swe", "label": "Sweden" }, { "id": "no", "label": "Norway" }, { "id": "dk", "label": "Denmark" } ], "min": 1, "max": 2, "next_question": "comments" }, { "label": "What is the source of the deposit?", "id": "source", "type": "free_text", "next_question": "account" }, { "label": "Select your salary account", "id": "account", "type": "verified_account", "next_question": "comments" }, { "label": "Do you have any further comments?", "id": "comments", "type": "free_text", "help_text": "This can be any type of feedback that you have." } ], "key": "2877d684-a340-4e4c-867f-d93283787b01", "created_at": "2022-11-23T14:51:23.874434Z", "version": 1}Not authorized to make the request
Form template not found