MENU navbar-image

Introduction

API REST para emisión y autorización de documentos electrónicos con el SRI Ecuador

## API de Facturación Electrónica - SRI Ecuador

Esta API permite la emisión, firma, autorización y gestión de documentos electrónicos tributarios según la normativa del Servicio de Rentas Internas (SRI) de Ecuador.

### Características principales:
- ✅ **Autorización automática** con el SRI
- 📄 **Múltiples documentos**: Facturas, Notas de Crédito/Débito, Retenciones, Guías de Remisión
- 🔐 **Firma digital** con certificados .p12
- 📧 **Envío automático** de RIDE por email
- 🔄 **Reintentos inteligentes** para documentos pendientes
- 📊 **Reportes y estadísticas** completos

### Autenticación
La API utiliza **Bearer Token** para autenticación. Obtén tu token en el endpoint `/api/auth/login`.

```
Authorization: Bearer {tu_token}
```

<aside class="notice">
Todos los endpoints que requieren autenticación están marcados con 🔒
</aside>

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer Bearer {tu_token}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

Obtén tu token usando el endpoint POST /api/auth/login con tus credenciales de email y password.

01. Autenticación

Endpoints para gestión de autenticación de usuarios. Utiliza Laravel Sanctum para generar tokens Bearer.

Iniciar sesión

Autentica al usuario y devuelve un token Bearer para usar en las demás peticiones.

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/auth/login" \
    --header "Content-Type: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\",
    \"password\": \"|]|{+-\"
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/auth/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net",
    "password": "|]|{+-"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Login exitoso):


{
    "success": true,
    "message": "Inicio de sesión exitoso",
    "data": {
        "user": {
            "id": 1,
            "name": "Juan Pérez",
            "email": "usuario@empresa.com",
            "ruc": "1793190102001",
            "role": "user",
            "business": {
                "id": 1,
                "name": "Mi Empresa S.A.",
                "ruc": "1793190102001"
            }
        },
        "token": "1|abc123def456..."
    }
}
 

Example response (422, Credenciales inválidas):


{
    "message": "Las credenciales proporcionadas son incorrectas.",
    "errors": {
        "email": [
            "Las credenciales proporcionadas son incorrectas."
        ]
    }
}
 

Example response (422, Cuenta desactivada):


{
    "message": "Esta cuenta ha sido desactivada.",
    "errors": {
        "email": [
            "Esta cuenta ha sido desactivada."
        ]
    }
}
 

Request      

POST api/auth/login

Headers

Content-Type        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Example: gbailey@example.net

password   string     

Example: |]|{+-

Registrar nuevo usuario

Endpoint público para registro de usuarios desde apps móviles y web. Protegido con rate limiting para prevenir abuso.

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/auth/register" \
    --header "Content-Type: application/json" \
    --data "{
    \"name\": \"b\",
    \"email\": \"zbailey@example.net\",
    \"password\": \"|]|{+-\",
    \"password_confirmation\": \"architecto\"
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/auth/register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "email": "zbailey@example.net",
    "password": "|]|{+-",
    "password_confirmation": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201, Registro exitoso):


{
    "success": true,
    "message": "Usuario registrado exitosamente",
    "data": {
        "user": {
            "id": 1,
            "name": "Juan Pérez",
            "email": "juan@email.com",
            "role": "user"
        },
        "token": "1|abc123def456...",
        "next_steps": {
            "create_business": "POST /api/business - Crear su empresa",
            "profile": "GET /api/auth/me - Ver perfil"
        }
    }
}
 

Request      

POST api/auth/register

Headers

Content-Type        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

email   string     

Must be a valid email address. Must not be greater than 255 characters. Example: zbailey@example.net

password   string     

Example: |]|{+-

password_confirmation   string     

The value and password must match. Example: architecto

Verificar disponibilidad de email

Verifica si un email ya está registrado en el sistema.

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/auth/check-email" \
    --header "Content-Type: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\"
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/auth/check-email"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "data": {
        "email": "juan@email.com",
        "available": true
    }
}
 

Request      

POST api/auth/check-email

Headers

Content-Type        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Example: gbailey@example.net

Cerrar sesión

requires authentication

Revoca el token actual del usuario autenticado.

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/auth/logout" \
    --header "Authorization: Bearer Bearer {tu_token}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/auth/logout"
);

const headers = {
    "Authorization": "Bearer Bearer {tu_token}",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Sesión cerrada exitosamente"
}
 

Request      

POST api/auth/logout

Headers

Authorization        

Example: Bearer Bearer {tu_token}

Obtener usuario actual

requires authentication

Devuelve la información del usuario autenticado incluyendo su empresa asociada.

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/auth/me" \
    --header "Authorization: Bearer Bearer {tu_token}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/auth/me"
);

const headers = {
    "Authorization": "Bearer Bearer {tu_token}",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "data": {
        "id": 1,
        "name": "Juan Pérez",
        "email": "usuario@empresa.com",
        "ruc": "1793190102001",
        "role": "user",
        "phone": "0999999999",
        "is_active": true,
        "last_login_at": "2025-12-29T10:30:00.000000Z",
        "business": {
            "id": 1,
            "name": "Mi Empresa S.A.",
            "ruc": "1793190102001"
        }
    }
}
 

Request      

GET api/auth/me

Headers

Authorization        

Example: Bearer Bearer {tu_token}

Cambiar contraseña

requires authentication

Permite al usuario cambiar su contraseña actual.

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/auth/change-password" \
    --header "Authorization: Bearer Bearer {tu_token}" \
    --header "Content-Type: application/json" \
    --data "{
    \"current_password\": \"architecto\",
    \"new_password\": \"ngzmiyvdljnikhwaykcmyuwpwl\"
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/auth/change-password"
);

const headers = {
    "Authorization": "Bearer Bearer {tu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "current_password": "architecto",
    "new_password": "ngzmiyvdljnikhwaykcmyuwpwl"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Contraseña actualizada exitosamente"
}
 

Example response (422, Contraseña actual incorrecta):


{
    "message": "La contraseña actual es incorrecta.",
    "errors": {
        "current_password": [
            "La contraseña actual es incorrecta."
        ]
    }
}
 

Request      

POST api/auth/change-password

Headers

Authorization        

Example: Bearer Bearer {tu_token}

Content-Type        

Example: application/json

Body Parameters

current_password   string     

Example: architecto

new_password   string     

Must be at least 8 characters. Example: ngzmiyvdljnikhwaykcmyuwpwl

02. Emisión de Facturas

Endpoints para la creación, firma y autorización de facturas electrónicas. El proceso completo incluye:

  1. Validación de datos
  2. Generación de XML según esquema SRI
  3. Firma digital con certificado .p12
  4. Envío al SRI para autorización
  5. Generación de RIDE (PDF)
  6. Envío por email al cliente

Crear y autorizar factura

Crea una factura electrónica, la firma digitalmente y la envía al SRI para autorización. Si es autorizada, genera el RIDE (PDF) y lo envía por email al cliente.

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/factura/create" \
    --header "Content-Type: application/json" \
    --data "{
    \"dataEmpresa\": {
        \"ambiente\": 16,
        \"emision\": 16,
        \"razonSocial\": \"architecto\",
        \"nombreComercial\": \"architecto\",
        \"ruc\": \"architecto\",
        \"direccion\": \"architecto\",
        \"obligadoContabilidad\": \"architecto\",
        \"agenteRetenedor\": \"architecto\",
        \"resolucionAgenteRetenedor\": \"architecto\",
        \"contribuyenteRimpe\": \"architecto\",
        \"contribuyenteEspecial\": \"architecto\",
        \"email\": \"zbailey@example.net\"
    },
    \"dataVenta\": {
        \"numeroDocumento\": \"architecto\",
        \"direccionBodega\": \"architecto\",
        \"fecha\": \"11-10-2026\",
        \"email1\": \"zbailey@example.net\",
        \"email2\": \"gulgowski.asia@example.com\",
        \"email3\": \"idickens@example.org\",
        \"codigoCliente\": \"architecto\",
        \"direccion\": \"architecto\",
        \"telefono\": \"architecto\",
        \"idTipoIdentificacion\": \"architecto\",
        \"razonSocial\": \"architecto\",
        \"identificacion\": \"architecto\",
        \"subtotal\": 4326.41688,
        \"descuento\": 4326.41688,
        \"baseGravableIva\": 4326.41688,
        \"baseNoGravableIva\": 4326.41688,
        \"montoIva\": 4326.41688,
        \"montoRecargo\": 4326.41688,
        \"flete\": 4326.41688,
        \"montoNeto\": 4326.41688,
        \"moneda\": \"architecto\",
        \"clave\": \"architecto\"
    },
    \"dataTipoImpuesto\": {
        \"codigoSriAts\": \"architecto\",
        \"codigoSriDocumentoElectronico\": \"architecto\",
        \"porcentaje\": 4326.41688
    },
    \"dataTipoImpuesto_0\": {
        \"codigoSriAts\": \"architecto\",
        \"codigoSriDocumentoElectronico\": \"architecto\",
        \"porcentaje\": 4326.41688
    },
    \"dataPago\": [
        {
            \"codigoSriDocumentoElectronico\": \"architecto\",
            \"monto\": 4326.41688,
            \"cantidadDias\": 4326.41688
        }
    ],
    \"dataItem\": [
        {
            \"codigoPrincipal\": \"architecto\",
            \"codigoAuxiliar\": \"architecto\",
            \"descripcionProducto\": \"architecto\",
            \"notaProducto\": \"architecto\",
            \"cantidad\": 4326.41688,
            \"precioUnitario\": 4326.41688,
            \"subtotalProducto\": 4326.41688,
            \"descuentoProducto\": 4326.41688,
            \"montoIvaProducto\": 4326.41688
        }
    ],
    \"dataItemAdicional\": [
        {
            \"campo\": \"architecto\"
        }
    ],
    \"dataInfoAdicional\": [
        {
            \"campo\": \"architecto\",
            \"contenido\": \"architecto\"
        }
    ]
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/factura/create"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "dataEmpresa": {
        "ambiente": 16,
        "emision": 16,
        "razonSocial": "architecto",
        "nombreComercial": "architecto",
        "ruc": "architecto",
        "direccion": "architecto",
        "obligadoContabilidad": "architecto",
        "agenteRetenedor": "architecto",
        "resolucionAgenteRetenedor": "architecto",
        "contribuyenteRimpe": "architecto",
        "contribuyenteEspecial": "architecto",
        "email": "zbailey@example.net"
    },
    "dataVenta": {
        "numeroDocumento": "architecto",
        "direccionBodega": "architecto",
        "fecha": "11-10-2026",
        "email1": "zbailey@example.net",
        "email2": "gulgowski.asia@example.com",
        "email3": "idickens@example.org",
        "codigoCliente": "architecto",
        "direccion": "architecto",
        "telefono": "architecto",
        "idTipoIdentificacion": "architecto",
        "razonSocial": "architecto",
        "identificacion": "architecto",
        "subtotal": 4326.41688,
        "descuento": 4326.41688,
        "baseGravableIva": 4326.41688,
        "baseNoGravableIva": 4326.41688,
        "montoIva": 4326.41688,
        "montoRecargo": 4326.41688,
        "flete": 4326.41688,
        "montoNeto": 4326.41688,
        "moneda": "architecto",
        "clave": "architecto"
    },
    "dataTipoImpuesto": {
        "codigoSriAts": "architecto",
        "codigoSriDocumentoElectronico": "architecto",
        "porcentaje": 4326.41688
    },
    "dataTipoImpuesto_0": {
        "codigoSriAts": "architecto",
        "codigoSriDocumentoElectronico": "architecto",
        "porcentaje": 4326.41688
    },
    "dataPago": [
        {
            "codigoSriDocumentoElectronico": "architecto",
            "monto": 4326.41688,
            "cantidadDias": 4326.41688
        }
    ],
    "dataItem": [
        {
            "codigoPrincipal": "architecto",
            "codigoAuxiliar": "architecto",
            "descripcionProducto": "architecto",
            "notaProducto": "architecto",
            "cantidad": 4326.41688,
            "precioUnitario": 4326.41688,
            "subtotalProducto": 4326.41688,
            "descuentoProducto": 4326.41688,
            "montoIvaProducto": 4326.41688
        }
    ],
    "dataItemAdicional": [
        {
            "campo": "architecto"
        }
    ],
    "dataInfoAdicional": [
        {
            "campo": "architecto",
            "contenido": "architecto"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Factura autorizada):


{
    "estado": "AUTORIZADO",
    "clave_acceso": "2912202501179319010200110010010000001251234567813",
    "numero_autorizacion": "2912202501179319010200110010010000001251234567813",
    "fecha_autorizacion": "2025-12-29T11:30:00-05:00",
    "ambiente": "PRODUCCIÓN",
    "xml_autorizado": "documentos/1793190102001/2025/12/facturas/xml/2912202501..._autorizado.xml",
    "ride_pdf": "documentos/1793190102001/2025/12/facturas/pdf/2912202501..._ride.pdf",
    "email_enviado": true
}
 

Example response (200, Factura rechazada):


{
    "estado": "RECHAZADO",
    "clave_acceso": "2912202501179319010200110010010000001251234567813",
    "errores": [
        {
            "codigo": "35",
            "mensaje": "DOCUMENTO DUPLICADO"
        }
    ]
}
 

Example response (422, Error de validación):


{
    "success": false,
    "message": "Error de validación",
    "errors": {
        "dataEmpresa.ruc": [
            "El campo dataEmpresa.ruc es obligatorio."
        ]
    }
}
 

Request      

POST api/factura/create

Headers

Content-Type        

Example: application/json

Body Parameters

dataEmpresa   object  optional    
ambiente   integer     

dataEmpresa /. Example: 16

emision   integer     

Example: 16

razonSocial   string     

Example: architecto

nombreComercial   string     

Example: architecto

ruc   string     

Example: architecto

direccion   string     

Example: architecto

obligadoContabilidad   string     

Example: architecto

agenteRetenedor   string     

Example: architecto

resolucionAgenteRetenedor   string  optional    

Example: architecto

contribuyenteRimpe   string     

Example: architecto

contribuyenteEspecial   string     

Example: architecto

idContribuyenteEspecial   string  optional    
email   string     

Must be a valid email address. Example: zbailey@example.net

dataVenta   object  optional    
numeroDocumento   string     

dataVenta /. Example: architecto

direccionBodega   string     

Example: architecto

fecha   string     

Must be a valid date in the format d-m-Y. Example: 11-10-2026

email1   string     

Must be a valid email address. Example: zbailey@example.net

email2   string  optional    

Must be a valid email address. Example: gulgowski.asia@example.com

email3   string  optional    

Must be a valid email address. Example: idickens@example.org

codigoCliente   string     

Example: architecto

direccion   string     

Example: architecto

telefono   string  optional    

Example: architecto

idTipoIdentificacion   string     

Example: architecto

razonSocial   string     

Example: architecto

identificacion   string     

Example: architecto

subtotal   number     

Example: 4326.41688

descuento   number     

Example: 4326.41688

baseGravableIva   number     

Example: 4326.41688

baseNoGravableIva   number     

Example: 4326.41688

montoIva   number     

Example: 4326.41688

montoRecargo   number     

Example: 4326.41688

flete   number     

Example: 4326.41688

montoNeto   number     

Example: 4326.41688

moneda   string     

Example: architecto

clave   string     

Example: architecto

dataTipoImpuesto   object  optional    
codigoSriAts   string     

dataTipoImpuesto /. Example: architecto

codigoSriDocumentoElectronico   string     

Example: architecto

porcentaje   number     

Example: 4326.41688

dataTipoImpuesto_0   object  optional    
codigoSriAts   string     

Example: architecto

codigoSriDocumentoElectronico   string     

Example: architecto

porcentaje   number     

Example: 4326.41688

dataPago   object[]     

dataPago /. Must have at least 1 items.

codigoSriDocumentoElectronico   string     

Example: architecto

monto   number     

Example: 4326.41688

cantidadDias   number     

Example: 4326.41688

dataItem   object[]     

dataTipoImpuesto /. Must have at least 1 items.

codigoPrincipal   string     

Example: architecto

codigoAuxiliar   string     

Example: architecto

descripcionProducto   string     

Example: architecto

notaProducto   string     

Example: architecto

cantidad   number     

Example: 4326.41688

precioUnitario   number     

Example: 4326.41688

subtotalProducto   number     

Example: 4326.41688

descuentoProducto   number     

Example: 4326.41688

montoIvaProducto   number     

Example: 4326.41688

dataItemAdicional   object[]  optional    

dataItemAdicional /.

campo   string     

Example: architecto

dataInfoAdicional   object[]  optional    

dataInfoAdicional /.

campo   string     

Example: architecto

contenido   string     

Example: architecto

GET api/check-certificate

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/check-certificate"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/check-certificate"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/check-certificate

06. Consulta de Documentos

Endpoints para consultar, filtrar y descargar documentos emitidos. Permite obtener estadísticas, buscar documentos y descargar XML/PDF.

Listar documentos emitidos

Obtiene una lista paginada de documentos emitidos con filtros opcionales.

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/documents" \
    --header "Content-Type: application/json" \
    --data "{
    \"business_ruc\": \"bngzmiyvdljni\",
    \"business_id\": 16,
    \"start_date\": \"2026-10-11T20:45:46\",
    \"end_date\": \"2052-11-03\",
    \"document_type\": 1,
    \"status\": \"ERROR\",
    \"customer_identification\": \"architecto\",
    \"page\": 22,
    \"per_page\": 7
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "business_ruc": "bngzmiyvdljni",
    "business_id": 16,
    "start_date": "2026-10-11T20:45:46",
    "end_date": "2052-11-03",
    "document_type": 1,
    "status": "ERROR",
    "customer_identification": "architecto",
    "page": 22,
    "per_page": 7
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Documentos obtenidos exitosamente",
    "data": {
        "documents": [
            {
                "id": 1,
                "access_key": "2912202501179319010200110010010000001251234567813",
                "document_type": "01",
                "document_number": "001-001-000000125",
                "status": "AUTORIZADO",
                "total_amount": 115,
                "customer_name": "Juan Pérez",
                "emission_date": "2025-12-29",
                "authorization_date": "2025-12-29T11:30:00"
            }
        ],
        "pagination": {
            "current_page": 1,
            "last_page": 5,
            "per_page": 20,
            "total": 100
        }
    }
}
 

Request      

GET api/documents

Headers

Content-Type        

Example: application/json

Body Parameters

business_ruc   string  optional    

Must be 13 characters. Example: bngzmiyvdljni

business_id   integer  optional    

Must match an existing stored value. Example: 16

start_date   string  optional    

Must be a valid date. Example: 2026-10-11T20:45:46

end_date   string  optional    

Must be a valid date. Must be a date after or equal to start_date. Example: 2052-11-03

document_type   string  optional    

Example: 1

Must be one of:
  • 1
  • 4
  • 5
  • 6
  • 7
  • 8
status   string  optional    

Example: ERROR

Must be one of:
  • PENDIENTE
  • FIRMADO
  • ENVIADO
  • AUTORIZADO
  • RECHAZADO
  • ERROR
customer_identification   string  optional    

Example: architecto

page   integer  optional    

Must be at least 1. Example: 22

per_page   integer  optional    

Must be at least 1. Must not be greater than 100. Example: 7

Obtener estadísticas de documentos emitidos

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/documents/statistics" \
    --header "Content-Type: application/json" \
    --data "{
    \"business_ruc\": \"bngzmiyvdljni\",
    \"business_id\": 16,
    \"start_date\": \"2026-10-11T20:45:46\",
    \"end_date\": \"2052-11-03\"
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/statistics"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "business_ruc": "bngzmiyvdljni",
    "business_id": 16,
    "start_date": "2026-10-11T20:45:46",
    "end_date": "2052-11-03"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

GET api/documents/statistics

Headers

Content-Type        

Example: application/json

Body Parameters

business_ruc   string  optional    

Must be 13 characters. Example: bngzmiyvdljni

business_id   integer  optional    

Must match an existing stored value. Example: 16

start_date   string  optional    

Must be a valid date. Example: 2026-10-11T20:45:46

end_date   string  optional    

Must be a valid date. Must be a date after or equal to start_date. Example: 2052-11-03

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/documents/search" \
    --header "Content-Type: application/json" \
    --data "{
    \"query\": \"bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujwvlxjklqppwqbewtnnoqitpxn\",
    \"search_in\": [
        \"document_number\"
    ],
    \"business_ruc\": \"tltcvipojsaus\",
    \"document_type\": 1,
    \"status\": \"ENVIADO\",
    \"limit\": 19
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/search"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "query": "bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujwvlxjklqppwqbewtnnoqitpxn",
    "search_in": [
        "document_number"
    ],
    "business_ruc": "tltcvipojsaus",
    "document_type": 1,
    "status": "ENVIADO",
    "limit": 19
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Exportar documentos a CSV

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/documents/export/csv" \
    --header "Content-Type: application/json" \
    --data "{
    \"business_ruc\": \"bngzmiyvdljni\",
    \"start_date\": \"2026-10-11T20:45:46\",
    \"end_date\": \"2052-11-03\",
    \"document_type\": 5,
    \"status\": \"FIRMADO\"
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/export/csv"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "business_ruc": "bngzmiyvdljni",
    "start_date": "2026-10-11T20:45:46",
    "end_date": "2052-11-03",
    "document_type": 5,
    "status": "FIRMADO"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

GET api/documents/export/csv

Headers

Content-Type        

Example: application/json

Body Parameters

business_ruc   string  optional    

Must be 13 characters. Example: bngzmiyvdljni

start_date   string  optional    

Must be a valid date. Example: 2026-10-11T20:45:46

end_date   string  optional    

Must be a valid date. Must be a date after or equal to start_date. Example: 2052-11-03

document_type   string  optional    

Example: 5

Must be one of:
  • 1
  • 4
  • 5
  • 6
  • 7
  • 8
status   string  optional    

Example: FIRMADO

Must be one of:
  • PENDIENTE
  • FIRMADO
  • ENVIADO
  • AUTORIZADO
  • RECHAZADO
  • ERROR

Descargar XML autorizado por clave de acceso

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/documents/xml/architecto"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/xml/architecto"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/documents/xml/{accessKey}

URL Parameters

accessKey   string     

Example: architecto

Descargar PDF RIDE por clave de acceso

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/documents/pdf/architecto"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/pdf/architecto"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/documents/pdf/{accessKey}

URL Parameters

accessKey   string     

Example: architecto

Consultar estado de documento con archivos comprimidos

Endpoint optimizado para sistemas de facturación masiva. Devuelve el estado del documento junto con XML y PDF comprimidos y codificados en base64.

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/documents/status/architecto/files"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/status/architecto/files"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/documents/status/{accessKey}/files

URL Parameters

accessKey   string     

Example: architecto

Consultar estado de múltiples documentos (batch)

Permite consultar el estado de hasta 50 documentos en una sola petición.

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/documents/status/batch" \
    --header "Content-Type: application/json" \
    --data "{
    \"access_keys\": [
        \"bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj\"
    ],
    \"include_files\": false
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/status/batch"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "access_keys": [
        "bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj"
    ],
    "include_files": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/documents/status/batch

Headers

Content-Type        

Example: application/json

Body Parameters

access_keys   string[]     

Must be 49 characters.

include_files   boolean  optional    

Example: false

Descargar archivo de documento (XML o PDF)

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/documents/architecto/files/architecto/download"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/architecto/files/architecto/download"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/documents/{emission}/files/{file}/download

URL Parameters

emission   string     

Example: architecto

file   string     

The file. Example: architecto

Obtener detalles de un documento específico

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/documents/architecto"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/architecto"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/documents/{id}

URL Parameters

id   string     

The ID of the document. Example: architecto

07. Reintentos y Recuperación

Continuar autorización de documento en estado ENVIADO o FIRMADO

Este endpoint toma un documento que se quedó en estado intermedio (ENVIADO/FIRMADO) y continúa el proceso de autorización con el SRI usando el XML firmado existente.

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/documents/continue-authorization" \
    --header "Content-Type: application/json" \
    --data "{
    \"access_key\": \"bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj\",
    \"email\": \"schultz.audrey@example.org\"
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/continue-authorization"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "access_key": "bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj",
    "email": "schultz.audrey@example.org"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "status": "SUCCESS",
    "message": "Documento autorizado exitosamente",
    "data": {
        "status": "AUTORIZADO",
        "numero_autorizacion": "0601202604171719678400110010010000000091234567814",
        "ride_generated": true,
        "email_sent": true
    }
}
 

Request      

POST api/documents/continue-authorization

Headers

Content-Type        

Example: application/json

Body Parameters

access_key   string     

Must be 49 characters. Example: bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj

email   string  optional    

Must be a valid email address. Example: schultz.audrey@example.org

Regenerar RIDE (PDF) de un documento ya autorizado

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/documents/retry-ride" \
    --header "Content-Type: application/json" \
    --data "{
    \"access_key\": \"bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj\"
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/retry-ride"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "access_key": "bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "status": "SUCCESS",
    "message": "RIDE regenerado exitosamente",
    "data": {
        "pdf_path": "..."
    }
}
 

Request      

POST api/documents/retry-ride

Headers

Content-Type        

Example: application/json

Body Parameters

access_key   string     

Must be 49 characters. Example: bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj

Reintento completo: autorización + RIDE + email

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/documents/retry-complete" \
    --header "Content-Type: application/json" \
    --data "{
    \"access_key\": \"bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj\",
    \"email\": \"schultz.audrey@example.org\"
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/retry-complete"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "access_key": "bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj",
    "email": "schultz.audrey@example.org"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "status": "SUCCESS",
    "message": "Proceso completo ejecutado",
    "data": {
        "authorization": "...",
        "ride": "...",
        "email": "..."
    }
}
 

Request      

POST api/documents/retry-complete

Headers

Content-Type        

Example: application/json

Body Parameters

access_key   string     

Must be 49 characters. Example: bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj

email   string  optional    

Must be a valid email address. Example: schultz.audrey@example.org

Consultar estado de un documento directamente en el SRI

Este endpoint consulta el estado de autorización directamente en los web services del SRI, útil cuando el documento está "EN PROCESAMIENTO" o cuando se necesita verificar el estado real en el SRI.

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/documents/check-sri-status" \
    --header "Content-Type: application/json" \
    --data "{
    \"access_key\": \"bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj\",
    \"ambiente\": 2
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/check-sri-status"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "access_key": "bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj",
    "ambiente": 2
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "status": "SUCCESS",
    "data": {
        "access_key": "2502202601171719678400110010010000000527961390210",
        "sri_status": "AUTORIZADO",
        "numero_autorizacion": "2502202601171719678400110010010000000527961390210",
        "fecha_autorizacion": "2026-02-25T10:30:00-05:00",
        "ambiente": "PRUEBAS",
        "can_continue": false,
        "message": "Documento autorizado por el SRI"
    }
}
 

Example response (200):


{
    "status": "SUCCESS",
    "data": {
        "access_key": "2502202601171719678400110010010000000527961390210",
        "sri_status": "EN_PROCESAMIENTO",
        "message": "La clave de acceso está en procesamiento en el SRI",
        "can_continue": true,
        "retry_after_seconds": 30
    }
}
 

Request      

POST api/documents/check-sri-status

Headers

Content-Type        

Example: application/json

Body Parameters

access_key   string     

Must be 49 characters. Example: bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj

ambiente   integer  optional    

Example: 2

Must be one of:
  • 1
  • 2

Consultar estado de un documento por clave de acceso

Este endpoint permite a sistemas externos (como POS) verificar el estado actual de un documento y saber qué acciones pueden tomar.

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/documents/status/architecto"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/status/architecto"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Example response (200):


{
    "status": "SUCCESS",
    "data": {
        "access_key": "0601202604...",
        "document_status": "ENVIADO",
        "document_type": "nota_credito",
        "is_final_status": false,
        "can_continue_authorization": true,
        "actions_available": [
            "continue_authorization"
        ],
        "next_action": {
            "endpoint": "/api/documents/continue-authorization",
            "method": "POST",
            "params": {
                "access_key": "..."
            }
        }
    }
}
 

Request      

GET api/documents/status/{accessKey}

URL Parameters

accessKey   string     

Example: architecto

09. Administración de Usuarios

Endpoints para gestión de usuarios del sistema (solo administradores). Permite crear, editar, eliminar y gestionar usuarios y sus permisos.

Listar usuarios

requires authentication

Obtiene lista paginada de usuarios con filtros opcionales.

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/admin/users" \
    --header "Authorization: Bearer Bearer {tu_token}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/admin/users"
);

const headers = {
    "Authorization": "Bearer Bearer {tu_token}",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "data": {
        "data": [
            {
                "id": 1,
                "name": "Juan Pérez",
                "email": "juan@empresa.com",
                "ruc": "1793190102001",
                "role": "user",
                "is_active": true,
                "business": {
                    "id": 1,
                    "name": "Mi Empresa S.A."
                }
            }
        ],
        "current_page": 1,
        "total": 10
    }
}
 

Request      

GET api/admin/users

Headers

Authorization        

Example: Bearer Bearer {tu_token}

Crear usuario

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/admin/users" \
    --header "Content-Type: application/json" \
    --data "{
    \"name\": \"b\",
    \"email\": \"zbailey@example.net\",
    \"password\": \"-0pBNvYgxw\",
    \"ruc\": \"aykcmyuwpwlvq\",
    \"role\": \"viewer\",
    \"phone\": \"wrsitcpscqldzsnr\",
    \"is_active\": true
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/admin/users"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "email": "zbailey@example.net",
    "password": "-0pBNvYgxw",
    "ruc": "aykcmyuwpwlvq",
    "role": "viewer",
    "phone": "wrsitcpscqldzsnr",
    "is_active": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/admin/users

Headers

Content-Type        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

email   string     

Must be a valid email address. Example: zbailey@example.net

password   string     

Must be at least 8 characters. Example: -0pBNvYgxw

ruc   string     

Must be 13 characters. Example: aykcmyuwpwlvq

role   string     

Example: viewer

Must be one of:
  • admin
  • user
  • viewer
phone   string  optional    

Must not be greater than 20 characters. Example: wrsitcpscqldzsnr

is_active   boolean  optional    

Example: true

Mostrar usuario

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/admin/users/architecto"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/admin/users/architecto"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/admin/users/{id}

URL Parameters

id   string     

The ID of the user. Example: architecto

Actualizar usuario

Example request:
curl --request PUT \
    "https://autorizaciones.jfpcode.com/api/admin/users/architecto" \
    --header "Content-Type: application/json" \
    --data "{
    \"name\": \"b\",
    \"email\": \"zbailey@example.net\",
    \"password\": \"-0pBNvYgxw\",
    \"ruc\": \"aykcmyuwpwlvq\",
    \"role\": \"viewer\",
    \"phone\": \"wrsitcpscqldzsnr\",
    \"is_active\": false
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/admin/users/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "email": "zbailey@example.net",
    "password": "-0pBNvYgxw",
    "ruc": "aykcmyuwpwlvq",
    "role": "viewer",
    "phone": "wrsitcpscqldzsnr",
    "is_active": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/admin/users/{id}

Headers

Content-Type        

Example: application/json

URL Parameters

id   string     

The ID of the user. Example: architecto

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: b

email   string  optional    

Must be a valid email address. Example: zbailey@example.net

password   string  optional    

Must be at least 8 characters. Example: -0pBNvYgxw

ruc   string  optional    

Must be 13 characters. Example: aykcmyuwpwlvq

role   string  optional    

Example: viewer

Must be one of:
  • admin
  • user
  • viewer
phone   string  optional    

Must not be greater than 20 characters. Example: wrsitcpscqldzsnr

is_active   boolean  optional    

Example: false

Eliminar usuario

Example request:
curl --request DELETE \
    "https://autorizaciones.jfpcode.com/api/admin/users/architecto"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/admin/users/architecto"
);



fetch(url, {
    method: "DELETE",
}).then(response => response.json());

Request      

DELETE api/admin/users/{id}

URL Parameters

id   string     

The ID of the user. Example: architecto

Activar/Desactivar usuario

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/admin/users/architecto/toggle-status"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/admin/users/architecto/toggle-status"
);



fetch(url, {
    method: "POST",
}).then(response => response.json());

Request      

POST api/admin/users/{id}/toggle-status

URL Parameters

id   string     

The ID of the user. Example: architecto

Obtener empresas disponibles para asignar

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/admin/businesses-list"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/admin/businesses-list"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/admin/businesses-list

10. Mis Documentos

Endpoints para que usuarios autenticados consulten y descarguen sus documentos. Los documentos se filtran automáticamente por el RUC asignado al usuario.

Listar mis documentos

requires authentication

Obtiene los documentos del usuario autenticado, filtrados por su RUC asignado. Administradores pueden ver todos los documentos.

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/my-documents" \
    --header "Authorization: Bearer Bearer {tu_token}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/my-documents"
);

const headers = {
    "Authorization": "Bearer Bearer {tu_token}",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "data": {
        "data": [
            {
                "id": 1,
                "access_key": "291220250117...",
                "status": "AUTORIZADO"
            }
        ],
        "total": 50
    }
}
 

Request      

GET api/my-documents

Headers

Authorization        

Example: Bearer Bearer {tu_token}

Estadísticas de documentos del usuario

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/my-documents/statistics"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/my-documents/statistics"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/my-documents/statistics

Obtener lista de documentos disponibles para descarga por lotes

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/my-documents/downloadable"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/my-documents/downloadable"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/my-documents/downloadable

Mostrar detalle de un documento

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/my-documents/architecto"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/my-documents/architecto"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/my-documents/{accessKey}

URL Parameters

accessKey   string     

Example: architecto

Descargar XML de un documento

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/my-documents/architecto/xml"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/my-documents/architecto/xml"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/my-documents/{accessKey}/xml

URL Parameters

accessKey   string     

Example: architecto

Descargar PDF de un documento

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/my-documents/architecto/pdf"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/my-documents/architecto/pdf"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/my-documents/{accessKey}/pdf

URL Parameters

accessKey   string     

Example: architecto

Descarga por lotes (múltiples documentos)

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/my-documents/download-batch" \
    --header "Content-Type: application/json" \
    --data "{
    \"access_keys\": [
        \"bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj\"
    ],
    \"file_types\": [
        \"XML_AUTHORIZED\"
    ]
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/my-documents/download-batch"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "access_keys": [
        "bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj"
    ],
    "file_types": [
        "XML_AUTHORIZED"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/my-documents/download-batch

Headers

Content-Type        

Example: application/json

Body Parameters

access_keys   string[]     

Must be 49 characters.

file_types   string[]  optional    
Must be one of:
  • XML_AUTHORIZED
  • PDF_RIDE

Emisión de Documentos

Endpoints para la emisión y procesamiento de documentos electrónicos.

Crear Factura Electrónica

requires authentication

Envía una factura para su procesamiento síncrono. El sistema intentará autorizarla inmediatamente con el SRI.

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/v2/factura" \
    --header "Authorization: Bearer Bearer {tu_token}" \
    --header "Content-Type: application/json" \
    --data "{
    \"incluirDocumentos\": false,
    \"dataEmpresa\": {
        \"ambiente\": 2,
        \"emision\": 16,
        \"razonSocial\": \"n\",
        \"nombreComercial\": \"g\",
        \"ruc\": \"zmiyvdljnikhw\",
        \"direccion\": \"a\",
        \"obligadoContabilidad\": \"S\",
        \"agenteRetenedor\": \"S\",
        \"resolucionAgenteRetenedor\": \"architecto\",
        \"contribuyenteRimpe\": \"S\",
        \"contribuyenteEspecial\": \"S\",
        \"idContribuyenteEspecial\": \"architecto\",
        \"email\": \"zbailey@example.net\"
    },
    \"dataVenta\": {
        \"numeroDocumento\": \"425-593-142326822\",
        \"direccionBodega\": \"m\",
        \"fecha\": \"11-10-2026\",
        \"email1\": \"marquardt.noah@example.com\",
        \"email2\": \"emelie.baumbach@example.net\",
        \"email3\": \"ferne52@example.com\",
        \"codigoCliente\": \"architecto\",
        \"direccion\": \"n\",
        \"telefono\": \"architecto\",
        \"idTipoIdentificacion\": 4,
        \"razonSocial\": \"n\",
        \"identificacion\": \"gzmiyvdljnikhway\",
        \"subtotal\": 62,
        \"descuento\": 54,
        \"baseGravableIva\": 38,
        \"baseNoGravableIva\": 50,
        \"montoIva\": 72,
        \"montoRecargo\": 61,
        \"flete\": 67,
        \"montoNeto\": 61,
        \"moneda\": \"architecto\",
        \"clave\": \"ngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujw\"
    },
    \"dataTipoImpuesto\": {
        \"codigoSriAts\": \"architecto\",
        \"codigoSriDocumentoElectronico\": \"architecto\",
        \"porcentaje\": 4326.41688
    },
    \"dataTipoImpuesto_0\": {
        \"codigoSriAts\": \"architecto\",
        \"codigoSriDocumentoElectronico\": \"architecto\",
        \"porcentaje\": 4326.41688
    },
    \"dataPago\": [
        {
            \"codigoSriDocumentoElectronico\": \"architecto\",
            \"monto\": 39,
            \"cantidadDias\": 84
        }
    ],
    \"dataItem\": [
        {
            \"codigoPrincipal\": \"z\",
            \"codigoAuxiliar\": \"m\",
            \"descripcionProducto\": \"i\",
            \"notaProducto\": \"architecto\",
            \"cantidad\": 39,
            \"precioUnitario\": 84,
            \"subtotalProducto\": 12,
            \"descuentoProducto\": 77,
            \"montoIvaProducto\": 8
        }
    ],
    \"dataItemAdicional\": [
        {
            \"campo\": \"architecto\"
        }
    ],
    \"dataInfoAdicional\": [
        {
            \"campo\": \"architecto\",
            \"contenido\": \"architecto\"
        }
    ]
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/v2/factura"
);

const headers = {
    "Authorization": "Bearer Bearer {tu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "incluirDocumentos": false,
    "dataEmpresa": {
        "ambiente": 2,
        "emision": 16,
        "razonSocial": "n",
        "nombreComercial": "g",
        "ruc": "zmiyvdljnikhw",
        "direccion": "a",
        "obligadoContabilidad": "S",
        "agenteRetenedor": "S",
        "resolucionAgenteRetenedor": "architecto",
        "contribuyenteRimpe": "S",
        "contribuyenteEspecial": "S",
        "idContribuyenteEspecial": "architecto",
        "email": "zbailey@example.net"
    },
    "dataVenta": {
        "numeroDocumento": "425-593-142326822",
        "direccionBodega": "m",
        "fecha": "11-10-2026",
        "email1": "marquardt.noah@example.com",
        "email2": "emelie.baumbach@example.net",
        "email3": "ferne52@example.com",
        "codigoCliente": "architecto",
        "direccion": "n",
        "telefono": "architecto",
        "idTipoIdentificacion": 4,
        "razonSocial": "n",
        "identificacion": "gzmiyvdljnikhway",
        "subtotal": 62,
        "descuento": 54,
        "baseGravableIva": 38,
        "baseNoGravableIva": 50,
        "montoIva": 72,
        "montoRecargo": 61,
        "flete": 67,
        "montoNeto": 61,
        "moneda": "architecto",
        "clave": "ngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujw"
    },
    "dataTipoImpuesto": {
        "codigoSriAts": "architecto",
        "codigoSriDocumentoElectronico": "architecto",
        "porcentaje": 4326.41688
    },
    "dataTipoImpuesto_0": {
        "codigoSriAts": "architecto",
        "codigoSriDocumentoElectronico": "architecto",
        "porcentaje": 4326.41688
    },
    "dataPago": [
        {
            "codigoSriDocumentoElectronico": "architecto",
            "monto": 39,
            "cantidadDias": 84
        }
    ],
    "dataItem": [
        {
            "codigoPrincipal": "z",
            "codigoAuxiliar": "m",
            "descripcionProducto": "i",
            "notaProducto": "architecto",
            "cantidad": 39,
            "precioUnitario": 84,
            "subtotalProducto": 12,
            "descuentoProducto": 77,
            "montoIvaProducto": 8
        }
    ],
    "dataItemAdicional": [
        {
            "campo": "architecto"
        }
    ],
    "dataInfoAdicional": [
        {
            "campo": "architecto",
            "contenido": "architecto"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "COMPROBANTE AUTORIZADO",
    "data": {
        "claveAcceso": "0502202601179001122300110010100000123451234567812",
        "estado": "AUTORIZADO",
        "numeroAutorizacion": "0502202601179001122300110010100000123451234567812",
        "fechaAutorizacion": "2026-02-05 15:30:00",
        "xml": "http://api.midominio.com/documents/xml/...",
        "pdf": "http://api.midominio.com/documents/pdf/..."
    }
}
 

Example response (422):


{
    "success": false,
    "message": "Error de validación",
    "errors": {
        "dataVenta.numeroDocumento": [
            "El formato es inválido"
        ]
    }
}
 

Request      

POST api/v2/factura

Headers

Authorization        

Example: Bearer Bearer {tu_token}

Content-Type        

Example: application/json

Body Parameters

incluirDocumentos   boolean  optional    

Example: false

dataEmpresa   object  optional    
ambiente   integer     

Example: 2

Must be one of:
  • 1
  • 2
emision   integer     

Example: 16

razonSocial   string     

Must not be greater than 300 characters. Example: n

nombreComercial   string     

Must not be greater than 300 characters. Example: g

ruc   string     

Must be 13 characters. Example: zmiyvdljnikhw

direccion   string     

Must not be greater than 300 characters. Example: a

obligadoContabilidad   string     

Example: S

Must be one of:
  • S
  • N
agenteRetenedor   string     

Example: S

Must be one of:
  • S
  • N
resolucionAgenteRetenedor   string  optional    

Example: architecto

contribuyenteRimpe   string     

Example: S

Must be one of:
  • S
  • N
contribuyenteEspecial   string     

Example: S

Must be one of:
  • S
  • N
idContribuyenteEspecial   string  optional    

Example: architecto

email   string     

Must be a valid email address. Example: zbailey@example.net

dataVenta   object  optional    
numeroDocumento   string     

Must match the regex /^\d{3}-\d{3}-\d{9}$/. Example: 425-593-142326822

direccionBodega   string     

Must not be greater than 300 characters. Example: m

fecha   string     

Must be a valid date in the format d-m-Y. Example: 11-10-2026

email1   string     

Must be a valid email address. Example: marquardt.noah@example.com

email2   string  optional    

Must be a valid email address. Example: emelie.baumbach@example.net

email3   string  optional    

Must be a valid email address. Example: ferne52@example.com

codigoCliente   string     

Example: architecto

direccion   string     

Must not be greater than 300 characters. Example: n

telefono   string  optional    

Example: architecto

idTipoIdentificacion   string     

Example: 4

Must be one of:
  • 4
  • 5
  • 6
  • 7
  • 8
razonSocial   string     

Must not be greater than 300 characters. Example: n

identificacion   string     

Must not be greater than 20 characters. Example: gzmiyvdljnikhway

subtotal   number     

Must be at least 0. Example: 62

descuento   number     

Must be at least 0. Example: 54

baseGravableIva   number     

Must be at least 0. Example: 38

baseNoGravableIva   number     

Must be at least 0. Example: 50

montoIva   number     

Must be at least 0. Example: 72

montoRecargo   number     

Must be at least 0. Example: 61

flete   number     

Must be at least 0. Example: 67

montoNeto   number     

Must be at least 0. Example: 61

moneda   string     

Example: architecto

clave   string     

Must be 49 characters. Example: ngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujw

dataTipoImpuesto   object  optional    
codigoSriAts   string     

Example: architecto

codigoSriDocumentoElectronico   string     

Example: architecto

porcentaje   number     

Example: 4326.41688

dataTipoImpuesto_0   object  optional    
codigoSriAts   string     

Example: architecto

codigoSriDocumentoElectronico   string     

Example: architecto

porcentaje   number     

Example: 4326.41688

dataPago   object[]     

Must have at least 1 items.

codigoSriDocumentoElectronico   string     

Example: architecto

monto   number     

Must be at least 0. Example: 39

cantidadDias   number     

Must be at least 0. Example: 84

dataItem   object[]     

Must have at least 1 items.

codigoPrincipal   string     

Must not be greater than 25 characters. Example: z

codigoAuxiliar   string     

Must not be greater than 25 characters. Example: m

descripcionProducto   string     

Must not be greater than 300 characters. Example: i

notaProducto   string     

Example: architecto

cantidad   number     

Must be at least 0. Example: 39

precioUnitario   number     

Must be at least 0. Example: 84

subtotalProducto   number     

Must be at least 0. Example: 12

descuentoProducto   number     

Must be at least 0. Example: 77

montoIvaProducto   number     

Must be at least 0. Example: 8

dataItemAdicional   object[]  optional    
campo   string     

Example: architecto

dataInfoAdicional   object[]  optional    
campo   string     

Example: architecto

contenido   string     

Example: architecto

Crear Nota de Crédito

requires authentication

Envía una nota de crédito para su procesamiento síncrono.

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/v2/nota-credito" \
    --header "Authorization: Bearer Bearer {tu_token}" \
    --header "Content-Type: application/json" \
    --data "{
    \"incluirDocumentos\": true,
    \"dataEmpresa\": {
        \"ambiente\": 1,
        \"emision\": 16,
        \"razonSocial\": \"n\",
        \"nombreComercial\": \"g\",
        \"ruc\": \"zmiyvdljnikhw\",
        \"direccion\": \"a\",
        \"obligadoContabilidad\": \"N\",
        \"agenteRetenedor\": \"S\",
        \"resolucionAgenteRetenedor\": \"architecto\",
        \"contribuyenteRimpe\": \"N\",
        \"contribuyenteEspecial\": \"N\",
        \"idContribuyenteEspecial\": \"architecto\",
        \"email\": \"zbailey@example.net\"
    },
    \"dataInfo\": {
        \"numeroDocumento\": \"425-593-142326822\",
        \"direccionBodega\": \"m\",
        \"fecha\": \"11-10-2026\",
        \"email1\": \"marquardt.noah@example.com\",
        \"email2\": \"emelie.baumbach@example.net\",
        \"email3\": \"ferne52@example.com\",
        \"codigoCliente\": \"architecto\",
        \"direccion\": \"n\",
        \"telefono\": \"architecto\",
        \"idTipoIdentificacion\": 4,
        \"razonSocial\": \"n\",
        \"identificacion\": \"gzmiyvdljnikhway\",
        \"subtotal\": 62,
        \"descuento\": 54,
        \"baseGravableIva\": 38,
        \"baseNoGravableIva\": 50,
        \"montoIva\": 72,
        \"montoNeto\": 61,
        \"moneda\": \"architecto\",
        \"clave\": \"ngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujw\",
        \"codDocModificado\": \"architecto\",
        \"numDocModificado\": \"425-593-142326822\",
        \"motivo\": \"m\",
        \"fechaEmisionDocSustento\": \"11-10-2026\"
    },
    \"dataTipoImpuesto\": {
        \"codigoSriAts\": \"architecto\",
        \"codigoSriDocumentoElectronico\": \"architecto\",
        \"porcentaje\": 4326.41688
    },
    \"dataTipoImpuesto_0\": {
        \"codigoSriAts\": \"architecto\",
        \"codigoSriDocumentoElectronico\": \"architecto\",
        \"porcentaje\": 4326.41688
    },
    \"dataPago\": [
        {
            \"codigoSriDocumentoElectronico\": \"architecto\",
            \"monto\": 39,
            \"cantidadDias\": 84
        }
    ],
    \"dataItem\": [
        {
            \"codigoPrincipal\": \"z\",
            \"codigoAuxiliar\": \"m\",
            \"descripcionProducto\": \"i\",
            \"notaProducto\": \"architecto\",
            \"cantidad\": 39,
            \"precioUnitario\": 84,
            \"subtotalProducto\": 12,
            \"descuentoProducto\": 77,
            \"montoIvaProducto\": 8
        }
    ],
    \"dataItemAdicional\": [
        {
            \"campo\": \"architecto\"
        }
    ],
    \"dataInfoAdicional\": [
        {
            \"campo\": \"architecto\",
            \"contenido\": \"architecto\"
        }
    ]
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/v2/nota-credito"
);

const headers = {
    "Authorization": "Bearer Bearer {tu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "incluirDocumentos": true,
    "dataEmpresa": {
        "ambiente": 1,
        "emision": 16,
        "razonSocial": "n",
        "nombreComercial": "g",
        "ruc": "zmiyvdljnikhw",
        "direccion": "a",
        "obligadoContabilidad": "N",
        "agenteRetenedor": "S",
        "resolucionAgenteRetenedor": "architecto",
        "contribuyenteRimpe": "N",
        "contribuyenteEspecial": "N",
        "idContribuyenteEspecial": "architecto",
        "email": "zbailey@example.net"
    },
    "dataInfo": {
        "numeroDocumento": "425-593-142326822",
        "direccionBodega": "m",
        "fecha": "11-10-2026",
        "email1": "marquardt.noah@example.com",
        "email2": "emelie.baumbach@example.net",
        "email3": "ferne52@example.com",
        "codigoCliente": "architecto",
        "direccion": "n",
        "telefono": "architecto",
        "idTipoIdentificacion": 4,
        "razonSocial": "n",
        "identificacion": "gzmiyvdljnikhway",
        "subtotal": 62,
        "descuento": 54,
        "baseGravableIva": 38,
        "baseNoGravableIva": 50,
        "montoIva": 72,
        "montoNeto": 61,
        "moneda": "architecto",
        "clave": "ngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujw",
        "codDocModificado": "architecto",
        "numDocModificado": "425-593-142326822",
        "motivo": "m",
        "fechaEmisionDocSustento": "11-10-2026"
    },
    "dataTipoImpuesto": {
        "codigoSriAts": "architecto",
        "codigoSriDocumentoElectronico": "architecto",
        "porcentaje": 4326.41688
    },
    "dataTipoImpuesto_0": {
        "codigoSriAts": "architecto",
        "codigoSriDocumentoElectronico": "architecto",
        "porcentaje": 4326.41688
    },
    "dataPago": [
        {
            "codigoSriDocumentoElectronico": "architecto",
            "monto": 39,
            "cantidadDias": 84
        }
    ],
    "dataItem": [
        {
            "codigoPrincipal": "z",
            "codigoAuxiliar": "m",
            "descripcionProducto": "i",
            "notaProducto": "architecto",
            "cantidad": 39,
            "precioUnitario": 84,
            "subtotalProducto": 12,
            "descuentoProducto": 77,
            "montoIvaProducto": 8
        }
    ],
    "dataItemAdicional": [
        {
            "campo": "architecto"
        }
    ],
    "dataInfoAdicional": [
        {
            "campo": "architecto",
            "contenido": "architecto"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "COMPROBANTE AUTORIZADO"
}
 

Request      

POST api/v2/nota-credito

Headers

Authorization        

Example: Bearer Bearer {tu_token}

Content-Type        

Example: application/json

Body Parameters

incluirDocumentos   boolean  optional    

Example: true

dataEmpresa   object  optional    
ambiente   integer     

Example: 1

Must be one of:
  • 1
  • 2
emision   integer     

Example: 16

razonSocial   string     

Must not be greater than 300 characters. Example: n

nombreComercial   string     

Must not be greater than 300 characters. Example: g

ruc   string     

Must be 13 characters. Example: zmiyvdljnikhw

direccion   string     

Must not be greater than 300 characters. Example: a

obligadoContabilidad   string     

Example: N

Must be one of:
  • S
  • N
agenteRetenedor   string     

Example: S

Must be one of:
  • S
  • N
resolucionAgenteRetenedor   string  optional    

Example: architecto

contribuyenteRimpe   string     

Example: N

Must be one of:
  • S
  • N
contribuyenteEspecial   string     

Example: N

Must be one of:
  • S
  • N
idContribuyenteEspecial   string  optional    

Example: architecto

email   string     

Must be a valid email address. Example: zbailey@example.net

dataInfo   object  optional    
numeroDocumento   string     

Must match the regex /^\d{3}-\d{3}-\d{9}$/. Example: 425-593-142326822

direccionBodega   string     

Must not be greater than 300 characters. Example: m

fecha   string     

Must be a valid date in the format d-m-Y. Example: 11-10-2026

email1   string     

Must be a valid email address. Example: marquardt.noah@example.com

email2   string  optional    

Must be a valid email address. Example: emelie.baumbach@example.net

email3   string  optional    

Must be a valid email address. Example: ferne52@example.com

codigoCliente   string     

Example: architecto

direccion   string     

Must not be greater than 300 characters. Example: n

telefono   string  optional    

Example: architecto

idTipoIdentificacion   string     

Example: 4

Must be one of:
  • 4
  • 5
  • 6
  • 7
  • 8
razonSocial   string     

Must not be greater than 300 characters. Example: n

identificacion   string     

Must not be greater than 20 characters. Example: gzmiyvdljnikhway

subtotal   number     

Must be at least 0. Example: 62

descuento   number     

Must be at least 0. Example: 54

baseGravableIva   number     

Must be at least 0. Example: 38

baseNoGravableIva   number     

Must be at least 0. Example: 50

montoIva   number     

Must be at least 0. Example: 72

montoNeto   number     

Must be at least 0. Example: 61

moneda   string     

Example: architecto

clave   string     

Must be 49 characters. Example: ngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujw

codDocModificado   string     

Example: architecto

numDocModificado   string     

Must match the regex /^\d{3}-\d{3}-\d{9}$/. Example: 425-593-142326822

motivo   string     

Must not be greater than 300 characters. Example: m

fechaEmisionDocSustento   string     

Must be a valid date in the format d-m-Y. Example: 11-10-2026

dataTipoImpuesto   object  optional    
codigoSriAts   string     

Example: architecto

codigoSriDocumentoElectronico   string     

Example: architecto

porcentaje   number     

Example: 4326.41688

dataTipoImpuesto_0   object  optional    
codigoSriAts   string     

Example: architecto

codigoSriDocumentoElectronico   string     

Example: architecto

porcentaje   number     

Example: 4326.41688

dataPago   object[]     

Must have at least 1 items.

codigoSriDocumentoElectronico   string     

Example: architecto

monto   number     

Must be at least 0. Example: 39

cantidadDias   number     

Must be at least 0. Example: 84

dataItem   object[]     

Must have at least 1 items.

codigoPrincipal   string     

Must not be greater than 25 characters. Example: z

codigoAuxiliar   string     

Must not be greater than 25 characters. Example: m

descripcionProducto   string     

Must not be greater than 300 characters. Example: i

notaProducto   string     

Example: architecto

cantidad   number     

Must be at least 0. Example: 39

precioUnitario   number     

Must be at least 0. Example: 84

subtotalProducto   number     

Must be at least 0. Example: 12

descuentoProducto   number     

Must be at least 0. Example: 77

montoIvaProducto   number     

Must be at least 0. Example: 8

dataItemAdicional   object[]  optional    
campo   string     

Example: architecto

dataInfoAdicional   object[]  optional    
campo   string     

Example: architecto

contenido   string     

Example: architecto

Crear Factura Asíncrona (Background)

requires authentication

Encola una factura para su procesamiento en segundo plano. Ideal para alta concurrencia. Retorna inmediatamente con estado "ENCOLADO".

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/v2/factura/async" \
    --header "Authorization: Bearer Bearer {tu_token}" \
    --header "Content-Type: application/json" \
    --data "{
    \"incluirDocumentos\": true,
    \"dataEmpresa\": {
        \"ambiente\": 2,
        \"emision\": 16,
        \"razonSocial\": \"n\",
        \"nombreComercial\": \"g\",
        \"ruc\": \"zmiyvdljnikhw\",
        \"direccion\": \"a\",
        \"obligadoContabilidad\": \"N\",
        \"agenteRetenedor\": \"N\",
        \"resolucionAgenteRetenedor\": \"architecto\",
        \"contribuyenteRimpe\": \"N\",
        \"contribuyenteEspecial\": \"N\",
        \"idContribuyenteEspecial\": \"architecto\",
        \"email\": \"zbailey@example.net\"
    },
    \"dataVenta\": {
        \"numeroDocumento\": \"425-593-142326822\",
        \"direccionBodega\": \"m\",
        \"fecha\": \"11-10-2026\",
        \"email1\": \"marquardt.noah@example.com\",
        \"email2\": \"emelie.baumbach@example.net\",
        \"email3\": \"ferne52@example.com\",
        \"codigoCliente\": \"architecto\",
        \"direccion\": \"n\",
        \"telefono\": \"architecto\",
        \"idTipoIdentificacion\": 4,
        \"razonSocial\": \"n\",
        \"identificacion\": \"gzmiyvdljnikhway\",
        \"subtotal\": 62,
        \"descuento\": 54,
        \"baseGravableIva\": 38,
        \"baseNoGravableIva\": 50,
        \"montoIva\": 72,
        \"montoRecargo\": 61,
        \"flete\": 67,
        \"montoNeto\": 61,
        \"moneda\": \"architecto\",
        \"clave\": \"ngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujw\"
    },
    \"dataTipoImpuesto\": {
        \"codigoSriAts\": \"architecto\",
        \"codigoSriDocumentoElectronico\": \"architecto\",
        \"porcentaje\": 4326.41688
    },
    \"dataTipoImpuesto_0\": {
        \"codigoSriAts\": \"architecto\",
        \"codigoSriDocumentoElectronico\": \"architecto\",
        \"porcentaje\": 4326.41688
    },
    \"dataPago\": [
        {
            \"codigoSriDocumentoElectronico\": \"architecto\",
            \"monto\": 39,
            \"cantidadDias\": 84
        }
    ],
    \"dataItem\": [
        {
            \"codigoPrincipal\": \"z\",
            \"codigoAuxiliar\": \"m\",
            \"descripcionProducto\": \"i\",
            \"notaProducto\": \"architecto\",
            \"cantidad\": 39,
            \"precioUnitario\": 84,
            \"subtotalProducto\": 12,
            \"descuentoProducto\": 77,
            \"montoIvaProducto\": 8
        }
    ],
    \"dataItemAdicional\": [
        {
            \"campo\": \"architecto\"
        }
    ],
    \"dataInfoAdicional\": [
        {
            \"campo\": \"architecto\",
            \"contenido\": \"architecto\"
        }
    ]
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/v2/factura/async"
);

const headers = {
    "Authorization": "Bearer Bearer {tu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "incluirDocumentos": true,
    "dataEmpresa": {
        "ambiente": 2,
        "emision": 16,
        "razonSocial": "n",
        "nombreComercial": "g",
        "ruc": "zmiyvdljnikhw",
        "direccion": "a",
        "obligadoContabilidad": "N",
        "agenteRetenedor": "N",
        "resolucionAgenteRetenedor": "architecto",
        "contribuyenteRimpe": "N",
        "contribuyenteEspecial": "N",
        "idContribuyenteEspecial": "architecto",
        "email": "zbailey@example.net"
    },
    "dataVenta": {
        "numeroDocumento": "425-593-142326822",
        "direccionBodega": "m",
        "fecha": "11-10-2026",
        "email1": "marquardt.noah@example.com",
        "email2": "emelie.baumbach@example.net",
        "email3": "ferne52@example.com",
        "codigoCliente": "architecto",
        "direccion": "n",
        "telefono": "architecto",
        "idTipoIdentificacion": 4,
        "razonSocial": "n",
        "identificacion": "gzmiyvdljnikhway",
        "subtotal": 62,
        "descuento": 54,
        "baseGravableIva": 38,
        "baseNoGravableIva": 50,
        "montoIva": 72,
        "montoRecargo": 61,
        "flete": 67,
        "montoNeto": 61,
        "moneda": "architecto",
        "clave": "ngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujw"
    },
    "dataTipoImpuesto": {
        "codigoSriAts": "architecto",
        "codigoSriDocumentoElectronico": "architecto",
        "porcentaje": 4326.41688
    },
    "dataTipoImpuesto_0": {
        "codigoSriAts": "architecto",
        "codigoSriDocumentoElectronico": "architecto",
        "porcentaje": 4326.41688
    },
    "dataPago": [
        {
            "codigoSriDocumentoElectronico": "architecto",
            "monto": 39,
            "cantidadDias": 84
        }
    ],
    "dataItem": [
        {
            "codigoPrincipal": "z",
            "codigoAuxiliar": "m",
            "descripcionProducto": "i",
            "notaProducto": "architecto",
            "cantidad": 39,
            "precioUnitario": 84,
            "subtotalProducto": 12,
            "descuentoProducto": 77,
            "montoIvaProducto": 8
        }
    ],
    "dataItemAdicional": [
        {
            "campo": "architecto"
        }
    ],
    "dataInfoAdicional": [
        {
            "campo": "architecto",
            "contenido": "architecto"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Documento encolado exitosamente",
    "data": {
        "status": "ENCOLADO",
        "access_key": "0502202601179001122300110010100000123451234567812"
    }
}
 

Request      

POST api/v2/factura/async

Headers

Authorization        

Example: Bearer Bearer {tu_token}

Content-Type        

Example: application/json

Body Parameters

incluirDocumentos   boolean  optional    

Example: true

dataEmpresa   object  optional    
ambiente   integer     

Example: 2

Must be one of:
  • 1
  • 2
emision   integer     

Example: 16

razonSocial   string     

Must not be greater than 300 characters. Example: n

nombreComercial   string     

Must not be greater than 300 characters. Example: g

ruc   string     

Must be 13 characters. Example: zmiyvdljnikhw

direccion   string     

Must not be greater than 300 characters. Example: a

obligadoContabilidad   string     

Example: N

Must be one of:
  • S
  • N
agenteRetenedor   string     

Example: N

Must be one of:
  • S
  • N
resolucionAgenteRetenedor   string  optional    

Example: architecto

contribuyenteRimpe   string     

Example: N

Must be one of:
  • S
  • N
contribuyenteEspecial   string     

Example: N

Must be one of:
  • S
  • N
idContribuyenteEspecial   string  optional    

Example: architecto

email   string     

Must be a valid email address. Example: zbailey@example.net

dataVenta   object  optional    
numeroDocumento   string     

Must match the regex /^\d{3}-\d{3}-\d{9}$/. Example: 425-593-142326822

direccionBodega   string     

Must not be greater than 300 characters. Example: m

fecha   string     

Must be a valid date in the format d-m-Y. Example: 11-10-2026

email1   string     

Must be a valid email address. Example: marquardt.noah@example.com

email2   string  optional    

Must be a valid email address. Example: emelie.baumbach@example.net

email3   string  optional    

Must be a valid email address. Example: ferne52@example.com

codigoCliente   string     

Example: architecto

direccion   string     

Must not be greater than 300 characters. Example: n

telefono   string  optional    

Example: architecto

idTipoIdentificacion   string     

Example: 4

Must be one of:
  • 4
  • 5
  • 6
  • 7
  • 8
razonSocial   string     

Must not be greater than 300 characters. Example: n

identificacion   string     

Must not be greater than 20 characters. Example: gzmiyvdljnikhway

subtotal   number     

Must be at least 0. Example: 62

descuento   number     

Must be at least 0. Example: 54

baseGravableIva   number     

Must be at least 0. Example: 38

baseNoGravableIva   number     

Must be at least 0. Example: 50

montoIva   number     

Must be at least 0. Example: 72

montoRecargo   number     

Must be at least 0. Example: 61

flete   number     

Must be at least 0. Example: 67

montoNeto   number     

Must be at least 0. Example: 61

moneda   string     

Example: architecto

clave   string     

Must be 49 characters. Example: ngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujw

dataTipoImpuesto   object  optional    
codigoSriAts   string     

Example: architecto

codigoSriDocumentoElectronico   string     

Example: architecto

porcentaje   number     

Example: 4326.41688

dataTipoImpuesto_0   object  optional    
codigoSriAts   string     

Example: architecto

codigoSriDocumentoElectronico   string     

Example: architecto

porcentaje   number     

Example: 4326.41688

dataPago   object[]     

Must have at least 1 items.

codigoSriDocumentoElectronico   string     

Example: architecto

monto   number     

Must be at least 0. Example: 39

cantidadDias   number     

Must be at least 0. Example: 84

dataItem   object[]     

Must have at least 1 items.

codigoPrincipal   string     

Must not be greater than 25 characters. Example: z

codigoAuxiliar   string     

Must not be greater than 25 characters. Example: m

descripcionProducto   string     

Must not be greater than 300 characters. Example: i

notaProducto   string     

Example: architecto

cantidad   number     

Must be at least 0. Example: 39

precioUnitario   number     

Must be at least 0. Example: 84

subtotalProducto   number     

Must be at least 0. Example: 12

descuentoProducto   number     

Must be at least 0. Example: 77

montoIvaProducto   number     

Must be at least 0. Example: 8

dataItemAdicional   object[]  optional    
campo   string     

Example: architecto

dataInfoAdicional   object[]  optional    
campo   string     

Example: architecto

contenido   string     

Example: architecto

Crear Nota de Crédito Asíncrona

requires authentication

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/v2/nota-credito/async" \
    --header "Authorization: Bearer Bearer {tu_token}" \
    --header "Content-Type: application/json" \
    --data "{
    \"incluirDocumentos\": false,
    \"dataEmpresa\": {
        \"ambiente\": 2,
        \"emision\": 16,
        \"razonSocial\": \"n\",
        \"nombreComercial\": \"g\",
        \"ruc\": \"zmiyvdljnikhw\",
        \"direccion\": \"a\",
        \"obligadoContabilidad\": \"S\",
        \"agenteRetenedor\": \"N\",
        \"resolucionAgenteRetenedor\": \"architecto\",
        \"contribuyenteRimpe\": \"S\",
        \"contribuyenteEspecial\": \"S\",
        \"idContribuyenteEspecial\": \"architecto\",
        \"email\": \"zbailey@example.net\"
    },
    \"dataInfo\": {
        \"numeroDocumento\": \"425-593-142326822\",
        \"direccionBodega\": \"m\",
        \"fecha\": \"11-10-2026\",
        \"email1\": \"marquardt.noah@example.com\",
        \"email2\": \"emelie.baumbach@example.net\",
        \"email3\": \"ferne52@example.com\",
        \"codigoCliente\": \"architecto\",
        \"direccion\": \"n\",
        \"telefono\": \"architecto\",
        \"idTipoIdentificacion\": 7,
        \"razonSocial\": \"n\",
        \"identificacion\": \"gzmiyvdljnikhway\",
        \"subtotal\": 62,
        \"descuento\": 54,
        \"baseGravableIva\": 38,
        \"baseNoGravableIva\": 50,
        \"montoIva\": 72,
        \"montoNeto\": 61,
        \"moneda\": \"architecto\",
        \"clave\": \"ngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujw\",
        \"codDocModificado\": \"architecto\",
        \"numDocModificado\": \"425-593-142326822\",
        \"motivo\": \"m\",
        \"fechaEmisionDocSustento\": \"11-10-2026\"
    },
    \"dataTipoImpuesto\": {
        \"codigoSriAts\": \"architecto\",
        \"codigoSriDocumentoElectronico\": \"architecto\",
        \"porcentaje\": 4326.41688
    },
    \"dataTipoImpuesto_0\": {
        \"codigoSriAts\": \"architecto\",
        \"codigoSriDocumentoElectronico\": \"architecto\",
        \"porcentaje\": 4326.41688
    },
    \"dataPago\": [
        {
            \"codigoSriDocumentoElectronico\": \"architecto\",
            \"monto\": 39,
            \"cantidadDias\": 84
        }
    ],
    \"dataItem\": [
        {
            \"codigoPrincipal\": \"z\",
            \"codigoAuxiliar\": \"m\",
            \"descripcionProducto\": \"i\",
            \"notaProducto\": \"architecto\",
            \"cantidad\": 39,
            \"precioUnitario\": 84,
            \"subtotalProducto\": 12,
            \"descuentoProducto\": 77,
            \"montoIvaProducto\": 8
        }
    ],
    \"dataItemAdicional\": [
        {
            \"campo\": \"architecto\"
        }
    ],
    \"dataInfoAdicional\": [
        {
            \"campo\": \"architecto\",
            \"contenido\": \"architecto\"
        }
    ]
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/v2/nota-credito/async"
);

const headers = {
    "Authorization": "Bearer Bearer {tu_token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "incluirDocumentos": false,
    "dataEmpresa": {
        "ambiente": 2,
        "emision": 16,
        "razonSocial": "n",
        "nombreComercial": "g",
        "ruc": "zmiyvdljnikhw",
        "direccion": "a",
        "obligadoContabilidad": "S",
        "agenteRetenedor": "N",
        "resolucionAgenteRetenedor": "architecto",
        "contribuyenteRimpe": "S",
        "contribuyenteEspecial": "S",
        "idContribuyenteEspecial": "architecto",
        "email": "zbailey@example.net"
    },
    "dataInfo": {
        "numeroDocumento": "425-593-142326822",
        "direccionBodega": "m",
        "fecha": "11-10-2026",
        "email1": "marquardt.noah@example.com",
        "email2": "emelie.baumbach@example.net",
        "email3": "ferne52@example.com",
        "codigoCliente": "architecto",
        "direccion": "n",
        "telefono": "architecto",
        "idTipoIdentificacion": 7,
        "razonSocial": "n",
        "identificacion": "gzmiyvdljnikhway",
        "subtotal": 62,
        "descuento": 54,
        "baseGravableIva": 38,
        "baseNoGravableIva": 50,
        "montoIva": 72,
        "montoNeto": 61,
        "moneda": "architecto",
        "clave": "ngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujw",
        "codDocModificado": "architecto",
        "numDocModificado": "425-593-142326822",
        "motivo": "m",
        "fechaEmisionDocSustento": "11-10-2026"
    },
    "dataTipoImpuesto": {
        "codigoSriAts": "architecto",
        "codigoSriDocumentoElectronico": "architecto",
        "porcentaje": 4326.41688
    },
    "dataTipoImpuesto_0": {
        "codigoSriAts": "architecto",
        "codigoSriDocumentoElectronico": "architecto",
        "porcentaje": 4326.41688
    },
    "dataPago": [
        {
            "codigoSriDocumentoElectronico": "architecto",
            "monto": 39,
            "cantidadDias": 84
        }
    ],
    "dataItem": [
        {
            "codigoPrincipal": "z",
            "codigoAuxiliar": "m",
            "descripcionProducto": "i",
            "notaProducto": "architecto",
            "cantidad": 39,
            "precioUnitario": 84,
            "subtotalProducto": 12,
            "descuentoProducto": 77,
            "montoIvaProducto": 8
        }
    ],
    "dataItemAdicional": [
        {
            "campo": "architecto"
        }
    ],
    "dataInfoAdicional": [
        {
            "campo": "architecto",
            "contenido": "architecto"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v2/nota-credito/async

Headers

Authorization        

Example: Bearer Bearer {tu_token}

Content-Type        

Example: application/json

Body Parameters

incluirDocumentos   boolean  optional    

Example: false

dataEmpresa   object  optional    
ambiente   integer     

Example: 2

Must be one of:
  • 1
  • 2
emision   integer     

Example: 16

razonSocial   string     

Must not be greater than 300 characters. Example: n

nombreComercial   string     

Must not be greater than 300 characters. Example: g

ruc   string     

Must be 13 characters. Example: zmiyvdljnikhw

direccion   string     

Must not be greater than 300 characters. Example: a

obligadoContabilidad   string     

Example: S

Must be one of:
  • S
  • N
agenteRetenedor   string     

Example: N

Must be one of:
  • S
  • N
resolucionAgenteRetenedor   string  optional    

Example: architecto

contribuyenteRimpe   string     

Example: S

Must be one of:
  • S
  • N
contribuyenteEspecial   string     

Example: S

Must be one of:
  • S
  • N
idContribuyenteEspecial   string  optional    

Example: architecto

email   string     

Must be a valid email address. Example: zbailey@example.net

dataInfo   object  optional    
numeroDocumento   string     

Must match the regex /^\d{3}-\d{3}-\d{9}$/. Example: 425-593-142326822

direccionBodega   string     

Must not be greater than 300 characters. Example: m

fecha   string     

Must be a valid date in the format d-m-Y. Example: 11-10-2026

email1   string     

Must be a valid email address. Example: marquardt.noah@example.com

email2   string  optional    

Must be a valid email address. Example: emelie.baumbach@example.net

email3   string  optional    

Must be a valid email address. Example: ferne52@example.com

codigoCliente   string     

Example: architecto

direccion   string     

Must not be greater than 300 characters. Example: n

telefono   string  optional    

Example: architecto

idTipoIdentificacion   string     

Example: 7

Must be one of:
  • 4
  • 5
  • 6
  • 7
  • 8
razonSocial   string     

Must not be greater than 300 characters. Example: n

identificacion   string     

Must not be greater than 20 characters. Example: gzmiyvdljnikhway

subtotal   number     

Must be at least 0. Example: 62

descuento   number     

Must be at least 0. Example: 54

baseGravableIva   number     

Must be at least 0. Example: 38

baseNoGravableIva   number     

Must be at least 0. Example: 50

montoIva   number     

Must be at least 0. Example: 72

montoNeto   number     

Must be at least 0. Example: 61

moneda   string     

Example: architecto

clave   string     

Must be 49 characters. Example: ngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujw

codDocModificado   string     

Example: architecto

numDocModificado   string     

Must match the regex /^\d{3}-\d{3}-\d{9}$/. Example: 425-593-142326822

motivo   string     

Must not be greater than 300 characters. Example: m

fechaEmisionDocSustento   string     

Must be a valid date in the format d-m-Y. Example: 11-10-2026

dataTipoImpuesto   object  optional    
codigoSriAts   string     

Example: architecto

codigoSriDocumentoElectronico   string     

Example: architecto

porcentaje   number     

Example: 4326.41688

dataTipoImpuesto_0   object  optional    
codigoSriAts   string     

Example: architecto

codigoSriDocumentoElectronico   string     

Example: architecto

porcentaje   number     

Example: 4326.41688

dataPago   object[]     

Must have at least 1 items.

codigoSriDocumentoElectronico   string     

Example: architecto

monto   number     

Must be at least 0. Example: 39

cantidadDias   number     

Must be at least 0. Example: 84

dataItem   object[]     

Must have at least 1 items.

codigoPrincipal   string     

Must not be greater than 25 characters. Example: z

codigoAuxiliar   string     

Must not be greater than 25 characters. Example: m

descripcionProducto   string     

Must not be greater than 300 characters. Example: i

notaProducto   string     

Example: architecto

cantidad   number     

Must be at least 0. Example: 39

precioUnitario   number     

Must be at least 0. Example: 84

subtotalProducto   number     

Must be at least 0. Example: 12

descuentoProducto   number     

Must be at least 0. Example: 77

montoIvaProducto   number     

Must be at least 0. Example: 8

dataItemAdicional   object[]  optional    
campo   string     

Example: architecto

dataInfoAdicional   object[]  optional    
campo   string     

Example: architecto

contenido   string     

Example: architecto

Consultar estado de un documento por clave de acceso

requires authentication

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/v2/documento/architecto" \
    --header "Authorization: Bearer Bearer {tu_token}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/v2/documento/architecto"
);

const headers = {
    "Authorization": "Bearer Bearer {tu_token}",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Request      

GET api/v2/documento/{accessKey}

Headers

Authorization        

Example: Bearer Bearer {tu_token}

URL Parameters

accessKey   string     

Example: architecto

Verificar si un documento existe (idempotencia)

requires authentication

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/v2/documento/exists" \
    --header "Authorization: Bearer Bearer {tu_token}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/v2/documento/exists"
);

const headers = {
    "Authorization": "Bearer Bearer {tu_token}",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v2/documento/exists

Headers

Authorization        

Example: Bearer Bearer {tu_token}

Recuperar documentos (XML autorizado + RIDE) por clave de acceso

requires authentication

Pensado para sistemas que emiten con la bandera incluirDocumentos: false y descargan los documentos bajo demanda usando la clave de acceso (que coincide con el número de autorización en el esquema offline del SRI).

Si los archivos no existen localmente, se intentan recuperar automáticamente desde el SRI. El XML y el RIDE se devuelven comprimidos con gzip y codificados en base64.

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/v2/documento/architecto/archivos" \
    --header "Authorization: Bearer Bearer {tu_token}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/v2/documento/architecto/archivos"
);

const headers = {
    "Authorization": "Bearer Bearer {tu_token}",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Documento obtenido exitosamente",
    "data": {
        "access_key": "0502202601179001122300110010100000123451234567812",
        "status": "AUTORIZADO",
        "document_number": "001-010-000012345",
        "authorization_number": "0502202601179001122300110010100000123451234567812",
        "authorization_date": "2026-02-05 15:30:00",
        "xml_authorized": "H4sIAAAA... (base64 de gzip)",
        "pdf_ride": "H4sIAAAA... (base64 de gzip)",
        "recovered_from_sri": false
    }
}
 

Example response (404):


{
    "success": false,
    "message": "No se pudo obtener el documento"
}
 

Request      

GET api/v2/documento/{accessKey}/archivos

Headers

Authorization        

Example: Bearer Bearer {tu_token}

URL Parameters

accessKey   string     

Example: architecto

Descargar XML autorizado (archivo directo) por clave de acceso

requires authentication

Devuelve el XML como archivo descargable (Content-Disposition: attachment). Sirve como "URL de descarga" para enlazar directamente desde el sistema externo. Si no existe localmente, intenta recuperarlo del SRI.

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/v2/documento/architecto/xml" \
    --header "Authorization: Bearer Bearer {tu_token}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/v2/documento/architecto/xml"
);

const headers = {
    "Authorization": "Bearer Bearer {tu_token}",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Request      

GET api/v2/documento/{accessKey}/xml

Headers

Authorization        

Example: Bearer Bearer {tu_token}

URL Parameters

accessKey   string     

Example: architecto

Descargar RIDE (PDF) por clave de acceso

requires authentication

Devuelve el RIDE como archivo PDF descargable. Si no existe localmente, intenta recuperarlo/regenerarlo a partir de los datos del SRI.

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/v2/documento/architecto/pdf" \
    --header "Authorization: Bearer Bearer {tu_token}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/v2/documento/architecto/pdf"
);

const headers = {
    "Authorization": "Bearer Bearer {tu_token}",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Request      

GET api/v2/documento/{accessKey}/pdf

Headers

Authorization        

Example: Bearer Bearer {tu_token}

URL Parameters

accessKey   string     

Example: architecto

Gestión de Empresas

Endpoints para la administración de empresas emisoras.

Listar empresas según permisos del usuario - Admins: ven todas las empresas - Usuarios normales: solo ven las empresas asignadas a su RUC

requires authentication

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/business" \
    --header "Authorization: Bearer Bearer {tu_token}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/business"
);

const headers = {
    "Authorization": "Bearer Bearer {tu_token}",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Request      

GET api/business

Headers

Authorization        

Example: Bearer Bearer {tu_token}

Registrar nueva empresa

requires authentication

Permite a un administrador registrar una nueva empresa emisora. Requiere firma digital (.p12) y logo opcional.

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/business" \
    --header "Authorization: Bearer Bearer {tu_token}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/business"
);

const headers = {
    "Authorization": "Bearer Bearer {tu_token}",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (201):


{
    "success": true,
    "message": "Empresa registrada exitosamente",
    "data": {
        "id": 1,
        "name": "MI EMPRESA S.A.",
        "ruc": "1790011223001"
    }
}
 

Request      

POST api/business

Headers

Authorization        

Example: Bearer Bearer {tu_token}

Obtener una empresa específica - Admins: pueden ver cualquier empresa - Usuarios normales: solo pueden ver su empresa asignada

requires authentication

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/business/architecto" \
    --header "Authorization: Bearer Bearer {tu_token}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/business/architecto"
);

const headers = {
    "Authorization": "Bearer Bearer {tu_token}",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Request      

GET api/business/{id}

Headers

Authorization        

Example: Bearer Bearer {tu_token}

URL Parameters

id   string     

The ID of the business. Example: architecto

Buscar empresa por RUC - Admins: pueden buscar cualquier RUC - Usuarios normales: solo pueden buscar su RUC asignado

requires authentication

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/business/ruc/architecto" \
    --header "Authorization: Bearer Bearer {tu_token}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/business/ruc/architecto"
);

const headers = {
    "Authorization": "Bearer Bearer {tu_token}",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Request      

GET api/business/ruc/{ruc}

Headers

Authorization        

Example: Bearer Bearer {tu_token}

URL Parameters

ruc   string     

The ruc. Example: architecto

Actualizar empresa existente - Admins: pueden actualizar cualquier empresa - Usuarios normales: solo pueden actualizar su empresa asignada

requires authentication

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/business/architecto" \
    --header "Authorization: Bearer Bearer {tu_token}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/business/architecto"
);

const headers = {
    "Authorization": "Bearer Bearer {tu_token}",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/business/{id}

Headers

Authorization        

Example: Bearer Bearer {tu_token}

URL Parameters

id   string     

The ID of the business. Example: architecto

Eliminar empresa (soft delete) Solo administradores pueden eliminar empresas

requires authentication

Example request:
curl --request DELETE \
    "https://autorizaciones.jfpcode.com/api/business/architecto" \
    --header "Authorization: Bearer Bearer {tu_token}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/business/architecto"
);

const headers = {
    "Authorization": "Bearer Bearer {tu_token}",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/business/{id}

Headers

Authorization        

Example: Bearer Bearer {tu_token}

URL Parameters

id   string     

The ID of the business. Example: architecto

Obtener información del certificado digital de una empresa - Admins: pueden ver certificado de cualquier empresa - Usuarios normales: solo pueden ver certificado de su empresa

requires authentication

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/business/architecto/certificate" \
    --header "Authorization: Bearer Bearer {tu_token}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/business/architecto/certificate"
);

const headers = {
    "Authorization": "Bearer Bearer {tu_token}",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Request      

GET api/business/{id}/certificate

Headers

Authorization        

Example: Bearer Bearer {tu_token}

URL Parameters

id   string     

The ID of the business. Example: architecto

Otros Endpoints

GET api/user

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/user"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/user"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/user

POST api/liquidacion/create

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/liquidacion/create" \
    --header "Content-Type: application/json" \
    --data "{
    \"dataEmpresa\": {
        \"ambiente\": 16,
        \"emision\": 16,
        \"razonSocial\": \"architecto\",
        \"nombreComercial\": \"architecto\",
        \"ruc\": \"architecto\",
        \"direccion\": \"architecto\",
        \"obligadoContabilidad\": \"architecto\",
        \"agenteRetenedor\": \"architecto\",
        \"resolucionAgenteRetenedor\": \"architecto\",
        \"contribuyenteRimpe\": \"architecto\",
        \"contribuyenteEspecial\": \"architecto\",
        \"email\": \"zbailey@example.net\"
    },
    \"dataInfo\": {
        \"numeroDocumento\": \"architecto\",
        \"direccionBodega\": \"architecto\",
        \"fecha\": \"11-10-2026\",
        \"email1\": \"zbailey@example.net\",
        \"email2\": \"gulgowski.asia@example.com\",
        \"email3\": \"idickens@example.org\",
        \"codigoCliente\": \"architecto\",
        \"direccion\": \"architecto\",
        \"telefono\": \"architecto\",
        \"idTipoIdentificacion\": \"architecto\",
        \"razonSocial\": \"architecto\",
        \"identificacion\": \"architecto\",
        \"subtotal\": 4326.41688,
        \"descuento\": 4326.41688,
        \"baseGravableIva\": 4326.41688,
        \"baseNoGravableIva\": 4326.41688,
        \"montoIva\": 4326.41688,
        \"montoNeto\": 4326.41688,
        \"moneda\": \"architecto\",
        \"clave\": \"architecto\"
    },
    \"dataTipoImpuesto\": {
        \"codigoSriAts\": \"architecto\",
        \"codigoSriDocumentoElectronico\": \"architecto\",
        \"porcentaje\": 4326.41688
    },
    \"dataTipoImpuesto_0\": {
        \"codigoSriAts\": \"architecto\",
        \"codigoSriDocumentoElectronico\": \"architecto\",
        \"porcentaje\": 4326.41688
    },
    \"dataPago\": [
        {
            \"codigoSriDocumentoElectronico\": \"architecto\",
            \"monto\": 4326.41688,
            \"cantidadDias\": 4326.41688
        }
    ],
    \"dataItem\": [
        {
            \"codigoPrincipal\": \"architecto\",
            \"codigoAuxiliar\": \"architecto\",
            \"descripcionProducto\": \"architecto\",
            \"notaProducto\": \"architecto\",
            \"cantidad\": 4326.41688,
            \"precioUnitario\": 4326.41688,
            \"subtotalProducto\": 4326.41688,
            \"descuentoProducto\": 4326.41688,
            \"montoIvaProducto\": 4326.41688
        }
    ],
    \"dataItemAdicional\": [
        {
            \"campo\": \"architecto\"
        }
    ],
    \"dataInfoAdicional\": [
        {
            \"campo\": \"architecto\",
            \"contenido\": \"architecto\"
        }
    ]
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/liquidacion/create"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "dataEmpresa": {
        "ambiente": 16,
        "emision": 16,
        "razonSocial": "architecto",
        "nombreComercial": "architecto",
        "ruc": "architecto",
        "direccion": "architecto",
        "obligadoContabilidad": "architecto",
        "agenteRetenedor": "architecto",
        "resolucionAgenteRetenedor": "architecto",
        "contribuyenteRimpe": "architecto",
        "contribuyenteEspecial": "architecto",
        "email": "zbailey@example.net"
    },
    "dataInfo": {
        "numeroDocumento": "architecto",
        "direccionBodega": "architecto",
        "fecha": "11-10-2026",
        "email1": "zbailey@example.net",
        "email2": "gulgowski.asia@example.com",
        "email3": "idickens@example.org",
        "codigoCliente": "architecto",
        "direccion": "architecto",
        "telefono": "architecto",
        "idTipoIdentificacion": "architecto",
        "razonSocial": "architecto",
        "identificacion": "architecto",
        "subtotal": 4326.41688,
        "descuento": 4326.41688,
        "baseGravableIva": 4326.41688,
        "baseNoGravableIva": 4326.41688,
        "montoIva": 4326.41688,
        "montoNeto": 4326.41688,
        "moneda": "architecto",
        "clave": "architecto"
    },
    "dataTipoImpuesto": {
        "codigoSriAts": "architecto",
        "codigoSriDocumentoElectronico": "architecto",
        "porcentaje": 4326.41688
    },
    "dataTipoImpuesto_0": {
        "codigoSriAts": "architecto",
        "codigoSriDocumentoElectronico": "architecto",
        "porcentaje": 4326.41688
    },
    "dataPago": [
        {
            "codigoSriDocumentoElectronico": "architecto",
            "monto": 4326.41688,
            "cantidadDias": 4326.41688
        }
    ],
    "dataItem": [
        {
            "codigoPrincipal": "architecto",
            "codigoAuxiliar": "architecto",
            "descripcionProducto": "architecto",
            "notaProducto": "architecto",
            "cantidad": 4326.41688,
            "precioUnitario": 4326.41688,
            "subtotalProducto": 4326.41688,
            "descuentoProducto": 4326.41688,
            "montoIvaProducto": 4326.41688
        }
    ],
    "dataItemAdicional": [
        {
            "campo": "architecto"
        }
    ],
    "dataInfoAdicional": [
        {
            "campo": "architecto",
            "contenido": "architecto"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/liquidacion/create

Headers

Content-Type        

Example: application/json

Body Parameters

dataEmpresa   object  optional    
ambiente   integer     

dataEmpresa /. Example: 16

emision   integer     

Example: 16

razonSocial   string     

Example: architecto

nombreComercial   string     

Example: architecto

ruc   string     

Example: architecto

direccion   string     

Example: architecto

obligadoContabilidad   string     

Example: architecto

agenteRetenedor   string     

Example: architecto

resolucionAgenteRetenedor   string  optional    

Example: architecto

contribuyenteRimpe   string     

Example: architecto

contribuyenteEspecial   string     

Example: architecto

idContribuyenteEspecial   string  optional    
email   string     

Must be a valid email address. Example: zbailey@example.net

dataInfo   object  optional    
numeroDocumento   string     

dataInfo /. Example: architecto

direccionBodega   string     

Example: architecto

fecha   string     

Must be a valid date in the format d-m-Y. Example: 11-10-2026

email1   string     

Must be a valid email address. Example: zbailey@example.net

email2   string  optional    

Must be a valid email address. Example: gulgowski.asia@example.com

email3   string  optional    

Must be a valid email address. Example: idickens@example.org

codigoCliente   string     

Example: architecto

direccion   string     

Example: architecto

telefono   string  optional    

Example: architecto

idTipoIdentificacion   string     

Example: architecto

razonSocial   string     

Example: architecto

identificacion   string     

Example: architecto

subtotal   number     

Example: 4326.41688

descuento   number     

Example: 4326.41688

baseGravableIva   number     

Example: 4326.41688

baseNoGravableIva   number     

Example: 4326.41688

montoIva   number     

Example: 4326.41688

montoNeto   number     

Example: 4326.41688

moneda   string     

Example: architecto

clave   string     

Example: architecto

dataTipoImpuesto   object  optional    
codigoSriAts   string     

dataTipoImpuesto /. Example: architecto

codigoSriDocumentoElectronico   string     

Example: architecto

porcentaje   number     

Example: 4326.41688

dataTipoImpuesto_0   object  optional    
codigoSriAts   string     

Example: architecto

codigoSriDocumentoElectronico   string     

Example: architecto

porcentaje   number     

Example: 4326.41688

dataPago   object[]     

dataPago /. Must have at least 1 items.

codigoSriDocumentoElectronico   string     

Example: architecto

monto   number     

Example: 4326.41688

cantidadDias   number     

Example: 4326.41688

dataItem   object[]     

dataTipoImpuesto /. Must have at least 1 items.

codigoPrincipal   string     

Example: architecto

codigoAuxiliar   string     

Example: architecto

descripcionProducto   string     

Example: architecto

notaProducto   string     

Example: architecto

cantidad   number     

Example: 4326.41688

precioUnitario   number     

Example: 4326.41688

subtotalProducto   number     

Example: 4326.41688

descuentoProducto   number     

Example: 4326.41688

montoIvaProducto   number     

Example: 4326.41688

dataItemAdicional   object[]  optional    

dataItemAdicional /.

campo   string     

Example: architecto

dataInfoAdicional   object[]  optional    

dataInfoAdicional /.

campo   string     

Example: architecto

contenido   string     

Example: architecto

POST api/notacredito/create

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/notacredito/create" \
    --header "Content-Type: application/json" \
    --data "{
    \"dataEmpresa\": {
        \"ambiente\": 16,
        \"emision\": 16,
        \"razonSocial\": \"architecto\",
        \"nombreComercial\": \"architecto\",
        \"ruc\": \"architecto\",
        \"direccion\": \"architecto\",
        \"obligadoContabilidad\": \"architecto\",
        \"agenteRetenedor\": \"architecto\",
        \"resolucionAgenteRetenedor\": \"architecto\",
        \"contribuyenteRimpe\": \"architecto\",
        \"contribuyenteEspecial\": \"architecto\",
        \"email\": \"zbailey@example.net\"
    },
    \"dataInfo\": {
        \"numeroDocumento\": \"architecto\",
        \"direccionBodega\": \"architecto\",
        \"fecha\": \"11-10-2026\",
        \"email1\": \"zbailey@example.net\",
        \"email2\": \"gulgowski.asia@example.com\",
        \"email3\": \"idickens@example.org\",
        \"codigoCliente\": \"architecto\",
        \"direccion\": \"architecto\",
        \"telefono\": \"architecto\",
        \"idTipoIdentificacion\": \"architecto\",
        \"razonSocial\": \"architecto\",
        \"identificacion\": \"architecto\",
        \"subtotal\": 4326.41688,
        \"descuento\": 4326.41688,
        \"baseGravableIva\": 4326.41688,
        \"baseNoGravableIva\": 4326.41688,
        \"montoIva\": 4326.41688,
        \"montoNeto\": 4326.41688,
        \"moneda\": \"architecto\",
        \"clave\": \"architecto\",
        \"codDocModificado\": \"architecto\",
        \"numDocModificado\": \"architecto\",
        \"motivo\": \"architecto\",
        \"fechaEmisionDocSustento\": \"11-10-2026\"
    },
    \"dataTipoImpuesto\": {
        \"codigoSriAts\": \"architecto\",
        \"codigoSriDocumentoElectronico\": \"architecto\",
        \"porcentaje\": 4326.41688
    },
    \"dataTipoImpuesto_0\": {
        \"codigoSriAts\": \"architecto\",
        \"codigoSriDocumentoElectronico\": \"architecto\",
        \"porcentaje\": 4326.41688
    },
    \"dataPago\": [
        {
            \"codigoSriDocumentoElectronico\": \"architecto\",
            \"monto\": 4326.41688,
            \"cantidadDias\": 4326.41688
        }
    ],
    \"dataItem\": [
        {
            \"codigoPrincipal\": \"architecto\",
            \"codigoAuxiliar\": \"architecto\",
            \"descripcionProducto\": \"architecto\",
            \"notaProducto\": \"architecto\",
            \"cantidad\": 4326.41688,
            \"precioUnitario\": 4326.41688,
            \"subtotalProducto\": 4326.41688,
            \"descuentoProducto\": 4326.41688,
            \"montoIvaProducto\": 4326.41688
        }
    ],
    \"dataItemAdicional\": [
        {
            \"campo\": \"architecto\"
        }
    ],
    \"dataInfoAdicional\": [
        {
            \"campo\": \"architecto\",
            \"contenido\": \"architecto\"
        }
    ]
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/notacredito/create"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "dataEmpresa": {
        "ambiente": 16,
        "emision": 16,
        "razonSocial": "architecto",
        "nombreComercial": "architecto",
        "ruc": "architecto",
        "direccion": "architecto",
        "obligadoContabilidad": "architecto",
        "agenteRetenedor": "architecto",
        "resolucionAgenteRetenedor": "architecto",
        "contribuyenteRimpe": "architecto",
        "contribuyenteEspecial": "architecto",
        "email": "zbailey@example.net"
    },
    "dataInfo": {
        "numeroDocumento": "architecto",
        "direccionBodega": "architecto",
        "fecha": "11-10-2026",
        "email1": "zbailey@example.net",
        "email2": "gulgowski.asia@example.com",
        "email3": "idickens@example.org",
        "codigoCliente": "architecto",
        "direccion": "architecto",
        "telefono": "architecto",
        "idTipoIdentificacion": "architecto",
        "razonSocial": "architecto",
        "identificacion": "architecto",
        "subtotal": 4326.41688,
        "descuento": 4326.41688,
        "baseGravableIva": 4326.41688,
        "baseNoGravableIva": 4326.41688,
        "montoIva": 4326.41688,
        "montoNeto": 4326.41688,
        "moneda": "architecto",
        "clave": "architecto",
        "codDocModificado": "architecto",
        "numDocModificado": "architecto",
        "motivo": "architecto",
        "fechaEmisionDocSustento": "11-10-2026"
    },
    "dataTipoImpuesto": {
        "codigoSriAts": "architecto",
        "codigoSriDocumentoElectronico": "architecto",
        "porcentaje": 4326.41688
    },
    "dataTipoImpuesto_0": {
        "codigoSriAts": "architecto",
        "codigoSriDocumentoElectronico": "architecto",
        "porcentaje": 4326.41688
    },
    "dataPago": [
        {
            "codigoSriDocumentoElectronico": "architecto",
            "monto": 4326.41688,
            "cantidadDias": 4326.41688
        }
    ],
    "dataItem": [
        {
            "codigoPrincipal": "architecto",
            "codigoAuxiliar": "architecto",
            "descripcionProducto": "architecto",
            "notaProducto": "architecto",
            "cantidad": 4326.41688,
            "precioUnitario": 4326.41688,
            "subtotalProducto": 4326.41688,
            "descuentoProducto": 4326.41688,
            "montoIvaProducto": 4326.41688
        }
    ],
    "dataItemAdicional": [
        {
            "campo": "architecto"
        }
    ],
    "dataInfoAdicional": [
        {
            "campo": "architecto",
            "contenido": "architecto"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/notacredito/create

Headers

Content-Type        

Example: application/json

Body Parameters

dataEmpresa   object  optional    
ambiente   integer     

dataEmpresa /. Example: 16

emision   integer     

Example: 16

razonSocial   string     

Example: architecto

nombreComercial   string     

Example: architecto

ruc   string     

Example: architecto

direccion   string     

Example: architecto

obligadoContabilidad   string     

Example: architecto

agenteRetenedor   string     

Example: architecto

resolucionAgenteRetenedor   string  optional    

Example: architecto

contribuyenteRimpe   string     

Example: architecto

contribuyenteEspecial   string     

Example: architecto

idContribuyenteEspecial   string  optional    
email   string     

Must be a valid email address. Example: zbailey@example.net

dataInfo   object  optional    
numeroDocumento   string     

dataInfo /. Example: architecto

direccionBodega   string     

Example: architecto

fecha   string     

Must be a valid date in the format d-m-Y. Example: 11-10-2026

email1   string     

Must be a valid email address. Example: zbailey@example.net

email2   string  optional    

Must be a valid email address. Example: gulgowski.asia@example.com

email3   string  optional    

Must be a valid email address. Example: idickens@example.org

codigoCliente   string     

Example: architecto

direccion   string     

Example: architecto

telefono   string  optional    

Example: architecto

idTipoIdentificacion   string     

Example: architecto

razonSocial   string     

Example: architecto

identificacion   string     

Example: architecto

subtotal   number     

Example: 4326.41688

descuento   number     

Example: 4326.41688

baseGravableIva   number     

Example: 4326.41688

baseNoGravableIva   number     

Example: 4326.41688

montoIva   number     

Example: 4326.41688

montoNeto   number     

Example: 4326.41688

moneda   string     

Example: architecto

clave   string     

Example: architecto

codDocModificado   string     

Example: architecto

numDocModificado   string     

Example: architecto

motivo   string     

Example: architecto

fechaEmisionDocSustento   string     

Must be a valid date in the format d-m-Y. Example: 11-10-2026

dataTipoImpuesto   object  optional    
codigoSriAts   string     

dataTipoImpuesto /. Example: architecto

codigoSriDocumentoElectronico   string     

Example: architecto

porcentaje   number     

Example: 4326.41688

dataTipoImpuesto_0   object  optional    
codigoSriAts   string     

Example: architecto

codigoSriDocumentoElectronico   string     

Example: architecto

porcentaje   number     

Example: 4326.41688

dataPago   object[]     

dataPago /. Must have at least 1 items.

codigoSriDocumentoElectronico   string     

Example: architecto

monto   number     

Example: 4326.41688

cantidadDias   number     

Example: 4326.41688

dataItem   object[]     

dataItem /. Must have at least 1 items.

codigoPrincipal   string     

Example: architecto

codigoAuxiliar   string     

Example: architecto

descripcionProducto   string     

Example: architecto

notaProducto   string     

Example: architecto

cantidad   number     

Example: 4326.41688

precioUnitario   number     

Example: 4326.41688

subtotalProducto   number     

Example: 4326.41688

descuentoProducto   number     

Example: 4326.41688

montoIvaProducto   number     

Example: 4326.41688

dataItemAdicional   object[]  optional    

dataItemAdicional /.

campo   string     

Example: architecto

dataInfoAdicional   object[]  optional    

dataInfoAdicional /.

campo   string     

Example: architecto

contenido   string     

Example: architecto

POST api/notadebito/create

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/notadebito/create" \
    --header "Content-Type: application/json" \
    --data "{
    \"dataEmpresa\": {
        \"ambiente\": 16,
        \"emision\": 16,
        \"razonSocial\": \"architecto\",
        \"nombreComercial\": \"architecto\",
        \"ruc\": \"architecto\",
        \"direccion\": \"architecto\",
        \"obligadoContabilidad\": \"architecto\",
        \"agenteRetenedor\": \"architecto\",
        \"resolucionAgenteRetenedor\": \"architecto\",
        \"contribuyenteRimpe\": \"architecto\",
        \"contribuyenteEspecial\": \"architecto\",
        \"email\": \"zbailey@example.net\"
    },
    \"dataInfo\": {
        \"numeroDocumento\": \"architecto\",
        \"direccionBodega\": \"architecto\",
        \"fecha\": \"11-10-2026\",
        \"email1\": \"zbailey@example.net\",
        \"email2\": \"gulgowski.asia@example.com\",
        \"email3\": \"idickens@example.org\",
        \"codigoCliente\": \"architecto\",
        \"direccion\": \"architecto\",
        \"telefono\": \"architecto\",
        \"idTipoIdentificacion\": \"architecto\",
        \"razonSocial\": \"architecto\",
        \"identificacion\": \"architecto\",
        \"subtotal\": 4326.41688,
        \"descuento\": 4326.41688,
        \"baseGravableIva\": 4326.41688,
        \"baseNoGravableIva\": 4326.41688,
        \"montoIva\": 4326.41688,
        \"montoNeto\": 4326.41688,
        \"moneda\": \"architecto\",
        \"clave\": \"architecto\",
        \"codDocModificado\": \"architecto\",
        \"numDocModificado\": \"architecto\",
        \"motivo\": \"architecto\",
        \"fechaEmisionDocSustento\": \"11-10-2026\"
    },
    \"dataTipoImpuesto\": {
        \"codigoSriAts\": \"architecto\",
        \"codigoSriDocumentoElectronico\": \"architecto\",
        \"porcentaje\": 4326.41688
    },
    \"dataTipoImpuesto_0\": {
        \"codigoSriAts\": \"architecto\",
        \"codigoSriDocumentoElectronico\": \"architecto\",
        \"porcentaje\": 4326.41688
    },
    \"dataPago\": [
        {
            \"codigoSriDocumentoElectronico\": \"architecto\",
            \"monto\": 4326.41688,
            \"cantidadDias\": 4326.41688
        }
    ],
    \"dataDetalle\": [
        {
            \"razon\": \"architecto\",
            \"valor\": 4326.41688
        }
    ],
    \"dataItemAdicional\": [
        {
            \"campo\": \"architecto\"
        }
    ],
    \"dataInfoAdicional\": [
        {
            \"campo\": \"architecto\",
            \"contenido\": \"architecto\"
        }
    ]
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/notadebito/create"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "dataEmpresa": {
        "ambiente": 16,
        "emision": 16,
        "razonSocial": "architecto",
        "nombreComercial": "architecto",
        "ruc": "architecto",
        "direccion": "architecto",
        "obligadoContabilidad": "architecto",
        "agenteRetenedor": "architecto",
        "resolucionAgenteRetenedor": "architecto",
        "contribuyenteRimpe": "architecto",
        "contribuyenteEspecial": "architecto",
        "email": "zbailey@example.net"
    },
    "dataInfo": {
        "numeroDocumento": "architecto",
        "direccionBodega": "architecto",
        "fecha": "11-10-2026",
        "email1": "zbailey@example.net",
        "email2": "gulgowski.asia@example.com",
        "email3": "idickens@example.org",
        "codigoCliente": "architecto",
        "direccion": "architecto",
        "telefono": "architecto",
        "idTipoIdentificacion": "architecto",
        "razonSocial": "architecto",
        "identificacion": "architecto",
        "subtotal": 4326.41688,
        "descuento": 4326.41688,
        "baseGravableIva": 4326.41688,
        "baseNoGravableIva": 4326.41688,
        "montoIva": 4326.41688,
        "montoNeto": 4326.41688,
        "moneda": "architecto",
        "clave": "architecto",
        "codDocModificado": "architecto",
        "numDocModificado": "architecto",
        "motivo": "architecto",
        "fechaEmisionDocSustento": "11-10-2026"
    },
    "dataTipoImpuesto": {
        "codigoSriAts": "architecto",
        "codigoSriDocumentoElectronico": "architecto",
        "porcentaje": 4326.41688
    },
    "dataTipoImpuesto_0": {
        "codigoSriAts": "architecto",
        "codigoSriDocumentoElectronico": "architecto",
        "porcentaje": 4326.41688
    },
    "dataPago": [
        {
            "codigoSriDocumentoElectronico": "architecto",
            "monto": 4326.41688,
            "cantidadDias": 4326.41688
        }
    ],
    "dataDetalle": [
        {
            "razon": "architecto",
            "valor": 4326.41688
        }
    ],
    "dataItemAdicional": [
        {
            "campo": "architecto"
        }
    ],
    "dataInfoAdicional": [
        {
            "campo": "architecto",
            "contenido": "architecto"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/notadebito/create

Headers

Content-Type        

Example: application/json

Body Parameters

dataEmpresa   object  optional    
ambiente   integer     

dataEmpresa /. Example: 16

emision   integer     

Example: 16

razonSocial   string     

Example: architecto

nombreComercial   string     

Example: architecto

ruc   string     

Example: architecto

direccion   string     

Example: architecto

obligadoContabilidad   string     

Example: architecto

agenteRetenedor   string     

Example: architecto

resolucionAgenteRetenedor   string  optional    

Example: architecto

contribuyenteRimpe   string     

Example: architecto

contribuyenteEspecial   string     

Example: architecto

idContribuyenteEspecial   string  optional    
email   string     

Must be a valid email address. Example: zbailey@example.net

dataInfo   object  optional    
numeroDocumento   string     

dataInfo /. Example: architecto

direccionBodega   string     

Example: architecto

fecha   string     

Must be a valid date in the format d-m-Y. Example: 11-10-2026

email1   string     

Must be a valid email address. Example: zbailey@example.net

email2   string  optional    

Must be a valid email address. Example: gulgowski.asia@example.com

email3   string  optional    

Must be a valid email address. Example: idickens@example.org

codigoCliente   string     

Example: architecto

direccion   string     

Example: architecto

telefono   string  optional    

Example: architecto

idTipoIdentificacion   string     

Example: architecto

razonSocial   string     

Example: architecto

identificacion   string     

Example: architecto

subtotal   number     

Example: 4326.41688

descuento   number     

Example: 4326.41688

baseGravableIva   number     

Example: 4326.41688

baseNoGravableIva   number     

Example: 4326.41688

montoIva   number     

Example: 4326.41688

montoNeto   number     

Example: 4326.41688

moneda   string     

Example: architecto

clave   string     

Example: architecto

codDocModificado   string     

Example: architecto

numDocModificado   string     

Example: architecto

motivo   string     

Example: architecto

fechaEmisionDocSustento   string     

Must be a valid date in the format d-m-Y. Example: 11-10-2026

dataTipoImpuesto   object  optional    
codigoSriAts   string     

dataTipoImpuesto /. Example: architecto

codigoSriDocumentoElectronico   string     

Example: architecto

porcentaje   number     

Example: 4326.41688

dataTipoImpuesto_0   object  optional    
codigoSriAts   string     

Example: architecto

codigoSriDocumentoElectronico   string     

Example: architecto

porcentaje   number     

Example: 4326.41688

dataPago   object[]     

dataPago /. Must have at least 1 items.

codigoSriDocumentoElectronico   string     

Example: architecto

monto   number     

Example: 4326.41688

cantidadDias   number     

Example: 4326.41688

dataItemAdicional   object[]  optional    

dataItemAdicional /.

campo   string     

Example: architecto

dataInfoAdicional   object[]  optional    

dataInfoAdicional /.

campo   string     

Example: architecto

contenido   string     

Example: architecto

dataDetalle   object[]     

dataDetalle /.

razon   string     

Example: architecto

valor   number     

Example: 4326.41688

POST api/guiaremision/create

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/guiaremision/create" \
    --header "Content-Type: application/json" \
    --data "{
    \"dataEmpresa\": {
        \"ambiente\": 16,
        \"emision\": 16,
        \"razonSocial\": \"architecto\",
        \"nombreComercial\": \"architecto\",
        \"ruc\": \"architecto\",
        \"direccion\": \"architecto\",
        \"obligadoContabilidad\": \"architecto\",
        \"agenteRetenedor\": \"architecto\",
        \"resolucionAgenteRetenedor\": \"architecto\",
        \"contribuyenteRimpe\": \"architecto\",
        \"contribuyenteEspecial\": \"architecto\",
        \"email\": \"zbailey@example.net\"
    },
    \"dataInfo\": {
        \"numeroDocumento\": \"architecto\",
        \"direccionBodega\": \"architecto\",
        \"fecha\": \"11-10-2026\",
        \"email1\": \"zbailey@example.net\",
        \"email2\": \"gulgowski.asia@example.com\",
        \"email3\": \"idickens@example.org\",
        \"codigoCliente\": \"architecto\",
        \"direccion\": \"architecto\",
        \"telefono\": \"architecto\",
        \"idTipoIdentificacion\": \"architecto\",
        \"razonSocial\": \"architecto\",
        \"identificacion\": \"architecto\",
        \"moneda\": \"architecto\",
        \"clave\": \"architecto\",
        \"codDocModificado\": \"architecto\",
        \"numDocModificado\": \"architecto\",
        \"motivo\": \"architecto\",
        \"fechaEmisionDocSustento\": \"11-10-2026\"
    },
    \"dataItem\": [
        {
            \"codigoPrincipal\": \"architecto\",
            \"codigoAuxiliar\": \"architecto\",
            \"descripcionProducto\": \"architecto\",
            \"notaProducto\": \"architecto\",
            \"cantidad\": 4326.41688,
            \"precioUnitario\": 4326.41688,
            \"subtotalProducto\": 4326.41688,
            \"descuentoProducto\": 4326.41688,
            \"montoIvaProducto\": 4326.41688
        }
    ],
    \"dataTransportista\": {
        \"razonSocialTransportista\": \"architecto\",
        \"tipoIdentificacionTransportista\": \"architecto\",
        \"rucTransportista\": \"architecto\",
        \"dirPartida\": \"architecto\",
        \"fechaIniTransporte\": \"11-10-2026\",
        \"fechaFinTransporte\": \"11-10-2026\",
        \"placa\": \"architecto\"
    },
    \"dataItemAdicional\": [
        {
            \"campo\": \"architecto\"
        }
    ],
    \"dataInfoAdicional\": [
        {
            \"campo\": \"architecto\",
            \"contenido\": \"architecto\"
        }
    ]
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/guiaremision/create"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "dataEmpresa": {
        "ambiente": 16,
        "emision": 16,
        "razonSocial": "architecto",
        "nombreComercial": "architecto",
        "ruc": "architecto",
        "direccion": "architecto",
        "obligadoContabilidad": "architecto",
        "agenteRetenedor": "architecto",
        "resolucionAgenteRetenedor": "architecto",
        "contribuyenteRimpe": "architecto",
        "contribuyenteEspecial": "architecto",
        "email": "zbailey@example.net"
    },
    "dataInfo": {
        "numeroDocumento": "architecto",
        "direccionBodega": "architecto",
        "fecha": "11-10-2026",
        "email1": "zbailey@example.net",
        "email2": "gulgowski.asia@example.com",
        "email3": "idickens@example.org",
        "codigoCliente": "architecto",
        "direccion": "architecto",
        "telefono": "architecto",
        "idTipoIdentificacion": "architecto",
        "razonSocial": "architecto",
        "identificacion": "architecto",
        "moneda": "architecto",
        "clave": "architecto",
        "codDocModificado": "architecto",
        "numDocModificado": "architecto",
        "motivo": "architecto",
        "fechaEmisionDocSustento": "11-10-2026"
    },
    "dataItem": [
        {
            "codigoPrincipal": "architecto",
            "codigoAuxiliar": "architecto",
            "descripcionProducto": "architecto",
            "notaProducto": "architecto",
            "cantidad": 4326.41688,
            "precioUnitario": 4326.41688,
            "subtotalProducto": 4326.41688,
            "descuentoProducto": 4326.41688,
            "montoIvaProducto": 4326.41688
        }
    ],
    "dataTransportista": {
        "razonSocialTransportista": "architecto",
        "tipoIdentificacionTransportista": "architecto",
        "rucTransportista": "architecto",
        "dirPartida": "architecto",
        "fechaIniTransporte": "11-10-2026",
        "fechaFinTransporte": "11-10-2026",
        "placa": "architecto"
    },
    "dataItemAdicional": [
        {
            "campo": "architecto"
        }
    ],
    "dataInfoAdicional": [
        {
            "campo": "architecto",
            "contenido": "architecto"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/guiaremision/create

Headers

Content-Type        

Example: application/json

Body Parameters

dataEmpresa   object  optional    
ambiente   integer     

dataEmpresa /. Example: 16

emision   integer     

Example: 16

razonSocial   string     

Example: architecto

nombreComercial   string     

Example: architecto

ruc   string     

Example: architecto

direccion   string     

Example: architecto

obligadoContabilidad   string     

Example: architecto

agenteRetenedor   string     

Example: architecto

resolucionAgenteRetenedor   string  optional    

Example: architecto

contribuyenteRimpe   string     

Example: architecto

contribuyenteEspecial   string     

Example: architecto

idContribuyenteEspecial   string  optional    
email   string     

Must be a valid email address. Example: zbailey@example.net

dataInfo   object  optional    
numeroDocumento   string     

dataInfo /. Example: architecto

direccionBodega   string     

Example: architecto

fecha   string     

Must be a valid date in the format d-m-Y. Example: 11-10-2026

email1   string     

Must be a valid email address. Example: zbailey@example.net

email2   string  optional    

Must be a valid email address. Example: gulgowski.asia@example.com

email3   string  optional    

Must be a valid email address. Example: idickens@example.org

codigoCliente   string     

Example: architecto

direccion   string     

Example: architecto

telefono   string  optional    

Example: architecto

idTipoIdentificacion   string     

Example: architecto

razonSocial   string     

Example: architecto

identificacion   string     

Example: architecto

moneda   string     

Example: architecto

clave   string     

Example: architecto

codDocModificado   string     

Example: architecto

numDocModificado   string     

Example: architecto

motivo   string     

Example: architecto

fechaEmisionDocSustento   string     

Must be a valid date in the format d-m-Y. Example: 11-10-2026

dataItem   object[]     

dataTipoImpuesto /. Must have at least 1 items.

codigoPrincipal   string     

Example: architecto

codigoAuxiliar   string     

Example: architecto

descripcionProducto   string     

Example: architecto

notaProducto   string     

Example: architecto

cantidad   number     

Example: 4326.41688

precioUnitario   number     

Example: 4326.41688

subtotalProducto   number     

Example: 4326.41688

descuentoProducto   number     

Example: 4326.41688

montoIvaProducto   number     

Example: 4326.41688

dataItemAdicional   object[]  optional    

dataItemAdicional /.

campo   string     

Example: architecto

dataInfoAdicional   object[]  optional    

dataInfoAdicional /.

campo   string     

Example: architecto

contenido   string     

Example: architecto

dataTransportista   object  optional    
razonSocialTransportista   string     

dataTransportista /. Example: architecto

tipoIdentificacionTransportista   string     

Example: architecto

rucTransportista   string     

Example: architecto

dirPartida   string     

Example: architecto

fechaIniTransporte   string     

Must be a valid date in the format d-m-Y. Example: 11-10-2026

fechaFinTransporte   string     

Must be a valid date in the format d-m-Y. Example: 11-10-2026

placa   string     

Example: architecto

POST api/retencion/create

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/retencion/create" \
    --header "Content-Type: application/json" \
    --data "{
    \"dataEmpresa\": {
        \"ambiente\": 16,
        \"emision\": 16,
        \"razonSocial\": \"architecto\",
        \"nombreComercial\": \"architecto\",
        \"ruc\": \"architecto\",
        \"direccion\": \"architecto\",
        \"obligadoContabilidad\": \"architecto\",
        \"agenteRetenedor\": \"architecto\",
        \"resolucionAgenteRetenedor\": \"architecto\",
        \"contribuyenteRimpe\": \"architecto\",
        \"contribuyenteEspecial\": \"architecto\",
        \"email\": \"zbailey@example.net\"
    },
    \"dataInfo\": {
        \"numeroDocumento\": \"architecto\",
        \"direccionBodega\": \"architecto\",
        \"fecha\": \"11-10-2026\",
        \"email1\": \"zbailey@example.net\",
        \"email2\": \"gulgowski.asia@example.com\",
        \"email3\": \"idickens@example.org\",
        \"codigoCliente\": \"architecto\",
        \"direccion\": \"architecto\",
        \"telefono\": \"architecto\",
        \"idTipoIdentificacion\": \"architecto\",
        \"razonSocial\": \"architecto\",
        \"identificacion\": \"architecto\",
        \"subtotal\": 4326.41688,
        \"descuento\": 4326.41688,
        \"baseGravableIva\": 4326.41688,
        \"baseNoGravableIva\": 4326.41688,
        \"montoIva\": 4326.41688,
        \"montoNeto\": 4326.41688,
        \"moneda\": \"architecto\",
        \"clave\": \"architecto\",
        \"parteRel\": \"architecto\",
        \"periodoFiscal\": \"architecto\",
        \"codSustento\": \"architecto\",
        \"codDocSustento\": \"architecto\",
        \"numDocSustento\": \"architecto\",
        \"fechaEmisionDocSustento\": \"11-10-2026\",
        \"fechaRegistroContable\": \"11-10-2026\",
        \"numAutDocSustento\": \"architecto\",
        \"pagoLocExt\": \"architecto\"
    },
    \"dataRetencion\": [
        {
            \"codigo\": 16,
            \"codigoRetencion\": 16,
            \"baseImponible\": 4326.41688,
            \"porcentajeRetener\": 4326.41688,
            \"valorRetenido\": 4326.41688
        }
    ],
    \"dataTipoImpuesto\": {
        \"codigoSriAts\": \"architecto\",
        \"codigoSriDocumentoElectronico\": \"architecto\",
        \"porcentaje\": 4326.41688
    },
    \"dataTipoImpuesto_0\": {
        \"codigoSriAts\": \"architecto\",
        \"codigoSriDocumentoElectronico\": \"architecto\",
        \"porcentaje\": 4326.41688
    },
    \"dataPago\": [
        {
            \"codigoSriDocumentoElectronico\": \"architecto\",
            \"monto\": 4326.41688,
            \"cantidadDias\": 4326.41688
        }
    ],
    \"dataItemAdicional\": [
        {
            \"campo\": \"architecto\"
        }
    ],
    \"dataInfoAdicional\": [
        {
            \"campo\": \"architecto\",
            \"contenido\": \"architecto\"
        }
    ]
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/retencion/create"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "dataEmpresa": {
        "ambiente": 16,
        "emision": 16,
        "razonSocial": "architecto",
        "nombreComercial": "architecto",
        "ruc": "architecto",
        "direccion": "architecto",
        "obligadoContabilidad": "architecto",
        "agenteRetenedor": "architecto",
        "resolucionAgenteRetenedor": "architecto",
        "contribuyenteRimpe": "architecto",
        "contribuyenteEspecial": "architecto",
        "email": "zbailey@example.net"
    },
    "dataInfo": {
        "numeroDocumento": "architecto",
        "direccionBodega": "architecto",
        "fecha": "11-10-2026",
        "email1": "zbailey@example.net",
        "email2": "gulgowski.asia@example.com",
        "email3": "idickens@example.org",
        "codigoCliente": "architecto",
        "direccion": "architecto",
        "telefono": "architecto",
        "idTipoIdentificacion": "architecto",
        "razonSocial": "architecto",
        "identificacion": "architecto",
        "subtotal": 4326.41688,
        "descuento": 4326.41688,
        "baseGravableIva": 4326.41688,
        "baseNoGravableIva": 4326.41688,
        "montoIva": 4326.41688,
        "montoNeto": 4326.41688,
        "moneda": "architecto",
        "clave": "architecto",
        "parteRel": "architecto",
        "periodoFiscal": "architecto",
        "codSustento": "architecto",
        "codDocSustento": "architecto",
        "numDocSustento": "architecto",
        "fechaEmisionDocSustento": "11-10-2026",
        "fechaRegistroContable": "11-10-2026",
        "numAutDocSustento": "architecto",
        "pagoLocExt": "architecto"
    },
    "dataRetencion": [
        {
            "codigo": 16,
            "codigoRetencion": 16,
            "baseImponible": 4326.41688,
            "porcentajeRetener": 4326.41688,
            "valorRetenido": 4326.41688
        }
    ],
    "dataTipoImpuesto": {
        "codigoSriAts": "architecto",
        "codigoSriDocumentoElectronico": "architecto",
        "porcentaje": 4326.41688
    },
    "dataTipoImpuesto_0": {
        "codigoSriAts": "architecto",
        "codigoSriDocumentoElectronico": "architecto",
        "porcentaje": 4326.41688
    },
    "dataPago": [
        {
            "codigoSriDocumentoElectronico": "architecto",
            "monto": 4326.41688,
            "cantidadDias": 4326.41688
        }
    ],
    "dataItemAdicional": [
        {
            "campo": "architecto"
        }
    ],
    "dataInfoAdicional": [
        {
            "campo": "architecto",
            "contenido": "architecto"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/retencion/create

Headers

Content-Type        

Example: application/json

Body Parameters

dataEmpresa   object  optional    
ambiente   integer     

dataEmpresa /. Example: 16

emision   integer     

Example: 16

razonSocial   string     

Example: architecto

nombreComercial   string     

Example: architecto

ruc   string     

Example: architecto

direccion   string     

Example: architecto

obligadoContabilidad   string     

Example: architecto

agenteRetenedor   string     

Example: architecto

resolucionAgenteRetenedor   string  optional    

Example: architecto

contribuyenteRimpe   string     

Example: architecto

contribuyenteEspecial   string     

Example: architecto

idContribuyenteEspecial   string  optional    
email   string     

Must be a valid email address. Example: zbailey@example.net

dataInfo   object  optional    
numeroDocumento   string     

dataInfo /. Example: architecto

direccionBodega   string     

Example: architecto

fecha   string     

Must be a valid date in the format d-m-Y. Example: 11-10-2026

email1   string     

Must be a valid email address. Example: zbailey@example.net

email2   string  optional    

Must be a valid email address. Example: gulgowski.asia@example.com

email3   string  optional    

Must be a valid email address. Example: idickens@example.org

codigoCliente   string     

Example: architecto

direccion   string     

Example: architecto

telefono   string  optional    

Example: architecto

idTipoIdentificacion   string     

Example: architecto

razonSocial   string     

Example: architecto

identificacion   string     

Example: architecto

subtotal   number     

Example: 4326.41688

descuento   number     

Example: 4326.41688

baseGravableIva   number     

Example: 4326.41688

baseNoGravableIva   number     

Example: 4326.41688

montoIva   number     

Example: 4326.41688

montoNeto   number     

Example: 4326.41688

moneda   string     

Example: architecto

clave   string     

Example: architecto

parteRel   string     

Example: architecto

periodoFiscal   string     

Example: architecto

codSustento   string     

Example: architecto

codDocSustento   string     

Example: architecto

numDocSustento   string     

Example: architecto

fechaEmisionDocSustento   string     

Must be a valid date in the format d-m-Y. Example: 11-10-2026

fechaRegistroContable   string     

Must be a valid date in the format d-m-Y. Example: 11-10-2026

numAutDocSustento   string     

Example: architecto

pagoLocExt   string     

Example: architecto

dataRetencion   object[]     

dataRetencion /. Must have at least 1 items.

codigo   integer     

Example: 16

codigoRetencion   integer     

Example: 16

baseImponible   number     

Example: 4326.41688

porcentajeRetener   number     

Example: 4326.41688

valorRetenido   number     

Example: 4326.41688

dataTipoImpuesto   object  optional    
codigoSriAts   string     

dataTipoImpuesto /. Example: architecto

codigoSriDocumentoElectronico   string     

Example: architecto

porcentaje   number     

Example: 4326.41688

dataTipoImpuesto_0   object  optional    
codigoSriAts   string     

Example: architecto

codigoSriDocumentoElectronico   string     

Example: architecto

porcentaje   number     

Example: 4326.41688

dataPago   object[]     

dataPago /. Must have at least 1 items.

codigoSriDocumentoElectronico   string     

Example: architecto

monto   number     

Example: 4326.41688

cantidadDias   number     

Example: 4326.41688

dataItemAdicional   object[]  optional    

dataItemAdicional /.

campo   string     

Example: architecto

dataInfoAdicional   object[]  optional    

dataInfoAdicional /.

campo   string     

Example: architecto

contenido   string     

Example: architecto

POST api/verififacion-documento

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/verififacion-documento" \
    --header "Content-Type: application/json" \
    --data "{
    \"claveAcceso\": \"architecto\",
    \"ruc\": \"architecto\",
    \"documento\": \"architecto\",
    \"ambiente\": 16,
    \"fecha\": \"11-10-2026\"
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/verififacion-documento"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "claveAcceso": "architecto",
    "ruc": "architecto",
    "documento": "architecto",
    "ambiente": 16,
    "fecha": "11-10-2026"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/verififacion-documento

Headers

Content-Type        

Example: application/json

Body Parameters

claveAcceso   string     

Example: architecto

ruc   string     

Example: architecto

documento   string     

Example: architecto

ambiente   integer     

Example: 16

fecha   string     

Must be a valid date in the format d-m-Y. Example: 11-10-2026

GET api/generate-ride/{claveAcceso}/{ruc}/{anio}/{mes}

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/generate-ride/architecto/architecto/architecto/architecto"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/generate-ride/architecto/architecto/architecto/architecto"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/generate-ride/{claveAcceso}/{ruc}/{anio}/{mes}

URL Parameters

claveAcceso   string     

Example: architecto

ruc   string     

Example: architecto

anio   string     

Example: architecto

mes   string     

Example: architecto

Reenvía el correo electrónico de un documento ya procesado

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/documents/retry-email" \
    --header "Content-Type: application/json" \
    --data "{
    \"clave_acceso\": \"b\",
    \"tipo_documento\": \"guiaremision\",
    \"ruc\": \"ng\",
    \"email\": \"rowan.gulgowski@example.com\",
    \"cc_emails\": [
        \"jdach@example.org\"
    ]
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/retry-email"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "clave_acceso": "b",
    "tipo_documento": "guiaremision",
    "ruc": "ng",
    "email": "rowan.gulgowski@example.com",
    "cc_emails": [
        "jdach@example.org"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/documents/retry-email

Headers

Content-Type        

Example: application/json

Body Parameters

clave_acceso   string     

Must be at least 49 characters. Must not be greater than 49 characters. Example: b

tipo_documento   string     

Example: guiaremision

Must be one of:
  • factura
  • notacredito
  • notadebito
  • guiaremision
  • retencion
ruc   string     

Must be at least 10 characters. Must not be greater than 13 characters. Example: ng

email   string     

Must be a valid email address. Example: rowan.gulgowski@example.com

cc_emails   string[]  optional    

Must be a valid email address.

Reintentar autorización de un documento específico

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/documents/retry-authorization" \
    --header "Content-Type: application/json" \
    --data "{
    \"access_key\": \"bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj\"
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/retry-authorization"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "access_key": "bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/documents/retry-authorization

Headers

Content-Type        

Example: application/json

Body Parameters

access_key   string     

Must be 49 characters. Example: bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj

Habilitar reintentos automáticos para un documento

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/documents/enable-auto-retry" \
    --header "Content-Type: application/json" \
    --data "{
    \"access_key\": \"bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj\"
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/enable-auto-retry"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "access_key": "bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/documents/enable-auto-retry

Headers

Content-Type        

Example: application/json

Body Parameters

access_key   string     

Must be 49 characters. Example: bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj

Deshabilitar reintentos automáticos para un documento

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/documents/disable-auto-retry" \
    --header "Content-Type: application/json" \
    --data "{
    \"access_key\": \"bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj\"
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/disable-auto-retry"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "access_key": "bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/documents/disable-auto-retry

Headers

Content-Type        

Example: application/json

Body Parameters

access_key   string     

Must be 49 characters. Example: bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj

Obtener estadísticas de reintentos

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/documents/retry-statistics"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/retry-statistics"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/documents/retry-statistics

Listar documentos pendientes de reintento

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/documents/pending-retries"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/pending-retries"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/documents/pending-retries

Obtener XML autorizado y RIDE (PDF) de un documento.

Si los archivos no existen localmente, consulta al SRI y los recupera automáticamente. Diseñado para que el sistema externo obtenga los documentos después de la emisión.

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/documents/retrieve/architecto"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/retrieve/architecto"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "data": {
        "access_key": "1703202601...",
        "status": "AUTORIZADO",
        "document_number": "001-001-000000117",
        "authorization_number": "1703202601...",
        "authorization_date": "2026-03-17T10:00:00",
        "xml_authorized": "base64+gzip del XML autorizado",
        "pdf_ride": "base64+gzip del PDF RIDE",
        "recovered_from_sri": false
    },
    "message": "Documento obtenido exitosamente"
}
 

Request      

GET api/documents/retrieve/{accessKey}

URL Parameters

accessKey   string     

Example: architecto

Recuperar en batch múltiples documentos desde el SRI.

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/documents/recover-batch" \
    --header "Content-Type: application/json" \
    --data "{
    \"access_keys\": [
        \"bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj\"
    ],
    \"send_email\": true
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/documents/recover-batch"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "access_keys": [
        "bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtuj"
    ],
    "send_email": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
  "success": true,
  "data": {
    "total": 12,
    "recovered": 10,
    "failed": 2,
    "results": [...]
  }
}
 

Request      

POST api/documents/recover-batch

Headers

Content-Type        

Example: application/json

Body Parameters

access_keys   string[]     

Must be 49 characters.

send_email   boolean  optional    

Example: true

Endpoint para verificar el estado de los servicios del SRI.

Acepta un parámetro 'ambiente' ('prueba' o 'produccion').

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/sri-status"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/sri-status"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/sri-status

Registrar un nuevo usuario en el sistema

Este endpoint requiere un token maestro de aplicación para autorizar el registro. Una vez registrado, el usuario puede iniciar sesión y crear su empresa usando los endpoints existentes.

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/register" \
    --header "Content-Type: application/json" \
    --data "{
    \"name\": \"b\",
    \"email\": \"zbailey@example.net\",
    \"password\": \"|]|{+-\",
    \"password_confirmation\": \"architecto\"
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "email": "zbailey@example.net",
    "password": "|]|{+-",
    "password_confirmation": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/register

Headers

Content-Type        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

email   string     

Must be a valid email address. Must not be greater than 255 characters. Example: zbailey@example.net

password   string     

Example: |]|{+-

password_confirmation   string     

The value and password must match. Example: architecto

Verificar si un email ya está registrado

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/register/check-email" \
    --header "Content-Type: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\"
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/register/check-email"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/register/check-email

Headers

Content-Type        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Example: gbailey@example.net

Verificar si un RUC ya está registrado

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/register/check-ruc" \
    --header "Content-Type: application/json" \
    --data "{
    \"ruc\": \"bngzmiyvdljni\"
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/register/check-ruc"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ruc": "bngzmiyvdljni"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/register/check-ruc

Headers

Content-Type        

Example: application/json

Body Parameters

ruc   string     

Must be 13 characters. Example: bngzmiyvdljni

Obtener información pública de una empresa (para verificación)

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/register/business/architecto"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/register/business/architecto"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/register/business/{ruc}

URL Parameters

ruc   string     

Example: architecto

Listar todas las empresas con información de tokens

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/admin/tokens"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/admin/tokens"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/admin/tokens

Generar token de API para una empresa Solo administradores pueden generar tokens

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/admin/tokens/generate" \
    --header "Content-Type: application/json" \
    --data "{
    \"ruc\": \"bngzmiyvdljni\"
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/admin/tokens/generate"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ruc": "bngzmiyvdljni"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/admin/tokens/generate

Headers

Content-Type        

Example: application/json

Body Parameters

ruc   string     

Must be 13 characters. Example: bngzmiyvdljni

Regenerar token de API para una empresa Invalida el token anterior

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/admin/tokens/regenerate" \
    --header "Content-Type: application/json" \
    --data "{
    \"ruc\": \"bngzmiyvdljni\"
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/admin/tokens/regenerate"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ruc": "bngzmiyvdljni"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/admin/tokens/regenerate

Headers

Content-Type        

Example: application/json

Body Parameters

ruc   string     

Must be 13 characters. Example: bngzmiyvdljni

Revocar token de API de una empresa

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/admin/tokens/revoke" \
    --header "Content-Type: application/json" \
    --data "{
    \"ruc\": \"bngzmiyvdljni\"
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/admin/tokens/revoke"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ruc": "bngzmiyvdljni"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/admin/tokens/revoke

Headers

Content-Type        

Example: application/json

Body Parameters

ruc   string     

Must be 13 characters. Example: bngzmiyvdljni

Ver información del token de una empresa (sin mostrar el token)

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/admin/tokens/info" \
    --header "Content-Type: application/json" \
    --data "{
    \"ruc\": \"bngzmiyvdljni\"
}"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/admin/tokens/info"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ruc": "bngzmiyvdljni"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/admin/tokens/info

Headers

Content-Type        

Example: application/json

Body Parameters

ruc   string     

Must be 13 characters. Example: bngzmiyvdljni

Verificar el estado del certificado de una empresa por RUC Endpoint público para que las aplicaciones consulten diariamente

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/certificate/status/architecto"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/certificate/status/architecto"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/certificate/status/{ruc}

URL Parameters

ruc   string     

Example: architecto

Obtener información detallada del certificado (solo admin)

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/certificate/details/architecto"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/certificate/details/architecto"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/certificate/details/{ruc}

URL Parameters

ruc   string     

Example: architecto

Listar estado de certificados de todas las empresas (solo admin)

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/certificate/all-status"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/certificate/all-status"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/certificate/all-status

Verificar el estado del certificado usando API Token Para uso autenticado desde sistemas externos

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/my-certificate/status"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/my-certificate/status"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/my-certificate/status

Obtener información de mi empresa GET /api/my-business

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/my-business"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/my-business"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/my-business

Actualizar información básica de mi empresa PUT /api/my-business

Example request:
curl --request PUT \
    "https://autorizaciones.jfpcode.com/api/my-business"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/my-business"
);



fetch(url, {
    method: "PUT",
}).then(response => response.json());

Request      

PUT api/my-business

Actualizar firma digital de mi empresa POST /api/my-business/signature

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/my-business/signature"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/my-business/signature"
);



fetch(url, {
    method: "POST",
}).then(response => response.json());

Request      

POST api/my-business/signature

Obtener estado del certificado de mi empresa GET /api/my-business/certificate

Example request:
curl --request GET \
    --get "https://autorizaciones.jfpcode.com/api/my-business/certificate"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/my-business/certificate"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Request      

GET api/my-business/certificate

POST api/clave-acceso/factura

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/clave-acceso/factura"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/clave-acceso/factura"
);



fetch(url, {
    method: "POST",
}).then(response => response.json());

Request      

POST api/clave-acceso/factura

POST api/clave-acceso/nota-credito

Example request:
curl --request POST \
    "https://autorizaciones.jfpcode.com/api/clave-acceso/nota-credito"
const url = new URL(
    "https://autorizaciones.jfpcode.com/api/clave-acceso/nota-credito"
);



fetch(url, {
    method: "POST",
}).then(response => response.json());

Request      

POST api/clave-acceso/nota-credito