Generar CAE (Código de Autorizacion Electrónica) para facturas electrónicas ARCA
https://api.doloop.com.ar/api/v1/receipts/generate
| Campo | Descripción | Ubicación |
|---|---|---|
Authorization REQUERIDO |
Token de autenticación en el header: Bearer {tokenAccess} |
HEADER |
environment REQUERIDO |
Entorno: "h" para homologación, "p" para producción | BODY - application/json |
certificateDev REQUERIDO |
Nombre del certificado de desarrollo (este certificado se debe subir previamente con el endpoint /api/v1/receipts/tools/upload-file) | BODY - application/json |
certificateProd REQUERIDO |
Nombre del certificado de producción (este certificado se debe subir previamente con el endpoint /api/v1/receipts/tools/upload-file) | BODY - application/json |
privateKeyDev REQUERIDO |
Nombre de la clave privada de desarrollo (este archivo se debe subir previamente con el endpoint /api/v1/receipts/tools/upload-file) | BODY - application/json |
privateKeyProd REQUERIDO |
Nombre de la clave privada de producción (este archivo se debe subir previamente con el endpoint /api/v1/receipts/tools/upload-file) | BODY - application/json |
issuerCuit REQUERIDO |
Numero de CUIT de la empresa | BODY - application/json |
salePoint REQUERIDO |
Punto de venta (1-9999) | BODY - application/json |
voucherTypeId REQUERIDO |
ID de comprobante, los valores soportados son: 1=FACTURAS A, 2=NOTAS DE DEBITO A, 3=NOTAS DE CREDITO A, 6=FACTURAS B, 7=NOTAS DE DEBITO B, 8=NOTAS DE CREDITO B, 11=FACTURAS C, 12=NOTAS DE DEBITO C, y 13=NOTAS DE CREDITO C | BODY - application/json |
voucherNumber REQUERIDO |
Numero de comprobante (0 = calcular automaticamente el proximo numero) | BODY - application/json |
documentType REQUERIDO |
Tipo de documento del receptor (80 para CUIT) | BODY - application/json |
documentNumber REQUERIDO |
Numero de documento del receptor | BODY - application/json |
voucherDate REQUERIDO |
Fecha del comprobante (formato YYYYMMDD) | BODY - application/json |
currencyId REQUERIDO |
ID de moneda, alfanumerico de 3 caracteres (PES para pesos) | BODY - application/json |
currencyRate REQUERIDO |
Cotización moneda, para PES el valor es 1 | BODY - application/json |
totalAmount REQUERIDO |
Importe total del comprobante | BODY - application/json |
exemptAmount REQUERIDO |
Total exento | BODY - application/json |
netTaxedAmount REQUERIDO |
Importe neto gravado | BODY - application/json |
netNonTaxedAmount REQUERIDO |
Importe neto no gravado | BODY - application/json |
receiverIvaCondition REQUERIDO |
Condicion de IVA del receptor | BODY - application/json |
serviceDateFrom REQUERIDO |
Fecha de inicio del servicio (YYYYMMDD) | BODY - application/json |
serviceDateTo REQUERIDO |
Fecha de fin del servicio (YYYYMMDD) | BODY - application/json |
paymentDueDate REQUERIDO |
Fecha de vencimiento de pago (YYYYMMDD) | BODY - application/json |
items REQUERIDO |
Array de items del comprobante: [[conceptType=x, itemNetTaxed=x, nonTaxed=x, itemExempt=x, ivaAmount=x, ivaType=x], ...] | BODY - application/json |
| Campo | Descripcion | Ubicacion |
|---|---|---|
taxes OPCIONAL |
Array de tributos: [[id=x, description="x", taxBase=x, rate=x, amount=x], ...] | BODY - application/json |
associatedVouchers OPCIONAL |
Array de comprobantes asociados: [[Tipo=x, PtoVta=x, Nro=x], ...] | BODY - application/json |
Contenido del archivo data.json:
{
"environment": "h",
"certificateDev": "ghf.crt",
"privateKeyDev": "ghf.key",
"certificateProd": "gpf.crt",
"privateKeyProd": "gpf.key",
"issuerCuit": 23215848019,
"salePoint": 1,
"voucherTypeId": 1,
"voucherNumber": 0,
"documentType": 80,
"documentNumber": 33607414799,
"voucherDate": "20260206",
"currencyId": "PES",
"currencyRate": 1,
"serviceDateFrom": "20251201",
"serviceDateTo": "20260131",
"paymentDueDate": "20260310",
"totalAmount": 121,
"exemptAmount": 0,
"netTaxedAmount": 100,
"netNonTaxedAmount": 0,
"receiverIvaCondition": 1,
"items": [
{
"conceptType": 1,
"itemNetTaxed": 100,
"nonTaxed": 0,
"itemExempt": 0,
"ivaAmount": 21,
"ivaType": 5
}
]
}
Comando cURL:
curl -X POST https://api.doloop.com.ar/api/v1/receipts/generate -H "Content-Type: application/json" -d @data.json -H "Authorization: Bearer {tokenAccess}"
| Campo | Descripcion |
|---|---|
status.statusCode |
0 para exito, codigo de error para fallos |
status.statusDescription |
Descripcion del resultado |
values.cae |
Numero de CAE generado (solo en exito) |
values.caeExpiryDate |
Fecha de vencimiento del CAE (solo en exito) |
values.voucherTypeId |
ID del comprobante |
values.voucherNumber |
Numero de comprobante |
values.salePoint |
Punto de venta |
values.voucherDate |
Fecha del comprobante |
values.voucherTotal |
Importe total del comprobante |
values.totalIva |
Total de IVA |
values.exemptAmount |
Total exento |
values.totalNetTaxed |
Total neto gravado |
values.totalNetNonTaxed |
Total neto no gravado |
values.totalTaxes |
Total de tributos |
values.result |
Resultado de AFIP (A: Aceptado, P: Procesado, R: Rechazado) |