Cambiar el diseño de factura
curl --request PUT \
--url https://www.facture.ar/api/cuits/{cuitId}/invoice-branding \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"accentColor": "<string>",
"logo": "<string>",
"tradeName": "<string>",
"activityStart": "2023-12-25",
"address": "<string>",
"footerNote": "<string>"
}
'const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accentColor: '<string>',
logo: '<string>',
tradeName: '<string>',
activityStart: '2023-12-25',
address: '<string>',
footerNote: '<string>'
})
};
fetch('https://www.facture.ar/api/cuits/{cuitId}/invoice-branding', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.facture.ar/api/cuits/{cuitId}/invoice-branding"
payload = {
"accentColor": "<string>",
"logo": "<string>",
"tradeName": "<string>",
"activityStart": "2023-12-25",
"address": "<string>",
"footerNote": "<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/cuits/{cuitId}/invoice-branding",
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([
'accentColor' => '<string>',
'logo' => '<string>',
'tradeName' => '<string>',
'activityStart' => '2023-12-25',
'address' => '<string>',
'footerNote' => '<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": "clasico",
"paperSize": "A4",
"accentColor": "<string>",
"logo": "<string>",
"tradeName": "<string>",
"activityStart": "2023-12-25",
"address": "<string>",
"footerNote": "<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>"
}{
"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>"
}CUITs
Cambiar el diseño de factura
Cambia los campos enviados; los que no se envían quedan como están y null borra un valor. Se aplica también al PDF de las facturas ya emitidas. Necesita la key de producción: una de testing puede leer la configuración pero no cambiarla.
PUT
/
cuits
/
{cuitId}
/
invoice-branding
Cambiar el diseño de factura
curl --request PUT \
--url https://www.facture.ar/api/cuits/{cuitId}/invoice-branding \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"accentColor": "<string>",
"logo": "<string>",
"tradeName": "<string>",
"activityStart": "2023-12-25",
"address": "<string>",
"footerNote": "<string>"
}
'const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accentColor: '<string>',
logo: '<string>',
tradeName: '<string>',
activityStart: '2023-12-25',
address: '<string>',
footerNote: '<string>'
})
};
fetch('https://www.facture.ar/api/cuits/{cuitId}/invoice-branding', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.facture.ar/api/cuits/{cuitId}/invoice-branding"
payload = {
"accentColor": "<string>",
"logo": "<string>",
"tradeName": "<string>",
"activityStart": "2023-12-25",
"address": "<string>",
"footerNote": "<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/cuits/{cuitId}/invoice-branding",
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([
'accentColor' => '<string>',
'logo' => '<string>',
'tradeName' => '<string>',
'activityStart' => '2023-12-25',
'address' => '<string>',
'footerNote' => '<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": "clasico",
"paperSize": "A4",
"accentColor": "<string>",
"logo": "<string>",
"tradeName": "<string>",
"activityStart": "2023-12-25",
"address": "<string>",
"footerNote": "<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>"
}{
"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.
Body
application/json
Response
Diseño actualizado