Create a Consent
2 min
consents
Create a consent by linkToken
POST
https://api-sandbox.klavi.ai/data/v1/consents
Header Parameters
- AuthorizationstringrequiredDescription
Body Parameters
- externalTrackIdstringrequiredDescription
- personalTaxIdstringrequiredDescription
- businessTaxIdstringDescription
- institutionCodestringrequiredDescription
- redirectURLstringrequiredDescription
- phonestringDescription
- emailstringDescription
- clientMetadataObjectDescription
- platformStringrequiredDescription
- osstringrequiredDescription
- osVersionstringDescription
- validityPeriodnumberrequiredDescription
Response
- consentIdstringDescription
- consentRedirectURLstringDescription
- expireAtstringDescription
curl
curl --location 'https://api-sandbox.klavi.ai/data/v1/consents' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"externalTrackId":"string","personalTaxId":"string","businessTaxId":"string","institutionCode":"string","redirectURL":"string","phone":"string","email":"string","validityPeriod":12}'200
{
"consentId": "0325412e-e566-4f4e-ac5b-2f4471586b88",
"consentRedirectURL": "https://auth.mockbank.poc.raidiam.io/auth?client_id=_uWJuSDGCWFQuNoKrJP0o&scope=openid%20consent%3Aurn%3Araidiambank%3A76bfad6b",
"expireAt": "2024-11-21T23:59:59Z"
}Parameter
redirectURL
The end-user completes authorization and returns to the client's page URL from the LGDP page.
- If authorization succeeds, the Klavi backend returns the redirectURL with the link_id , consent_id,external_info and external_track_id parameters
- If authorization fails, the Klavi backend returns the redirectURL with the link_id, consent_id, external_info , external_track_id ,error and error_description parameters