curl --request GET \
--url https://api.ugps.io/api/billing/invoices \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ugps.io/api/billing/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.ugps.io/api/billing/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.ugps.io/api/billing/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.ugps.io/api/billing/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.ugps.io/api/billing/invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ugps.io/api/billing/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{
"enabled": true,
"stale": true,
"page": 123,
"pageSize": 123,
"total": 123,
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"folio": "F33-10452",
"taxStatus": "pending",
"paymentStatus": "pending",
"netAmount": 250000,
"taxAmount": 47500,
"totalAmount": 297500,
"amountPaid": 0,
"issueDate": "2026-08-01",
"dueDate": "2026-08-11",
"creditNote": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"folio": "F61-212",
"issueDate": "2023-12-25"
}
}
]
}{
"error": "El email es requerido"
}{
"error": "Token inválido o expirado"
}{
"error": "No tiene permisos para realizar esta acción"
}{
"status": "failed",
"code": "PORTAL_UNAVAILABLE",
"message": "Facturación y Soporte no están disponibles en este momento",
"requestId": "<string>"
}Facturas publicadas de la empresa
Portal del cliente (Facturación). Proyección de las Invoice publicadas de Raúl para
la empresa del usuario en sesión; el backend resuelve el cliente por su propio
clientId y nunca acepta identificadores de Raúl. Ventana por defecto: últimos 12
meses. Orden: vencidas primero, luego por fecha de emisión descendente.
Requiere el permiso access_billing. Si la empresa no tiene vínculo comercial (o el
portal está apagado) responde enabled: false con lista vacía. Si Raúl no responde,
devuelve la última lectura correcta marcada stale: true o, sin caché, 503.
curl --request GET \
--url https://api.ugps.io/api/billing/invoices \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ugps.io/api/billing/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.ugps.io/api/billing/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.ugps.io/api/billing/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.ugps.io/api/billing/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.ugps.io/api/billing/invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ugps.io/api/billing/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{
"enabled": true,
"stale": true,
"page": 123,
"pageSize": 123,
"total": 123,
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"folio": "F33-10452",
"taxStatus": "pending",
"paymentStatus": "pending",
"netAmount": 250000,
"taxAmount": 47500,
"totalAmount": 297500,
"amountPaid": 0,
"issueDate": "2026-08-01",
"dueDate": "2026-08-11",
"creditNote": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"folio": "F61-212",
"issueDate": "2023-12-25"
}
}
]
}{
"error": "El email es requerido"
}{
"error": "Token inválido o expirado"
}{
"error": "No tiene permisos para realizar esta acción"
}{
"status": "failed",
"code": "PORTAL_UNAVAILABLE",
"message": "Facturación y Soporte no están disponibles en este momento",
"requestId": "<string>"
}Authorizations
Token de sesión Better Auth o API token (atk_...) en el header Authorization: Bearer <token>. Los JWT legacy ya no son válidos.
Query Parameters
Fecha de emisión mínima (YYYY-MM-DD). Por defecto, 12 meses atrás
Fecha de emisión máxima (YYYY-MM-DD)
x >= 11 <= x <= 100Response
Facturas de la empresa
false = portal apagado o empresa sin vínculo comercial («aún no habilitado»); la lista viene vacía y no es un error
true = Raúl no respondió y se devolvió la última lectura correcta (hasta 60 s)
Show child attributes
Show child attributes