Obtener un borrador
curl --request GET \
--url https://www.facture.ar/api/documents/drafts/{draftId} \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://www.facture.ar/api/documents/drafts/{draftId}', 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/{draftId}"
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/{draftId}",
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;
}{
"draft": {
"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"
}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"resolution": "<string>",
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<unknown>"
}Borradores
Obtener un borrador
GET
/
documents
/
drafts
/
{draftId}
Obtener un borrador
curl --request GET \
--url https://www.facture.ar/api/documents/drafts/{draftId} \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://www.facture.ar/api/documents/drafts/{draftId}', 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/{draftId}"
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/{draftId}",
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;
}{
"draft": {
"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"
}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"resolution": "<string>",
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<unknown>"
}Authorizations
API Key para autenticación. Formato: test_sk_xxx para testing, prod_sk_xxx para producción.
Path Parameters
ID del borrador
Response
Borrador
Un borrador de factura armado desde un documento, una planilla, datos enviados por API o una plantilla recurrente
Show child attributes
Show child attributes