Listar faturas
curl --request GET \
--url https://api.pipo.health/v1/invoices \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pipo.health/v1/invoices"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pipo.health/v1/invoices', 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://api.pipo.health/v1/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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pipo.health/v1/invoices"
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://api.pipo.health/v1/invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pipo.health/v1/invoices")
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_body{
"result": [
{
"id": "inv-2024-01-000123",
"company-id": "123e4567-e89b-12d3-a456-426614174000",
"invoice-config-id": "456e7890-e89b-12d3-a456-426614174007",
"company-name": "Acme Corporation",
"carrier-name": "HealthCorp",
"invoice-config-name": "Plano Saúde Premium - Mensal",
"invoice-config-status": "active",
"amount": 1234560,
"due-date": "2024-02-10",
"reference-period-start": "2024-01-01",
"reference-period-end": "2024-01-31",
"invoice-status": "paid-and-pending",
"unique-member-count": 42,
"invoice-without-payment-slips": false,
"files": [
{
"file-id": "789e0123-e89b-12d3-a456-426614174008",
"name": "boleto-01.pdf",
"type": "payment-slip",
"payment-slip-code": "34191.79001 01043.510047 91020.150008 1 96610000123456",
"payment-slip-due-date": "2024-02-10",
"status": "paid"
}
]
}
],
"pagination": {
"current-page": 1,
"total-items": 1,
"total-pages": 1,
"next-page": null,
"previous-page": null
}
}{
"error": "Invalid date filter: 'until-dt' must be greater than 'from-dt'"
}Listar faturas
Lista as faturas de todas as empresas às quais o cliente tem acesso. Quando nenhum filtro de data é informado, retorna por padrão as faturas com período de referência a partir dos últimos 3 meses, sem limite superior (inclui períodos futuros).
GET
/
v1
/
invoices
Listar faturas
curl --request GET \
--url https://api.pipo.health/v1/invoices \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pipo.health/v1/invoices"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pipo.health/v1/invoices', 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://api.pipo.health/v1/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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pipo.health/v1/invoices"
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://api.pipo.health/v1/invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pipo.health/v1/invoices")
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_body{
"result": [
{
"id": "inv-2024-01-000123",
"company-id": "123e4567-e89b-12d3-a456-426614174000",
"invoice-config-id": "456e7890-e89b-12d3-a456-426614174007",
"company-name": "Acme Corporation",
"carrier-name": "HealthCorp",
"invoice-config-name": "Plano Saúde Premium - Mensal",
"invoice-config-status": "active",
"amount": 1234560,
"due-date": "2024-02-10",
"reference-period-start": "2024-01-01",
"reference-period-end": "2024-01-31",
"invoice-status": "paid-and-pending",
"unique-member-count": 42,
"invoice-without-payment-slips": false,
"files": [
{
"file-id": "789e0123-e89b-12d3-a456-426614174008",
"name": "boleto-01.pdf",
"type": "payment-slip",
"payment-slip-code": "34191.79001 01043.510047 91020.150008 1 96610000123456",
"payment-slip-due-date": "2024-02-10",
"status": "paid"
}
]
}
],
"pagination": {
"current-page": 1,
"total-items": 1,
"total-pages": 1,
"next-page": null,
"previous-page": null
}
}{
"error": "Invalid date filter: 'until-dt' must be greater than 'from-dt'"
}Authorizations
Token Bearer obtido em POST /v1/authenticate.
Query Parameters
Data inicial do filtro (ISO 8601, YYYY-MM-DD).
Data final do filtro (ISO 8601, YYYY-MM-DD). Deve ser maior que from-dt.
Filtra as faturas pelo status agregado de pagamento.
Status agregado de pagamento da fatura. information-unavailable indica que o status do(s)
boleto(s) não está disponível para vencimentos anteriores a 2026-05-01 ou sem data de
vencimento.
Available options:
all-paid, paid-and-pending, paid-pending-and-overdue, all-pending, all-overdue, pending-and-overdue, paid-and-overdue, information-unavailable, other Número da página (padrão 1).
Required range:
x >= 1Quantidade de itens por página (padrão 20).
Required range:
x >= 1