Listar borradores
curl --request GET \
--url https://www.facture.ar/api/documents/drafts \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://www.facture.ar/api/documents/drafts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.facture.ar/api/documents/drafts"
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/documents/drafts",
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;
}{
"drafts": [
{
"id": "<string>",
"status": "extracting",
"mode": "manual",
"source": "upload",
"sourceRef": "<string>",
"fileName": "<string>",
"mimeType": "<string>",
"hasFile": true,
"templateId": "<string>",
"templateName": "<string>",
"cuitId": "<string>",
"ptoVta": 123,
"environment": "production",
"data": {
"lines": [
{
"description": "<string>",
"unitPrice": 1,
"quantity": 1,
"ivaRate": 21
}
],
"receiver": {
"name": "<string>",
"docType": "<string>",
"docNumber": "<string>",
"condicionIva": 123,
"email": "jsmith@example.com",
"address": "<string>"
},
"concepto": 1,
"serviceFrom": "2023-12-25",
"serviceTo": "2023-12-25",
"paymentDue": "2023-12-25",
"pricesIncludeIva": true,
"documentTotal": 123,
"currency": "ARS",
"documentDate": "2023-12-25",
"reference": "<string>",
"description": "<string>"
},
"total": 123,
"voucherLetter": "A",
"confidence": 123,
"issues": [
{
"code": "no_cuit",
"message": "<string>"
}
],
"errorMessage": "<string>",
"invoice": {
"id": "<string>",
"voucherNumber": 123,
"ptoVta": 123,
"invoiceType": 123,
"status": "<string>",
"amount": 123
},
"emailStatus": "<string>",
"url": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}Borradores
Listar borradores
Los borradores del entorno de la API key, los más nuevos primero.
GET
/
documents
/
drafts
Listar borradores
curl --request GET \
--url https://www.facture.ar/api/documents/drafts \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://www.facture.ar/api/documents/drafts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.facture.ar/api/documents/drafts"
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/documents/drafts",
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;
}{
"drafts": [
{
"id": "<string>",
"status": "extracting",
"mode": "manual",
"source": "upload",
"sourceRef": "<string>",
"fileName": "<string>",
"mimeType": "<string>",
"hasFile": true,
"templateId": "<string>",
"templateName": "<string>",
"cuitId": "<string>",
"ptoVta": 123,
"environment": "production",
"data": {
"lines": [
{
"description": "<string>",
"unitPrice": 1,
"quantity": 1,
"ivaRate": 21
}
],
"receiver": {
"name": "<string>",
"docType": "<string>",
"docNumber": "<string>",
"condicionIva": 123,
"email": "jsmith@example.com",
"address": "<string>"
},
"concepto": 1,
"serviceFrom": "2023-12-25",
"serviceTo": "2023-12-25",
"paymentDue": "2023-12-25",
"pricesIncludeIva": true,
"documentTotal": 123,
"currency": "ARS",
"documentDate": "2023-12-25",
"reference": "<string>",
"description": "<string>"
},
"total": 123,
"voucherLetter": "A",
"confidence": 123,
"issues": [
{
"code": "no_cuit",
"message": "<string>"
}
],
"errorMessage": "<string>",
"invoice": {
"id": "<string>",
"voucherNumber": 123,
"ptoVta": 123,
"invoiceType": 123,
"status": "<string>",
"amount": 123
},
"emailStatus": "<string>",
"url": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}Authorizations
API Key para autenticación. Formato: test_sk_xxx para testing, prod_sk_xxx para producción.
Query Parameters
Filtrar por estado. pending = leyéndose, para revisar, con error o en camino a ARCA
Available options:
extracting, review, queued, invoiced, error, discarded, pending Filtrar por origen
Available options:
upload, google_drive, zapier, api, recurring, mcp, whatsapp Cantidad máxima
Required range:
1 <= x <= 500Response
200 - application/json
Borradores
Show child attributes
Show child attributes