Agregar facturas a lote
curl --request PATCH \
--url https://facture.ar/api/invoices/batches/{batchId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"invoices": [
{
"cuitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1.01,
"description": "<string>",
"docTipo": 123,
"docNro": 123,
"invoiceType": 123,
"ivaType": 123,
"currency": "ARS",
"dueDate": "2023-12-25"
}
]
}
'const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invoices: [
{
cuitId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 1.01,
description: '<string>',
docTipo: 123,
docNro: 123,
invoiceType: 123,
ivaType: 123,
currency: 'ARS',
dueDate: '2023-12-25'
}
]
})
};
fetch('https://facture.ar/api/invoices/batches/{batchId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://facture.ar/api/invoices/batches/{batchId}"
payload = { "invoices": [
{
"cuitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1.01,
"description": "<string>",
"docTipo": 123,
"docNro": 123,
"invoiceType": 123,
"ivaType": 123,
"currency": "ARS",
"dueDate": "2023-12-25"
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://facture.ar/api/invoices/batches/{batchId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'invoices' => [
[
'cuitId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 1.01,
'description' => '<string>',
'docTipo' => 123,
'docNro' => 123,
'invoiceType' => 123,
'ivaType' => 123,
'currency' => 'ARS',
'dueDate' => '2023-12-25'
]
]
]),
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;
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"totalItems": 123,
"processedItems": 123,
"failedItems": 123,
"updatedAt": "2023-11-07T05:31:56Z",
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceData": {
"cuitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1.01,
"description": "<string>",
"docTipo": 123,
"docNro": 123,
"invoiceType": 123,
"ivaType": 123,
"currency": "ARS",
"dueDate": "2023-12-25"
},
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error": "<string>",
"retryCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Lotes
Agregar facturas a lote
Agrega facturas adicionales a un lote existente que aún no ha sido completado.
PATCH
/
invoices
/
batches
/
{batchId}
Agregar facturas a lote
curl --request PATCH \
--url https://facture.ar/api/invoices/batches/{batchId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"invoices": [
{
"cuitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1.01,
"description": "<string>",
"docTipo": 123,
"docNro": 123,
"invoiceType": 123,
"ivaType": 123,
"currency": "ARS",
"dueDate": "2023-12-25"
}
]
}
'const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invoices: [
{
cuitId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 1.01,
description: '<string>',
docTipo: 123,
docNro: 123,
invoiceType: 123,
ivaType: 123,
currency: 'ARS',
dueDate: '2023-12-25'
}
]
})
};
fetch('https://facture.ar/api/invoices/batches/{batchId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://facture.ar/api/invoices/batches/{batchId}"
payload = { "invoices": [
{
"cuitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1.01,
"description": "<string>",
"docTipo": 123,
"docNro": 123,
"invoiceType": 123,
"ivaType": 123,
"currency": "ARS",
"dueDate": "2023-12-25"
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://facture.ar/api/invoices/batches/{batchId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'invoices' => [
[
'cuitId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 1.01,
'description' => '<string>',
'docTipo' => 123,
'docNro' => 123,
'invoiceType' => 123,
'ivaType' => 123,
'currency' => 'ARS',
'dueDate' => '2023-12-25'
]
]
]),
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;
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"totalItems": 123,
"processedItems": 123,
"failedItems": 123,
"updatedAt": "2023-11-07T05:31:56Z",
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceData": {
"cuitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1.01,
"description": "<string>",
"docTipo": 123,
"docNro": 123,
"invoiceType": 123,
"ivaType": 123,
"currency": "ARS",
"dueDate": "2023-12-25"
},
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error": "<string>",
"retryCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Authorizations
API Key para autenticación. Formato: test_sk_xxx para testing, prod_sk_xxx para producción.
Path Parameters
ID del lote
Body
application/json
Array de facturas a agregar al lote
Show child attributes
Show child attributes
Response
Facturas agregadas al lote exitosamente
ID único del lote
Estado del lote
Available options:
pending, processing, completed, failed Fecha de creación
Total de items en el lote
Items procesados exitosamente
Items que fallaron
Fecha de última actualización
Items del lote
Show child attributes
Show child attributes
⌘I