curl --request POST \
--url https://www.facture.ar/api/invoices/{invoiceId}/credit-note \
--header 'x-api-key: <api-key>'const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://www.facture.ar/api/invoices/{invoiceId}/credit-note', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.facture.ar/api/invoices/{invoiceId}/credit-note"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.facture.ar/api/invoices/{invoiceId}/credit-note",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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;
}{
"status": "processing",
"batchId": "<string>",
"voids": "Factura C 0003-00000012"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"resolution": "<string>",
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"resolution": "<string>",
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"resolution": "<string>",
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"creditNoteId": "<string>",
"batchId": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"resolution": "<string>",
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<unknown>"
}Anular una factura con nota de crédito
Encola la nota de crédito que anula por el total una factura A, B, C o M autorizada por ARCA (A→NC A, B→NC B, C→NC C, M→NC M): mismo receptor, ítems, importes y moneda, asociada a la factura (CbtesAsoc) y con fecha de hoy. No cuenta contra el límite de facturas del plan. Es asíncrono: seguí el batchId con GET /invoices/batches/{batchId}. Una factura se anula una sola vez: mientras su nota está en la cola, en ARCA o ya autorizada, otro pedido responde 409. Mandá un header Idempotency-Key para poder reintentar sin pedir dos veces (ver la guía de idempotencia).
curl --request POST \
--url https://www.facture.ar/api/invoices/{invoiceId}/credit-note \
--header 'x-api-key: <api-key>'const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://www.facture.ar/api/invoices/{invoiceId}/credit-note', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.facture.ar/api/invoices/{invoiceId}/credit-note"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.facture.ar/api/invoices/{invoiceId}/credit-note",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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;
}{
"status": "processing",
"batchId": "<string>",
"voids": "Factura C 0003-00000012"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"resolution": "<string>",
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"resolution": "<string>",
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"resolution": "<string>",
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"creditNoteId": "<string>",
"batchId": "<string>",
"code": "<string>"
}{
"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.
Headers
Clave que elegís vos (recomendado: un UUID nuevo por cada factura o lote). Si reenviás la misma solicitud con la misma clave —por un timeout, un error de red o un 5xx— recibís la respuesta original (mismo batchId, header Idempotent-Replayed: true) en vez de una factura nueva. Para una factura distinta, o después de que ARCA rechazó la anterior en forma definitiva, usá una clave nueva. Entre 1 y 255 caracteres ASCII imprimibles; se guarda 7 días. En un lote, el ítem i queda identificado como <clave>:<i>.
1 - 255Path Parameters
ID de la factura a anular