Listar facturas
curl --request GET \
--url https://www.facture.ar/api/invoices \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://www.facture.ar/api/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.facture.ar/api/invoices"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.facture.ar/api/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 => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"invoices": [
{
"id": "<string>",
"userId": "<string>",
"cuitId": "<string>",
"environment": "production",
"amount": 1210,
"voucherNumber": 145,
"feCAEReq": {},
"status": "processing",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"ptoVta": 1,
"invoiceType": 11,
"feCabResp": {},
"errorMessage": "<string>",
"description": "<string>",
"issuedAt": "2023-11-07T05:31:56Z",
"origin": "facturear",
"voidedBy": "<string>",
"cuit": {
"number": "20123456789",
"persona": {}
}
}
],
"pagination": {
"page": 1,
"limit": 10,
"totalCount": 42,
"totalPages": 5,
"hasNextPage": true,
"hasPrevPage": true
}
}{
"type": "https://www.facture.ar/problems/invalid_request",
"title": "Bad Request",
"status": 400,
"detail": "<string>",
"code": "invalid_request",
"message": "<string>",
"resolution": "<string>",
"error": "<string>",
"details": "<unknown>",
"upgradeUrl": "<string>",
"creditNoteId": "<string>",
"batchId": "<string>"
}{
"type": "https://www.facture.ar/problems/invalid_request",
"title": "Bad Request",
"status": 400,
"detail": "<string>",
"code": "invalid_request",
"message": "<string>",
"resolution": "<string>",
"error": "<string>",
"details": "<unknown>",
"upgradeUrl": "<string>",
"creditNoteId": "<string>",
"batchId": "<string>"
}{
"type": "https://www.facture.ar/problems/invalid_request",
"title": "Bad Request",
"status": 400,
"detail": "<string>",
"code": "invalid_request",
"message": "<string>",
"resolution": "<string>",
"error": "<string>",
"details": "<unknown>",
"upgradeUrl": "<string>",
"creditNoteId": "<string>",
"batchId": "<string>"
}Facturas
Listar facturas
Las facturas de la cuenta en el entorno de la API key, de la más nueva a la más vieja. Los filtros se combinan (todos tienen que cumplirse).
GET
/
invoices
Listar facturas
curl --request GET \
--url https://www.facture.ar/api/invoices \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://www.facture.ar/api/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.facture.ar/api/invoices"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.facture.ar/api/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 => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"invoices": [
{
"id": "<string>",
"userId": "<string>",
"cuitId": "<string>",
"environment": "production",
"amount": 1210,
"voucherNumber": 145,
"feCAEReq": {},
"status": "processing",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"ptoVta": 1,
"invoiceType": 11,
"feCabResp": {},
"errorMessage": "<string>",
"description": "<string>",
"issuedAt": "2023-11-07T05:31:56Z",
"origin": "facturear",
"voidedBy": "<string>",
"cuit": {
"number": "20123456789",
"persona": {}
}
}
],
"pagination": {
"page": 1,
"limit": 10,
"totalCount": 42,
"totalPages": 5,
"hasNextPage": true,
"hasPrevPage": true
}
}{
"type": "https://www.facture.ar/problems/invalid_request",
"title": "Bad Request",
"status": 400,
"detail": "<string>",
"code": "invalid_request",
"message": "<string>",
"resolution": "<string>",
"error": "<string>",
"details": "<unknown>",
"upgradeUrl": "<string>",
"creditNoteId": "<string>",
"batchId": "<string>"
}{
"type": "https://www.facture.ar/problems/invalid_request",
"title": "Bad Request",
"status": 400,
"detail": "<string>",
"code": "invalid_request",
"message": "<string>",
"resolution": "<string>",
"error": "<string>",
"details": "<unknown>",
"upgradeUrl": "<string>",
"creditNoteId": "<string>",
"batchId": "<string>"
}{
"type": "https://www.facture.ar/problems/invalid_request",
"title": "Bad Request",
"status": 400,
"detail": "<string>",
"code": "invalid_request",
"message": "<string>",
"resolution": "<string>",
"error": "<string>",
"details": "<unknown>",
"upgradeUrl": "<string>",
"creditNoteId": "<string>",
"batchId": "<string>"
}Authorizations
API Key que generás en el panel (Desarrolladores > Claves API, https://www.facture.ar/app/api-keys) y mandás en el header x-api-key. Es la única credencial que acepta la API REST. Cada key tiene su entorno fijo: test_sk_... opera siempre en homologación y prod_sk_... en producción; el header x-environment se ignora.