As faturas dos cartões, com os pagamentos.
curl --request GET \
--url https://economy.synxbr.com/api/v1/card-invoices \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://economy.synxbr.com/api/v1/card-invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://economy.synxbr.com/api/v1/card-invoices"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://economy.synxbr.com/api/v1/card-invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"card": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"source": "registered",
"statement_month": "<string>",
"closing_date": "2023-12-25",
"due_date": "2023-12-25",
"due_date_estimated": true,
"status": "open",
"amount": "<string>",
"paid_amount": "<string>",
"open_amount": "<string>",
"closed_at": "2023-11-07T05:31:56Z",
"paid_at": "2023-11-07T05:31:56Z",
"payments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"paid_at": "2023-11-07T05:31:56Z",
"origin": "manual",
"statement_line": "linked",
"bank_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"status": "posted"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"meta": {
"request_id": "<string>",
"next_cursor": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}As faturas dos cartões, com os pagamentos.
open_amount é o que falta pagar. A fatura do cartão lido do banco (source: bank) vale pelo total informado pelo banco. O pagamento que veio do extrato da conta tem origin: bank_statement.
Permissão exigida: Visualizar cartões (cards.view).
GET
/
card-invoices
As faturas dos cartões, com os pagamentos.
curl --request GET \
--url https://economy.synxbr.com/api/v1/card-invoices \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://economy.synxbr.com/api/v1/card-invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://economy.synxbr.com/api/v1/card-invoices"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://economy.synxbr.com/api/v1/card-invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"card": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"source": "registered",
"statement_month": "<string>",
"closing_date": "2023-12-25",
"due_date": "2023-12-25",
"due_date_estimated": true,
"status": "open",
"amount": "<string>",
"paid_amount": "<string>",
"open_amount": "<string>",
"closed_at": "2023-11-07T05:31:56Z",
"paid_at": "2023-11-07T05:31:56Z",
"payments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"paid_at": "2023-11-07T05:31:56Z",
"origin": "manual",
"statement_line": "linked",
"bank_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"status": "posted"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"meta": {
"request_id": "<string>",
"next_cursor": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}