Listar Carnês
curl --request GET \
--url https://garu.com.br/api/v1/installment-plans \
--header 'Authorization: Bearer <token>'import requests
url = "https://garu.com.br/api/v1/installment-plans"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://garu.com.br/api/v1/installment-plans', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://garu.com.br/api/v1/installment-plans",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://garu.com.br/api/v1/installment-plans"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://garu.com.br/api/v1/installment-plans")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://garu.com.br/api/v1/installment-plans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyBoleto Parcelado (Carnê)
Listar Carnês
Lista os carnês da conta, com filtros e paginação
GET
/
api
/
v1
/
installment-plans
Listar Carnês
curl --request GET \
--url https://garu.com.br/api/v1/installment-plans \
--header 'Authorization: Bearer <token>'import requests
url = "https://garu.com.br/api/v1/installment-plans"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://garu.com.br/api/v1/installment-plans', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://garu.com.br/api/v1/installment-plans",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://garu.com.br/api/v1/installment-plans"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://garu.com.br/api/v1/installment-plans")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://garu.com.br/api/v1/installment-plans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyVisão Geral
Lista os carnês do vendedor autenticado, do mais recente para o mais antigo.dueFrom e dueTo filtram pelo vencimento da primeira parcela, que é o que identifica o carnê. Filtrar por qualquer parcela devolveria o mesmo carnê doze vezes.Exemplo
curl "https://garu.com.br/api/v1/installment-plans?status=active&status=defaulted&limit=50" \
-H "Authorization: Bearer sk_live_sua_chave"
const emRisco = await garu.installmentPlans.list({ status: 'defaulted' });
const doCliente = await garu.installmentPlans.list({
status: ['active', 'pending_activation'],
customerId: 4821
});
Parâmetros de Query
number
Página, padrão 1.
number
Itens por página, padrão 20, máximo 100.
string
Repita o parâmetro para aceitar vários. Valores:
pending_activation, active, completed, defaulted, canceled, refunded.number
Filtra por cliente.
string
Filtra pelo UUID do produto.
string
Primeira parcela vence a partir desta data (
YYYY-MM-DD).string
Primeira parcela vence até esta data (
YYYY-MM-DD).Resposta
{
"data": [ { "uuid": "e5d0d8fe-0000-4000-8000-000000000001", "status": "active", "installmentsPaid": 3 } ],
"count": 1,
"totalCount": 1,
"totalPages": 1
}
A lista não traz o array de parcelas. Use Detalhes do Carnê para isso.
Was this page helpful?