Get the consent resource
1 min
/consent/{id}
Get the consent resource
GET
https://api-sandbox.klavi.ai/payment/customer/v1/smart/consents/{id}
Path Parameters
- idstringrequiredDescription
Header Parameters
- AuthorizationstringrequiredDescription
Response
- idstringDescription
- appIdstringDescription
- clientRequestIdstringDescription
- institutionIdstringDescription
- customerobjectDescription
- identifierTypestringDescription
- identifierstringDescription
- namestringDescription
- phonestringDescription
- emailstringDescription
- loggedUserCpfstringDescription
- redirectURLstringDescription
- additionalInformationstringDescription
- debtorAccountobjectDescription
- ispbstringDescription
- issuerstringDescription
- numberstringDescription
- accountTypestringDescription
- creditorAccountobjectDescription
- ispbstringDescription
- issuerstringDescription
- numberstringDescription
- accountTypestringDescription
- holderobjectDescription
- identifierstringDescription
- namestringDescription
- identifierTypestringDescription
- paymentMethodstringDescription
- paymentMethodConfigobjectDescription
- contractIdstringDescription
- fixedAmountnumberDescription
- minimumVariableAmountnumberDescription
- maximumVariableAmountnumberDescription
- currencystringDescription
- intervalstringDescription
- referenceStartDatestringDescription
- contractDebtorobjectDescription
- identifierTypestringDescription
- identifierstringDescription
- namestringDescription
- isRetryAcceptedbooleanDescription
- useOverdraftLimitbooleanDescription
- firstPaymentobjectDescription
- idstringDescription
- clientRequestIdstringDescription
- remittanceInformationstringDescription
- datestringDescription
- amountstringDescription
- currencystringDescription
- externalInfoobjectDescription
- keystring
- expirationDateTimestringDescription
- statusstringDescription
- statusReasonobjectDescription
- codestringDescription
- messagestringDescription
- createAtstringDescription
- statusUpdateAtstringDescription
curl
curl --location --globoff 'https://api-sandbox.klavi.ai/payment/customer/v1/smart/consents/{id}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'nodejs
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{id}',
'headers': {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{id}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
import json
url = "https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{id}"
payload = {}
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{id}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
response = https.request(request)
puts response.read_body
200
{
"id": "fcb72e3a-b346-4f71-b044-971dc23232c9",
"appId": "0b59d801-08e0-4e84-9ecd-569f34e32279",
"clientRequestId": "fcb72e3a-b346-4f71-b044-dsndsnmnkdsmk",
"institutionId": "c8f0bf49-4744-4933-8960-7add6e590841",
"customer": {
"identifierType": "CPF",
"identifier": "76109277673",
"name": "João Silva",
"phone": "12345",
"email": "[email protected]"
},
"loggedUserCpf": "76109277673",
"redirectURL": "//close",
"additionalInformation": "Any description",
"debtorAccount": {
"ispb": "00000000",
"issuer": "0001",
"number": "324223",
"accountType": "CACC"
},
"creditorAccount": {
"ispb": "00000000",
"issuer": "0001",
"number": "324223",
"accountType": "CACC",
"holder": {
"identifier": "76109277673",
"name": "John Doe",
"identifierType": "CPF"
}
},
"paymentMethod": "SMART_PIX",
"paymentMethodConfig": {
"totalAllowedAmount": "5000.00",
"transactionLimit": "1000.00",
"periodicLimits": {
"day": {
"quantityLimit": 20,
"transactionLimit": "2000.00"
}
},
"startDateTime": "2026-10-29T08:00:00Z",
"useOverdraftLimit": false
},
"externalInfo": {
"key": "value"
},
"expirationDateTime": "2023-01-23T23:59:59",
"status": "CANCELED",
"statusReason": {
"code": "NAO_INFORMADO",
"message": "Erro não informado na iniciadora ou detentora de conta."
},
"createAt": "2023-01-23T14:17:06.45Z",
"statusUpdateAt": "2023-01-23T14:17:06.45Z"
}