curl --request GET \
--url https://api.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/payment-links/reportimport requests
url = "https://api.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/payment-links/report"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/payment-links/report', 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.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/payment-links/report",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/payment-links/report"
req, _ := http.NewRequest("GET", url, nil)
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.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/payment-links/report")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/payment-links/report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>"{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "FORBIDDEN_PAYMENT_LINK",
"origin": "BILLING",
"message": "Forbidden"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "EXPORT_TOO_LARGE",
"origin": "BILLING",
"message": "This export is too large to generate in a single request. Narrow the filters (for example a shorter date range) and try again."
}Export payment links
Exports the payment links of your organization as a CSV or XLSX file.
curl --request GET \
--url https://api.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/payment-links/reportimport requests
url = "https://api.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/payment-links/report"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/payment-links/report', 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.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/payment-links/report",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/payment-links/report"
req, _ := http.NewRequest("GET", url, nil)
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.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/payment-links/report")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/payment-links/report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>"{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "FORBIDDEN_PAYMENT_LINK",
"origin": "BILLING",
"message": "Forbidden"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "EXPORT_TOO_LARGE",
"origin": "BILLING",
"message": "This export is too large to generate in a single request. Narrow the filters (for example a shorter date range) and try again."
}Identificador (the ID), Nome, Descrição, Status (Ativo, Desativado or Expirado), Produtos (each product as {"produto": <ID>, "quantidadae": <quantity>}, comma-separated), Data de expiração, Método de pagamento, Métodos de pagamento secundários, Primeiro pagamento, Numero de parcelas and Criado em. Dates are written as DD/MM/YYYY HH:mm in Brasília time. A link with no expiration date or no secondary payment methods reads Não disponível there, one with no description an empty Descrição, and one with no number of installments 0. When no link matches, the file has the header and one placeholder row: empty Identificador, Nome and Descrição, Numero de parcelas 0, and Não disponível in every other column.
?type=csv answers a UTF-8 CSV file; ?type=xlsx an Excel workbook, base64-encoded. An export is limited to 50,000 links and 4 MiB (a little less for a CSV with many quotes or line breaks): narrow the filters to export more. Only an admin of the organization, or of the realm, can export them.Path Parameters
ID of your realm.
Format: UUID
ID of your organization: the one that sells through the links.
Format: UUID
Query Parameters
File format: csv or xlsx.
csv, xlsx Only links whose name contains this text, ignoring case.
1 - 56Only links in these statuses. Omit it for every status.
Example (comma-separated list): ?status=ACTIVE,DEACTIVATED
ACTIVE, DEACTIVATED, EXPIRED Sort direction of the rows.
ASC, DESC Field the rows are sorted by.
name, createdAt Only links created on or after this moment: an ISO 8601 date (read as midnight UTC) or a date-time with an offset.
Only links created on or before this moment: an ISO 8601 date (read as midnight UTC) or a date-time with an offset.
Response
application/csv — The payment links as a UTF-8 CSV file, when type is csv.
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet — The Excel workbook, base64-encoded, when type is xlsx.
The payment links as a UTF-8 CSV file, when type is csv.