Get all orders from an consent
1 min
Get all orders from an consent
Returns the paged list of the orders created through the given automatic PIX consent
GET
https://api-sandbox.klavi.ai/payment/management/v1/merchants/automatic/{appId}/consents/{consentId}/orders
Path Parameters
- appIdstringrequiredDescription
- consentIdstringrequiredDescription
Query Parameters
- startDatestringDescription
- endDatestringDescription
- pageSizestringDescription
- cursorstringDescription
Header Parameters
- AuthorizationstringrequiredDescription
Response
- dataobject
- idstring
- appIdstringDescription
- clientRequestIdstringDescription
- institutionIdstringDescription
- customerobjectDescription
- identifierTypestringDescription
- identifierstringDescription
- namestringDescription
- phonestringDescription
- emailstringDescription
- datestringDescription
- consentIdstringDescription
- endToEndIdstringDescription
- ibgeTownCodestringDescription
- amountstringDescription
- currencystringDescription
- remittanceInformationstringDescription
- debtorAccountobjectDescription
- ispbstringDescription
- issuerstringDescription
- numberstringDescription
- accountTypestringDescription
- creditorAccountobject
- ispbstringDescription
- issuerstringDescription
- numberstringDescription
- accountTypestringDescription
- holderobjectDescription
- identifierstringDescription
- identifierTypestringDescription
- namestringDescription
- externalInfoobjectDescription
- cancellationobjectDescription
- cancelledFromstringDescription
- cancelledAtstringDescription
- cancelledByobjectDescription
- identifierstringDescription
- identifierTypestringDescription
- statusstringDescription
- statusReasonobjectDescription
- codestringDescription
- messagestringDescription
- createAtstringDescription
- statusUpdateAtstringDescription
- firstPaymentbooleanDescription
- originalPaymentIdstringDescription
- paymentReferencestring
- pagingobject
- nextCursorstring
- prevCursorstring
- hasNextstring
- hasPrevstring
curl
curl --location --globoff 'https://api-sandbox.klavi.ai/payment/management/v1/merchants/automatic/{appId}/consents/{consentId}/orders' \
--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/management/v1/merchants/automatic/{appId}/consents/{consentId}/orders',
'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/management/v1/merchants/automatic/{appId}/consents/{consentId}/orders", 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/management/v1/merchants/automatic/{appId}/consents/{consentId}/orders"
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/management/v1/merchants/automatic/{appId}/consents/{consentId}/orders")
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
{
"data": [
{
"id": "bd4de72f-550b-421b-ba5c-28190e754d58",
"appId": "ax2regress",
"clientRequestId": "retry15",
"institutionId": "c8f0bf49-4744-4933-8960-7add6e590841",
"customer": {
"identifierType": "CPF",
"identifier": "***.092.776-**",
"name": "Kbms 10086",
"phone": "12*******00",
"email": "q***@klavi.ai"
},
"date": "2025-09-08",
"consentId": "17d9d5be-073f-4706-86d4-8fdd36b90aed",
"endToEndId": "E4445979920250908132600000000005",
"ibgeTownCode": "",
"amount": "90.1200",
"currency": "BRL",
"remittanceInformation": "batata",
"debtorAccount": {
"ispb": "",
"issuer": "",
"number": "",
"accountType": ""
},
"creditorAccount": {
"ispb": "00000000",
"issuer": "****",
"number": "******",
"accountType": "CACC",
"holder": {
"identifier": "**.***.708/0001-**",
"identifierType": "CNPJ",
"name": "John Doe"
}
},
"externalInfo": {
"batata": "batata"
},
"cancellation": {
"cancelledFrom": "",
"cancelledAt": "",
"cancelledBy": {
"identifier": "",
"identifierType": ""
}
},
"status": "PAYMENT_REJECTED",
"statusReason": {
"code": "UNKNOWN",
"message": "unknown server error"
},
"createAt": "2025-09-07T22:26:14Z",
"statusUpdateAt": "2025-09-07T22:26:48Z",
"firstPayment": false,
"originalPaymentId": "6aef77ea-f4e1-44c2-92af-f5cda0413154",
"paymentReference": "03-09-2025/P1M"
}
],
"paging": {
"nextCursor": "XX3tSz4UQ9c70Kuy63wUtKL8JJdY-MPgS6e4dgr6PQ3eXHXGalTDvpRDqPb7HlnVceMtez3ctA3Td-ncikHTXw",
"prevCursor": "",
"hasNext": true,
"hasPrev": false
}
}