Get the consent status
1 min
/consent/{id}/status
Get the consent status
GET
https://api-sandbox.klavi.ai/payment/customer/v1/smart/consents/{id}/status
Path Parameters
- idstringrequiredDescription
Header Parameters
- AuthorizationstringrequiredDescription
Response
- idstringDescription
- clientRequestIdstringDescription
- statusstringDescription
- statusReasonobjectDescription
- codestringDescription
- messagestringDescription
- statusUpdateAtstringDescription
curl
curl --location --globoff 'https://api-sandbox.klavi.ai/payment/customer/v1/smart/consents/{id}/status' \
--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}/status',
'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}/status", 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}/status"
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}/status")
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": "cfa45795-fe16-48e2-a372-130e30a72606",
"clientRequestId": "1a3s2aebe29s2",
"status": "CONSENT_AUTHORIED",
"statusReason": {
"code": "NAO_INFORMADO",
"message": "Erro não informado na iniciadora ou detentora de conta." // Required
},
"statusUpdateAt": "2022-09-23T03:39:43.737Z"
}