Skip to content
Compliance Questionnaires

Resolve Questionnaire Link

Exchanges the token in a questionnaire link for questionnaire information and decides which page the Client opens. Compliance questionnaires such as customer due diligence are sent to the Client as links that carry a token. When the Broker App opens such a link, it calls this operation first and handles the result in this order:

  1. If questionnaire_state is 2, 3, 4, or 5 (final states), go to the result page.
  2. If unavailable or questionnaire_unavailable is true, show that the questionnaire is unavailable.
  3. If required is false, go to the result page.
  4. If template_source is custom, the server provides the questions; call GET /v1/kyc/questionnaire/token_exchange_questions to get them.
  5. Otherwise, it is a predefined template questionnaire and code identifies its type. If template_source is hardcoded, also confirm through POST /v1/account/get_popup_list that it is still pending.

Use the returned token in later requests; if none is returned, keep using the token from the link. If the request fails, tell the Client and allow a retry; do not treat it as an unavailable questionnaire.

When you call this operation through WhaleCore requestService(), you do not need to set requiresTradeToken to true.

GEThttps://api.lbkrs.com/v1/kyc/questionnaire/code_exchange

Parameters

tokenstringqueryRequired

token from the questionnaire link

Responses

HTTP 200The request succeeded. The response body contains the result of the “Resolve Questionnaire Link” operation.
Standard response envelopecodemessagedata
dataobjectdata structure
questionnaire_stateinteger

Questionnaire state:

  • 0 - No questionnaire record
  • 1 - Pending signature
  • 2 - Signing failed
  • 3 - Signed
  • 4 - Pending review
  • 5 - Withdrawn
Values
0
1
2
3
4
5
unavailableboolean

Whether the questionnaire entry is unavailable

questionnaire_unavailableboolean

Whether the questionnaire is unavailable. Same meaning as unavailable; if either is true, it is unavailable.

requiredboolean

Whether the Client needs to fill it in. false means no. Treat a missing value as required.

tokenstring

Questionnaire token to use in later requests

codestring

Type identifier of a predefined template questionnaire

template_sourcestring

Question source:

  • custom - Questions provided by the server
  • hardcoded - Predefined template
questionnaire_idobject

Questionnaire ID used when submitting. If it is not returned, use template_id.

template_idobject

Questionnaire template ID

Whale Docs