curl --request PUT \
--url https://www.facture.ar/api/documents/templates/{templateId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>"
}
'const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://www.facture.ar/api/documents/templates/{templateId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.facture.ar/api/documents/templates/{templateId}"
payload = { "name": "<string>" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.facture.ar/api/documents/templates/{templateId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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;
}{
"template": {
"id": "<string>",
"userId": "<string>",
"name": "<string>",
"cuitId": "<string>",
"ptoVta": 50000,
"mode": "manual",
"concepto": 1,
"ivaRate": 21,
"pricesIncludeIva": true,
"receiverDocType": "CUIT",
"receiverDocNumber": "<string>",
"receiverName": "<string>",
"receiverCondicionIva": 123,
"receiverEmail": "jsmith@example.com",
"items": [
{
"description": "<string>",
"quantity": 123,
"unitPrice": 1
}
],
"priceList": [
{
"description": "<string>",
"unitPrice": 1
}
],
"instructions": "<string>",
"columnMapping": {
"headerRow": 2,
"columns": {},
"groupBy": "<string>",
"pricesIncludeIva": true
},
"paymentTermDays": 182,
"sendEmail": true,
"emailCopyTo": "jsmith@example.com",
"recurrence": "monthly",
"dayOfMonth": 14,
"active": true,
"nextRunAt": "2023-11-07T05:31:56Z",
"lastRunAt": "2023-11-07T05:31:56Z",
"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>"
}Reemplazar una plantilla
Reemplaza la plantilla con el body completo: los campos que no mandás vuelven a su valor por defecto, salvo columnMapping, que se conserva si no lo mandás.
curl --request PUT \
--url https://www.facture.ar/api/documents/templates/{templateId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>"
}
'const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://www.facture.ar/api/documents/templates/{templateId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.facture.ar/api/documents/templates/{templateId}"
payload = { "name": "<string>" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.facture.ar/api/documents/templates/{templateId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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;
}{
"template": {
"id": "<string>",
"userId": "<string>",
"name": "<string>",
"cuitId": "<string>",
"ptoVta": 50000,
"mode": "manual",
"concepto": 1,
"ivaRate": 21,
"pricesIncludeIva": true,
"receiverDocType": "CUIT",
"receiverDocNumber": "<string>",
"receiverName": "<string>",
"receiverCondicionIva": 123,
"receiverEmail": "jsmith@example.com",
"items": [
{
"description": "<string>",
"quantity": 123,
"unitPrice": 1
}
],
"priceList": [
{
"description": "<string>",
"unitPrice": 1
}
],
"instructions": "<string>",
"columnMapping": {
"headerRow": 2,
"columns": {},
"groupBy": "<string>",
"pricesIncludeIva": true
},
"paymentTermDays": 182,
"sendEmail": true,
"emailCopyTo": "jsmith@example.com",
"recurrence": "monthly",
"dayOfMonth": 14,
"active": true,
"nextRunAt": "2023-11-07T05:31:56Z",
"lastRunAt": "2023-11-07T05:31:56Z",
"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 de la plantilla
Body
120CUIT emisor. Obligatorio en modo automático y en las recurrentes
1 <= x <= 99999manual, automatic 1, 2, 3 0, 2.5, 5, 10.5, 21, 27 Cliente fijo: todas las facturas de la plantilla van a él
CUIT, CUIL, DNI, null 20200Líneas fijas, para las facturas recurrentes
100Show child attributes
Show child attributes
Precios para documentos que no los traen (remitos)
2000Show child attributes
Show child attributes
Lo que la IA tiene que saber para leer este tipo de documento
4000Columnas de la planilla → campos de la factura
Show child attributes
Show child attributes
0 <= x <= 365Mandarle la factura al cliente por email
monthly: emite las líneas fijas todos los meses en dayOfMonth
monthly, null 1 <= x <= 28Response
Plantilla actualizada
Show child attributes
Show child attributes