Get form response
const url = 'https://sender.api.kivra.com/v2/tenant/example/form/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/responses/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/responses/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>'Only the client that created the form template associated with the response can call this endpoint.
Given a tenant key, form template key and form response key returns the form response submitted by a user.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The unique key for a tenant for whom the form response belongs to.
The form template key associated with the form template.
The form response key associated with the form response.
Responses
Section titled “Responses”Form response
object
The form response key
The form template key.
The form response that the user submitted.
object
A key used to identify the question.
The response to the question.
object
Account information for verified account
object
User’s account number.
Name of the bank the account belongs to.
The number used for the identification of financial institutions.
The input type required to answer the question.
free_text is a string.
number is an integer.
options can be a string or an integer.
multi_options is a list of options.
verified_account an object containing account information.
Used to identify the user that answered the form
object
How the user that answered the form was identified.
Represents a value used to identify a user e.g. ssn or email.
How the user that submitted the form logged into Kivra
When Kivra received a response to the form
Provided reference data in content sendout is included in the form response.
object
Example
{ "form_response_key": "2877d684-a340-4e4c-867f-d93283787b01", "form_template_key": "2877d684-a340-4e4c-867f-d93283787b01", "response": [ [ { "id": "number_deposits", "value": 1, "type": "number" }, { "id": "largest_sum", "value": "small", "type": "options" }, { "id": "comments", "value": "No further comments", "type": "free_text" }, { "id": "account", "type": "verified_account", "value": { "account_number": "1234-5678", "bank_name": "Bank", "clearing_number": "1234" } }, { "id": "citizenship", "type": "multi_options", "value": [ "Swedish", "German" ] } ] ], "matched_by": { "type": "ssn", "value": 199202286837 }, "login_method": "bankid", "responded_at": "2023-08-22T12:39:29.000000Z", "sender_reference": { "internal_id": "6eb7d1b9-ccd6-408f-ade7-9a1837be3ecf" }}Can’t process the request. Likely due to a client error.
Not authorized to make the request
Forbidden from accessing the form response keys
Either the form template associated with the given formTemplateKey does not exist or the form response associated with the given responseKey does not exist.