MENU navbar-image

Introduction

Emite facturas, boletas, notas, resúmenes, bajas y guías de remisión electrónicas (SUNAT, UBL 2.1) y consulta RUC/DNI con JSON.

Inicio rápido: de cero a tu primera factura en BETA

  1. Regístrate en el panel y verifica tu correo.
  2. Empresas → Nueva empresa: escribe el RUC y pulsa Consultar RUC para autocompletar la razón social y el domicilio fiscal. Se crea el establecimiento 0000.
  3. Certificado: sube tu .pfx/.p12 con su contraseña (en BETA sirve un certificado de pruebas). Se guarda cifrado.
  4. Series: crea F001 (facturas) y B001 (boletas) en BETA.
  5. Tokens API: genera un token BETA (sk_beta_…). Se muestra una sola vez.
  6. Envía tu primera factura:
curl -X POST https://djmplatform.com/api/v1/invoice/send \
  -H "Authorization: Bearer sk_beta_xxx" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: venta-0001" \
  -d '{"tipo_doc":"01","serie":"F001","cliente":{"tipo_doc":"6","num_doc":"20100070970","razon_social":"SUPERMERCADOS PERUANOS S.A."},"items":[{"descripcion":"Producto","cantidad":"1","precio_unitario":"118"}]}'

BETA usa las credenciales MODDATOS de SUNAT: los comprobantes no tienen valor tributario. Para producción, registra tu usuario SOL secundario, pulsa Habilitar producción y genera un token sk_live_.

Convenciones

Ejemplos completos de cada tipo de comprobante (factura, boleta, NC, ND, exportación, anticipos, detracción, guías 09/31) en la colección Postman: collection.json · Especificación OpenAPI: openapi.yaml.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer sk_beta_xxx".

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

Genera el token en el panel: Empresas → (empresa) → Tokens API. Los tokens skbeta operan en BETA y los sklive en producción.

Cuenta

Empresa y entorno del token.

requires authentication

Example request:
curl --request GET \
    --get "https://djmplatform.com/api/v1/me" \
    --header "Authorization: Bearer sk_beta_xxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://djmplatform.com/api/v1/me"
);

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


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://djmplatform.com/api/v1/me';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer sk_beta_xxx',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

GET api/v1/me

Headers

Authorization        

Example: Bearer sk_beta_xxx

Content-Type        

Example: application/json

Accept        

Example: application/json

Series activas de la empresa en el entorno del token.

requires authentication

Example request:
curl --request GET \
    --get "https://djmplatform.com/api/v1/series" \
    --header "Authorization: Bearer sk_beta_xxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://djmplatform.com/api/v1/series"
);

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


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://djmplatform.com/api/v1/series';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer sk_beta_xxx',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

GET api/v1/series

Headers

Authorization        

Example: Bearer sk_beta_xxx

Content-Type        

Example: application/json

Accept        

Example: application/json

Comprobantes

Emitir y enviar a SUNAT.

requires authentication

Genera el XML UBL 2.1, lo firma, lo envía (sendBill) y devuelve el estado según el CDR. Header opcional Idempotency-Key para reintentos seguros.

Example request:
curl --request POST \
    "https://djmplatform.com/api/v1/invoice/send" \
    --header "Authorization: Bearer sk_beta_xxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"tipo_doc\": \"01\",
    \"serie\": \"F001\",
    \"moneda\": \"PEN\",
    \"cliente\": {
        \"tipo_doc\": \"6\",
        \"num_doc\": \"20100070970\",
        \"razon_social\": \"SUPERMERCADOS PERUANOS S.A.\"
    },
    \"items\": [
        {
            \"descripcion\": \"Laptop 14\\\" Core i5\",
            \"cantidad\": \"2\",
            \"precio_unitario\": \"2500.00\",
            \"unidad\": \"NIU\",
            \"codigo\": \"LAP-001\",
            \"tipo_afectacion_igv\": \"10\"
        }
    ]
}"
const url = new URL(
    "https://djmplatform.com/api/v1/invoice/send"
);

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

let body = {
    "tipo_doc": "01",
    "serie": "F001",
    "moneda": "PEN",
    "cliente": {
        "tipo_doc": "6",
        "num_doc": "20100070970",
        "razon_social": "SUPERMERCADOS PERUANOS S.A."
    },
    "items": [
        {
            "descripcion": "Laptop 14\" Core i5",
            "cantidad": "2",
            "precio_unitario": "2500.00",
            "unidad": "NIU",
            "codigo": "LAP-001",
            "tipo_afectacion_igv": "10"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://djmplatform.com/api/v1/invoice/send';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer sk_beta_xxx',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'tipo_doc' => '01',
            'serie' => 'F001',
            'moneda' => 'PEN',
            'cliente' => [
                'tipo_doc' => '6',
                'num_doc' => '20100070970',
                'razon_social' => 'SUPERMERCADOS PERUANOS S.A.',
            ],
            'items' => [
                [
                    'descripcion' => 'Laptop 14" Core i5',
                    'cantidad' => '2',
                    'precio_unitario' => '2500.00',
                    'unidad' => 'NIU',
                    'codigo' => 'LAP-001',
                    'tipo_afectacion_igv' => '10',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "success": true,
    "data": {
        "id": "9f0c6b2e-6a1e-4b8f-9d0b-3e1f6f5c2a10",
        "tipo_doc": "01",
        "serie": "F001",
        "correlativo": 1,
        "numero": "F001-1",
        "fecha_emision": "2026-10-30T10:00:00-05:00",
        "moneda": "PEN",
        "cliente": {
            "tipo_doc": "6",
            "num_doc": "20100070970",
            "razon_social": "SUPERMERCADOS PERUANOS S.A."
        },
        "totales": {
            "op_gravadas": "200.00",
            "op_exoneradas": null,
            "op_inafectas": null,
            "op_exportacion": null,
            "op_gratuitas": null,
            "igv_gratuitas": "0.00",
            "base_ivap": null,
            "ivap": "0.00",
            "base_isc": "0.00",
            "isc": "0.00",
            "igv": "36.00",
            "icbper": "0.00",
            "total_impuestos": "36.00",
            "valor_venta": "200.00",
            "precio_venta": "236.00",
            "descuento_global": "0.00",
            "total_anticipos": "0.00",
            "importe_total": "236.00",
            "detraccion": null,
            "neto_pendiente": "236.00"
        },
        "estado": "aceptado",
        "estado_descripcion": "Aceptado",
        "hash": "0b6sN3m1yQb4Jm2bQ4r2v3xk9Ss=",
        "intentos": 1,
        "proximo_reintento": null,
        "urls": {
            "xml": "https://api.tudominio.pe/descargas/9f0c.../xml?expires=...&signature=...",
            "cdr": "https://api.tudominio.pe/descargas/9f0c.../cdr?expires=...&signature=...",
            "pdf": "https://api.tudominio.pe/descargas/9f0c.../pdf?expires=...&signature=...",
            "ticket": "https://api.tudominio.pe/descargas/9f0c.../pdf?format=ticket&expires=...&signature=..."
        },
        "creado": "2026-10-30T10:00:02-05:00"
    },
    "sunat": {
        "code": "0",
        "description": "La Factura numero F001-1, ha sido aceptada",
        "notes": []
    },
    "errors": null
}
 

Example response (422):


{
    "success": false,
    "data": {
        "id": "9f0c6b2e-6a1e-4b8f-9d0b-3e1f6f5c2a10",
        "numero": "F001-2",
        "estado": "rechazado",
        "estado_descripcion": "Rechazado"
    },
    "sunat": {
        "code": "2800",
        "description": "El dato ingresado en el tipo de documento de identidad del receptor no esta permitido.",
        "notes": []
    },
    "errors": {
        "code": "SUNAT_REJECTED",
        "message": "El dato ingresado en el tipo de documento de identidad del receptor no esta permitido."
    }
}
 

Example response (429):


{
    "success": false,
    "data": null,
    "sunat": null,
    "errors": {
        "code": "QUOTA_EXCEEDED",
        "message": "Alcanzaste el límite de 100 comprobantes y guías por mes del plan Free. Se renueva el 01/11/2026 00:00; para ampliarlo, cambia de plan."
    }
}
 

Request      

POST api/v1/invoice/send

Headers

Authorization        

Example: Bearer sk_beta_xxx

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

tipo_doc   string     

Catálogo 01: 01 factura, 03 boleta. Example: 01

Must be one of:
  • 1
  • 3
envio   string  optional    

Boletas: "resumen" para informarlas por Resumen Diario en lugar de enviarlas una a una.

Must be one of:
  • individual
  • resumen
serie   string     

Serie creada en el panel para el entorno del token (F001, B001…). Must contain only letters and numbers. value debe tener 4 caracteres. Example: F001

correlativo   integer  optional    

Opcional. Si se omite se asigna el siguiente. value debe ser al menos 1. value no debe ser mayor que 99999999.

fecha_emision   string  optional    

ISO 8601. Por defecto, ahora (hora de Lima). No puede ser futura. value no es una fecha válida.

fecha_vencimiento   string  optional    

Y-m-d. Must be a valid date in the format Y-m-d.

moneda   string  optional    

PEN (defecto), USD o EUR. Example: PEN

Must be one of:
  • PEN
  • USD
  • EUR
tipo_operacion   string  optional    

Catálogo 51 (0101 venta interna por defecto, 0200 exportación, 1001 detracción). Must match an existing stored value.

orden_compra   string  optional    

Orden de compra del cliente. Must match the regex /^[A-Za-z0-9-_.\/]+$/. value no debe tener más de 20 caracteres.

observacion   string  optional    

Texto libre para el PDF. value no debe tener más de 500 caracteres.

cliente   object     

Adquirente.

tipo_doc   string     

Catálogo 06: 6 RUC, 1 DNI, 0 sin documento, 4 CE, 7 pasaporte. Must match an existing stored value. Example: 6

num_doc   string     

Número de documento. Must match the regex /^[A-Za-z0-9-]+$/. value no debe tener más de 20 caracteres. Example: 20100070970

razon_social   string     

Razón social o nombres (mín. 3 caracteres). value debe tener al menos 3 caracteres. value no debe tener más de 250 caracteres. Example: SUPERMERCADOS PERUANOS S.A.

direccion   string  optional    

Dirección del cliente. value no debe tener más de 250 caracteres.

email   string  optional    

Correo del cliente. value debe ser un correo válido. value no debe tener más de 150 caracteres.

ubigeo   string  optional    

Ubigeo INEI. value debe tener 6 dígitos.

codigo_pais   string  optional    

ISO 3166-1 alfa-2 (exportación). Must contain only letters. value debe tener 2 caracteres.

items   object[]     

Ítems del comprobante. value debe tener al menos 1 elementos. value no debe tener más de 500 elementos.

descripcion   string     

Descripción del bien o servicio. value no debe tener más de 500 caracteres. Example: Laptop 14" Core i5

cantidad   string     

Decimal como string. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/. Example: 2

valor_unitario   string  optional    

Sin IGV. Usa este o precio_unitario, no ambos. En gratuitas, valor referencial. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

precio_unitario   string  optional    

Con IGV. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/. Example: 2500.00

unidad   string  optional    

Catálogo 03 (NIU por defecto, ZZ servicios). Must match an existing stored value. value no debe tener más de 5 caracteres. Example: NIU

codigo   string  optional    

Código interno. Must match the regex /^[A-Za-z0-9-_.\/]+$/. value no debe tener más de 30 caracteres. Example: LAP-001

codigo_sunat   string  optional    

Código de producto SUNAT (UNSPSC). Must match the regex /^\d+$/. value no debe tener más de 20 caracteres.

tipo_afectacion_igv   string  optional    

Catálogo 07 (10 gravado por defecto, 20 exonerado, 30 inafecto, 40 exportación, 11–16/21/31–37 gratuitas). Example: 10

Must be one of:
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 20
  • 21
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 40
porcentaje_igv   string  optional    

Tasa del ítem (18 por defecto). Una sola tasa por comprobante. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

descuento   string  optional    

Descuento del ítem (monto sin IGV). Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

isc   object  optional    

ISC sistema al valor.

porcentaje   string  optional    

Porcentaje de ISC. This field is required when items.*.isc is present. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

icbper   boolean  optional    

true para bolsas plásticas (impuesto por unidad).

descuento_global   string  optional    

Descuento global (monto sin IGV). Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

anticipos   object[]  optional    

Anticipos deducidos. value no debe tener más de 20 elementos.

tipo_doc   string  optional    

01 o 03.

Must be one of:
  • 2
  • 3
numero   string  optional    

Comprobante del anticipo (F001-10). Must match the regex /^[FB][A-Z0-9]{3}-\d{1,8}$/i.

valor   string  optional    

Valor del anticipo. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

afectacion   string  optional    

Afectación del anticipo.

Must be one of:
  • gravadas
  • exoneradas
  • inafectas
detraccion   object  optional    

Operación sujeta a detracción (tipo_operacion 1001).

codigo_bien   string  optional    

Catálogo 54. This field is required when detraccion is present. Must match an existing stored value.

porcentaje   string  optional    

Porcentaje vigente (verificar). This field is required when detraccion is present. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

cuenta_banco   string  optional    

Cuenta en el Banco de la Nación. This field is required when detraccion is present. Must match the regex /^[A-Za-z0-9-_.\/]+$/. value no debe tener más de 30 caracteres.

medio_pago   string  optional    

Catálogo 59. Must match an existing stored value.

monto   string  optional    

Monto en soles (obligatorio si la moneda no es PEN). Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

forma_pago   object  optional    

Contado por defecto.

tipo   string  optional    

contado o credito. This field is required when forma_pago is present.

Must be one of:
  • contado
  • credito
cuotas   object[]  optional    

Cuotas; deben sumar el neto pendiente. value no debe tener más de 60 elementos.

monto   string  optional    

Monto de la cuota. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

fecha   string  optional    

Vencimiento Y-m-d. Must be a valid date in the format Y-m-d.

guias   object[]  optional    

Guías de remisión relacionadas. value no debe tener más de 20 elementos.

tipo_doc   string  optional    

09 o 31.

Must be one of:
  • 9
  • 31
numero   string  optional    

T001-25. Must match the regex /^[A-Z0-9]{4}-\d{1,8}$/i.

leyendas   string[]  optional    

Texto de la leyenda. value debe tener 4 dígitos.

Solo generar y firmar el XML (no persiste ni envía).

requires authentication

Example request:
curl --request POST \
    "https://djmplatform.com/api/v1/invoice/xml" \
    --header "Authorization: Bearer sk_beta_xxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"tipo_doc\": \"01\",
    \"serie\": \"F001\",
    \"moneda\": \"PEN\",
    \"cliente\": {
        \"tipo_doc\": \"6\",
        \"num_doc\": \"20100070970\",
        \"razon_social\": \"SUPERMERCADOS PERUANOS S.A.\"
    },
    \"items\": [
        {
            \"descripcion\": \"Laptop 14\\\" Core i5\",
            \"cantidad\": \"2\",
            \"precio_unitario\": \"2500.00\",
            \"unidad\": \"NIU\",
            \"codigo\": \"LAP-001\",
            \"tipo_afectacion_igv\": \"10\"
        }
    ]
}"
const url = new URL(
    "https://djmplatform.com/api/v1/invoice/xml"
);

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

let body = {
    "tipo_doc": "01",
    "serie": "F001",
    "moneda": "PEN",
    "cliente": {
        "tipo_doc": "6",
        "num_doc": "20100070970",
        "razon_social": "SUPERMERCADOS PERUANOS S.A."
    },
    "items": [
        {
            "descripcion": "Laptop 14\" Core i5",
            "cantidad": "2",
            "precio_unitario": "2500.00",
            "unidad": "NIU",
            "codigo": "LAP-001",
            "tipo_afectacion_igv": "10"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://djmplatform.com/api/v1/invoice/xml';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer sk_beta_xxx',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'tipo_doc' => '01',
            'serie' => 'F001',
            'moneda' => 'PEN',
            'cliente' => [
                'tipo_doc' => '6',
                'num_doc' => '20100070970',
                'razon_social' => 'SUPERMERCADOS PERUANOS S.A.',
            ],
            'items' => [
                [
                    'descripcion' => 'Laptop 14" Core i5',
                    'cantidad' => '2',
                    'precio_unitario' => '2500.00',
                    'unidad' => 'NIU',
                    'codigo' => 'LAP-001',
                    'tipo_afectacion_igv' => '10',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/v1/invoice/xml

Headers

Authorization        

Example: Bearer sk_beta_xxx

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

tipo_doc   string     

Catálogo 01: 01 factura, 03 boleta. Example: 01

Must be one of:
  • 1
  • 3
envio   string  optional    

Boletas: "resumen" para informarlas por Resumen Diario en lugar de enviarlas una a una.

Must be one of:
  • individual
  • resumen
serie   string     

Serie creada en el panel para el entorno del token (F001, B001…). Must contain only letters and numbers. value debe tener 4 caracteres. Example: F001

correlativo   integer  optional    

Opcional. Si se omite se asigna el siguiente. value debe ser al menos 1. value no debe ser mayor que 99999999.

fecha_emision   string  optional    

ISO 8601. Por defecto, ahora (hora de Lima). No puede ser futura. value no es una fecha válida.

fecha_vencimiento   string  optional    

Y-m-d. Must be a valid date in the format Y-m-d.

moneda   string  optional    

PEN (defecto), USD o EUR. Example: PEN

Must be one of:
  • PEN
  • USD
  • EUR
tipo_operacion   string  optional    

Catálogo 51 (0101 venta interna por defecto, 0200 exportación, 1001 detracción). Must match an existing stored value.

orden_compra   string  optional    

Orden de compra del cliente. Must match the regex /^[A-Za-z0-9-_.\/]+$/. value no debe tener más de 20 caracteres.

observacion   string  optional    

Texto libre para el PDF. value no debe tener más de 500 caracteres.

cliente   object     

Adquirente.

tipo_doc   string     

Catálogo 06: 6 RUC, 1 DNI, 0 sin documento, 4 CE, 7 pasaporte. Must match an existing stored value. Example: 6

num_doc   string     

Número de documento. Must match the regex /^[A-Za-z0-9-]+$/. value no debe tener más de 20 caracteres. Example: 20100070970

razon_social   string     

Razón social o nombres (mín. 3 caracteres). value debe tener al menos 3 caracteres. value no debe tener más de 250 caracteres. Example: SUPERMERCADOS PERUANOS S.A.

direccion   string  optional    

Dirección del cliente. value no debe tener más de 250 caracteres.

email   string  optional    

Correo del cliente. value debe ser un correo válido. value no debe tener más de 150 caracteres.

ubigeo   string  optional    

Ubigeo INEI. value debe tener 6 dígitos.

codigo_pais   string  optional    

ISO 3166-1 alfa-2 (exportación). Must contain only letters. value debe tener 2 caracteres.

items   object[]     

Ítems del comprobante. value debe tener al menos 1 elementos. value no debe tener más de 500 elementos.

descripcion   string     

Descripción del bien o servicio. value no debe tener más de 500 caracteres. Example: Laptop 14" Core i5

cantidad   string     

Decimal como string. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/. Example: 2

valor_unitario   string  optional    

Sin IGV. Usa este o precio_unitario, no ambos. En gratuitas, valor referencial. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

precio_unitario   string  optional    

Con IGV. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/. Example: 2500.00

unidad   string  optional    

Catálogo 03 (NIU por defecto, ZZ servicios). Must match an existing stored value. value no debe tener más de 5 caracteres. Example: NIU

codigo   string  optional    

Código interno. Must match the regex /^[A-Za-z0-9-_.\/]+$/. value no debe tener más de 30 caracteres. Example: LAP-001

codigo_sunat   string  optional    

Código de producto SUNAT (UNSPSC). Must match the regex /^\d+$/. value no debe tener más de 20 caracteres.

tipo_afectacion_igv   string  optional    

Catálogo 07 (10 gravado por defecto, 20 exonerado, 30 inafecto, 40 exportación, 11–16/21/31–37 gratuitas). Example: 10

Must be one of:
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 20
  • 21
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 40
porcentaje_igv   string  optional    

Tasa del ítem (18 por defecto). Una sola tasa por comprobante. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

descuento   string  optional    

Descuento del ítem (monto sin IGV). Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

isc   object  optional    

ISC sistema al valor.

porcentaje   string  optional    

Porcentaje de ISC. This field is required when items.*.isc is present. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

icbper   boolean  optional    

true para bolsas plásticas (impuesto por unidad).

descuento_global   string  optional    

Descuento global (monto sin IGV). Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

anticipos   object[]  optional    

Anticipos deducidos. value no debe tener más de 20 elementos.

tipo_doc   string  optional    

01 o 03.

Must be one of:
  • 2
  • 3
numero   string  optional    

Comprobante del anticipo (F001-10). Must match the regex /^[FB][A-Z0-9]{3}-\d{1,8}$/i.

valor   string  optional    

Valor del anticipo. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

afectacion   string  optional    

Afectación del anticipo.

Must be one of:
  • gravadas
  • exoneradas
  • inafectas
detraccion   object  optional    

Operación sujeta a detracción (tipo_operacion 1001).

codigo_bien   string  optional    

Catálogo 54. This field is required when detraccion is present. Must match an existing stored value.

porcentaje   string  optional    

Porcentaje vigente (verificar). This field is required when detraccion is present. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

cuenta_banco   string  optional    

Cuenta en el Banco de la Nación. This field is required when detraccion is present. Must match the regex /^[A-Za-z0-9-_.\/]+$/. value no debe tener más de 30 caracteres.

medio_pago   string  optional    

Catálogo 59. Must match an existing stored value.

monto   string  optional    

Monto en soles (obligatorio si la moneda no es PEN). Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

forma_pago   object  optional    

Contado por defecto.

tipo   string  optional    

contado o credito. This field is required when forma_pago is present.

Must be one of:
  • contado
  • credito
cuotas   object[]  optional    

Cuotas; deben sumar el neto pendiente. value no debe tener más de 60 elementos.

monto   string  optional    

Monto de la cuota. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

fecha   string  optional    

Vencimiento Y-m-d. Must be a valid date in the format Y-m-d.

guias   object[]  optional    

Guías de remisión relacionadas. value no debe tener más de 20 elementos.

tipo_doc   string  optional    

09 o 31.

Must be one of:
  • 9
  • 31
numero   string  optional    

T001-25. Must match the regex /^[A-Z0-9]{4}-\d{1,8}$/i.

leyendas   string[]  optional    

Texto de la leyenda. value debe tener 4 dígitos.

Vista previa del PDF (no persiste). Query: format=a4|ticket.

requires authentication

Example request:
curl --request POST \
    "https://djmplatform.com/api/v1/invoice/pdf" \
    --header "Authorization: Bearer sk_beta_xxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"tipo_doc\": \"01\",
    \"serie\": \"F001\",
    \"moneda\": \"PEN\",
    \"cliente\": {
        \"tipo_doc\": \"6\",
        \"num_doc\": \"20100070970\",
        \"razon_social\": \"SUPERMERCADOS PERUANOS S.A.\"
    },
    \"items\": [
        {
            \"descripcion\": \"Laptop 14\\\" Core i5\",
            \"cantidad\": \"2\",
            \"precio_unitario\": \"2500.00\",
            \"unidad\": \"NIU\",
            \"codigo\": \"LAP-001\",
            \"tipo_afectacion_igv\": \"10\"
        }
    ]
}"
const url = new URL(
    "https://djmplatform.com/api/v1/invoice/pdf"
);

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

let body = {
    "tipo_doc": "01",
    "serie": "F001",
    "moneda": "PEN",
    "cliente": {
        "tipo_doc": "6",
        "num_doc": "20100070970",
        "razon_social": "SUPERMERCADOS PERUANOS S.A."
    },
    "items": [
        {
            "descripcion": "Laptop 14\" Core i5",
            "cantidad": "2",
            "precio_unitario": "2500.00",
            "unidad": "NIU",
            "codigo": "LAP-001",
            "tipo_afectacion_igv": "10"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://djmplatform.com/api/v1/invoice/pdf';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer sk_beta_xxx',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'tipo_doc' => '01',
            'serie' => 'F001',
            'moneda' => 'PEN',
            'cliente' => [
                'tipo_doc' => '6',
                'num_doc' => '20100070970',
                'razon_social' => 'SUPERMERCADOS PERUANOS S.A.',
            ],
            'items' => [
                [
                    'descripcion' => 'Laptop 14" Core i5',
                    'cantidad' => '2',
                    'precio_unitario' => '2500.00',
                    'unidad' => 'NIU',
                    'codigo' => 'LAP-001',
                    'tipo_afectacion_igv' => '10',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/v1/invoice/pdf

Headers

Authorization        

Example: Bearer sk_beta_xxx

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

tipo_doc   string     

Catálogo 01: 01 factura, 03 boleta. Example: 01

Must be one of:
  • 1
  • 3
envio   string  optional    

Boletas: "resumen" para informarlas por Resumen Diario en lugar de enviarlas una a una.

Must be one of:
  • individual
  • resumen
serie   string     

Serie creada en el panel para el entorno del token (F001, B001…). Must contain only letters and numbers. value debe tener 4 caracteres. Example: F001

correlativo   integer  optional    

Opcional. Si se omite se asigna el siguiente. value debe ser al menos 1. value no debe ser mayor que 99999999.

fecha_emision   string  optional    

ISO 8601. Por defecto, ahora (hora de Lima). No puede ser futura. value no es una fecha válida.

fecha_vencimiento   string  optional    

Y-m-d. Must be a valid date in the format Y-m-d.

moneda   string  optional    

PEN (defecto), USD o EUR. Example: PEN

Must be one of:
  • PEN
  • USD
  • EUR
tipo_operacion   string  optional    

Catálogo 51 (0101 venta interna por defecto, 0200 exportación, 1001 detracción). Must match an existing stored value.

orden_compra   string  optional    

Orden de compra del cliente. Must match the regex /^[A-Za-z0-9-_.\/]+$/. value no debe tener más de 20 caracteres.

observacion   string  optional    

Texto libre para el PDF. value no debe tener más de 500 caracteres.

cliente   object     

Adquirente.

tipo_doc   string     

Catálogo 06: 6 RUC, 1 DNI, 0 sin documento, 4 CE, 7 pasaporte. Must match an existing stored value. Example: 6

num_doc   string     

Número de documento. Must match the regex /^[A-Za-z0-9-]+$/. value no debe tener más de 20 caracteres. Example: 20100070970

razon_social   string     

Razón social o nombres (mín. 3 caracteres). value debe tener al menos 3 caracteres. value no debe tener más de 250 caracteres. Example: SUPERMERCADOS PERUANOS S.A.

direccion   string  optional    

Dirección del cliente. value no debe tener más de 250 caracteres.

email   string  optional    

Correo del cliente. value debe ser un correo válido. value no debe tener más de 150 caracteres.

ubigeo   string  optional    

Ubigeo INEI. value debe tener 6 dígitos.

codigo_pais   string  optional    

ISO 3166-1 alfa-2 (exportación). Must contain only letters. value debe tener 2 caracteres.

items   object[]     

Ítems del comprobante. value debe tener al menos 1 elementos. value no debe tener más de 500 elementos.

descripcion   string     

Descripción del bien o servicio. value no debe tener más de 500 caracteres. Example: Laptop 14" Core i5

cantidad   string     

Decimal como string. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/. Example: 2

valor_unitario   string  optional    

Sin IGV. Usa este o precio_unitario, no ambos. En gratuitas, valor referencial. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

precio_unitario   string  optional    

Con IGV. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/. Example: 2500.00

unidad   string  optional    

Catálogo 03 (NIU por defecto, ZZ servicios). Must match an existing stored value. value no debe tener más de 5 caracteres. Example: NIU

codigo   string  optional    

Código interno. Must match the regex /^[A-Za-z0-9-_.\/]+$/. value no debe tener más de 30 caracteres. Example: LAP-001

codigo_sunat   string  optional    

Código de producto SUNAT (UNSPSC). Must match the regex /^\d+$/. value no debe tener más de 20 caracteres.

tipo_afectacion_igv   string  optional    

Catálogo 07 (10 gravado por defecto, 20 exonerado, 30 inafecto, 40 exportación, 11–16/21/31–37 gratuitas). Example: 10

Must be one of:
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 20
  • 21
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 40
porcentaje_igv   string  optional    

Tasa del ítem (18 por defecto). Una sola tasa por comprobante. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

descuento   string  optional    

Descuento del ítem (monto sin IGV). Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

isc   object  optional    

ISC sistema al valor.

porcentaje   string  optional    

Porcentaje de ISC. This field is required when items.*.isc is present. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

icbper   boolean  optional    

true para bolsas plásticas (impuesto por unidad).

descuento_global   string  optional    

Descuento global (monto sin IGV). Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

anticipos   object[]  optional    

Anticipos deducidos. value no debe tener más de 20 elementos.

tipo_doc   string  optional    

01 o 03.

Must be one of:
  • 2
  • 3
numero   string  optional    

Comprobante del anticipo (F001-10). Must match the regex /^[FB][A-Z0-9]{3}-\d{1,8}$/i.

valor   string  optional    

Valor del anticipo. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

afectacion   string  optional    

Afectación del anticipo.

Must be one of:
  • gravadas
  • exoneradas
  • inafectas
detraccion   object  optional    

Operación sujeta a detracción (tipo_operacion 1001).

codigo_bien   string  optional    

Catálogo 54. This field is required when detraccion is present. Must match an existing stored value.

porcentaje   string  optional    

Porcentaje vigente (verificar). This field is required when detraccion is present. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

cuenta_banco   string  optional    

Cuenta en el Banco de la Nación. This field is required when detraccion is present. Must match the regex /^[A-Za-z0-9-_.\/]+$/. value no debe tener más de 30 caracteres.

medio_pago   string  optional    

Catálogo 59. Must match an existing stored value.

monto   string  optional    

Monto en soles (obligatorio si la moneda no es PEN). Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

forma_pago   object  optional    

Contado por defecto.

tipo   string  optional    

contado o credito. This field is required when forma_pago is present.

Must be one of:
  • contado
  • credito
cuotas   object[]  optional    

Cuotas; deben sumar el neto pendiente. value no debe tener más de 60 elementos.

monto   string  optional    

Monto de la cuota. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

fecha   string  optional    

Vencimiento Y-m-d. Must be a valid date in the format Y-m-d.

guias   object[]  optional    

Guías de remisión relacionadas. value no debe tener más de 20 elementos.

tipo_doc   string  optional    

09 o 31.

Must be one of:
  • 9
  • 31
numero   string  optional    

T001-25. Must match the regex /^[A-Z0-9]{4}-\d{1,8}$/i.

leyendas   string[]  optional    

Texto de la leyenda. value debe tener 4 dígitos.

Emitir nota de crédito (07) o débito (08) y enviarla a SUNAT.

requires authentication

Example request:
curl --request POST \
    "https://djmplatform.com/api/v1/note/send" \
    --header "Authorization: Bearer sk_beta_xxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"tipo_doc\": \"07\",
    \"serie\": \"FC01\",
    \"moneda\": \"PEN\",
    \"cliente\": {
        \"tipo_doc\": \"6\",
        \"num_doc\": \"20100070970\",
        \"razon_social\": \"SUPERMERCADOS PERUANOS S.A.\"
    },
    \"items\": [
        {
            \"descripcion\": \"Laptop 14\\\" Core i5\",
            \"cantidad\": \"2\",
            \"precio_unitario\": \"2500.00\",
            \"unidad\": \"NIU\",
            \"codigo\": \"LAP-001\",
            \"tipo_afectacion_igv\": \"10\"
        }
    ],
    \"documento_afectado\": {
        \"tipo_doc\": \"01\",
        \"numero\": \"F001-125\"
    },
    \"motivo\": {
        \"codigo\": \"07\",
        \"descripcion\": \"Devolución de 1 unidad\"
    }
}"
const url = new URL(
    "https://djmplatform.com/api/v1/note/send"
);

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

let body = {
    "tipo_doc": "07",
    "serie": "FC01",
    "moneda": "PEN",
    "cliente": {
        "tipo_doc": "6",
        "num_doc": "20100070970",
        "razon_social": "SUPERMERCADOS PERUANOS S.A."
    },
    "items": [
        {
            "descripcion": "Laptop 14\" Core i5",
            "cantidad": "2",
            "precio_unitario": "2500.00",
            "unidad": "NIU",
            "codigo": "LAP-001",
            "tipo_afectacion_igv": "10"
        }
    ],
    "documento_afectado": {
        "tipo_doc": "01",
        "numero": "F001-125"
    },
    "motivo": {
        "codigo": "07",
        "descripcion": "Devolución de 1 unidad"
    }
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://djmplatform.com/api/v1/note/send';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer sk_beta_xxx',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'tipo_doc' => '07',
            'serie' => 'FC01',
            'moneda' => 'PEN',
            'cliente' => [
                'tipo_doc' => '6',
                'num_doc' => '20100070970',
                'razon_social' => 'SUPERMERCADOS PERUANOS S.A.',
            ],
            'items' => [
                [
                    'descripcion' => 'Laptop 14" Core i5',
                    'cantidad' => '2',
                    'precio_unitario' => '2500.00',
                    'unidad' => 'NIU',
                    'codigo' => 'LAP-001',
                    'tipo_afectacion_igv' => '10',
                ],
            ],
            'documento_afectado' => [
                'tipo_doc' => '01',
                'numero' => 'F001-125',
            ],
            'motivo' => [
                'codigo' => '07',
                'descripcion' => 'Devolución de 1 unidad',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/v1/note/send

Headers

Authorization        

Example: Bearer sk_beta_xxx

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

tipo_doc   string     

07 nota de crédito, 08 nota de débito. Example: 07

Must be one of:
  • 7
  • 8
envio   string  optional    

Boletas: "resumen" para informarlas por Resumen Diario en lugar de enviarlas una a una.

Must be one of:
  • individual
  • resumen
serie   string     

Prefijo del documento afectado: F (FC01) o B (BC01). Must contain only letters and numbers. value debe tener 4 caracteres. Example: FC01

correlativo   integer  optional    

Opcional. Si se omite se asigna el siguiente. value debe ser al menos 1. value no debe ser mayor que 99999999.

fecha_emision   string  optional    

ISO 8601. Por defecto, ahora (hora de Lima). No puede ser futura. value no es una fecha válida.

fecha_vencimiento   string  optional    

Y-m-d. Must be a valid date in the format Y-m-d.

moneda   string  optional    

PEN (defecto), USD o EUR. Example: PEN

Must be one of:
  • PEN
  • USD
  • EUR
tipo_operacion   string  optional    

Catálogo 51 (0101 venta interna por defecto, 0200 exportación, 1001 detracción). Must match an existing stored value.

orden_compra   string  optional    

Orden de compra del cliente. Must match the regex /^[A-Za-z0-9-_.\/]+$/. value no debe tener más de 20 caracteres.

observacion   string  optional    

Texto libre para el PDF. value no debe tener más de 500 caracteres.

cliente   object     

Adquirente.

tipo_doc   string     

Catálogo 06: 6 RUC, 1 DNI, 0 sin documento, 4 CE, 7 pasaporte. Must match an existing stored value. Example: 6

num_doc   string     

Número de documento. Must match the regex /^[A-Za-z0-9-]+$/. value no debe tener más de 20 caracteres. Example: 20100070970

razon_social   string     

Razón social o nombres (mín. 3 caracteres). value debe tener al menos 3 caracteres. value no debe tener más de 250 caracteres. Example: SUPERMERCADOS PERUANOS S.A.

direccion   string  optional    

Dirección del cliente. value no debe tener más de 250 caracteres.

email   string  optional    

Correo del cliente. value debe ser un correo válido. value no debe tener más de 150 caracteres.

ubigeo   string  optional    

Ubigeo INEI. value debe tener 6 dígitos.

codigo_pais   string  optional    

ISO 3166-1 alfa-2 (exportación). Must contain only letters. value debe tener 2 caracteres.

items   object[]     

Ítems del comprobante. value debe tener al menos 1 elementos. value no debe tener más de 500 elementos.

descripcion   string     

Descripción del bien o servicio. value no debe tener más de 500 caracteres. Example: Laptop 14" Core i5

cantidad   string     

Decimal como string. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/. Example: 2

valor_unitario   string  optional    

Sin IGV. Usa este o precio_unitario, no ambos. En gratuitas, valor referencial. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

precio_unitario   string  optional    

Con IGV. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/. Example: 2500.00

unidad   string  optional    

Catálogo 03 (NIU por defecto, ZZ servicios). Must match an existing stored value. value no debe tener más de 5 caracteres. Example: NIU

codigo   string  optional    

Código interno. Must match the regex /^[A-Za-z0-9-_.\/]+$/. value no debe tener más de 30 caracteres. Example: LAP-001

codigo_sunat   string  optional    

Código de producto SUNAT (UNSPSC). Must match the regex /^\d+$/. value no debe tener más de 20 caracteres.

tipo_afectacion_igv   string  optional    

Catálogo 07 (10 gravado por defecto, 20 exonerado, 30 inafecto, 40 exportación, 11–16/21/31–37 gratuitas). Example: 10

Must be one of:
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 20
  • 21
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 40
porcentaje_igv   string  optional    

Tasa del ítem (18 por defecto). Una sola tasa por comprobante. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

descuento   string  optional    

Descuento del ítem (monto sin IGV). Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

isc   object  optional    

ISC sistema al valor.

porcentaje   string  optional    

Porcentaje de ISC. This field is required when items.*.isc is present. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

icbper   boolean  optional    

true para bolsas plásticas (impuesto por unidad).

descuento_global   string  optional    

Descuento global (monto sin IGV). Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

anticipos   object[]  optional    

Anticipos deducidos. value no debe tener más de 20 elementos.

tipo_doc   string  optional    

01 o 03.

Must be one of:
  • 2
  • 3
numero   string  optional    

Comprobante del anticipo (F001-10). Must match the regex /^[FB][A-Z0-9]{3}-\d{1,8}$/i.

valor   string  optional    

Valor del anticipo. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

afectacion   string  optional    

Afectación del anticipo.

Must be one of:
  • gravadas
  • exoneradas
  • inafectas
detraccion   object  optional    

Operación sujeta a detracción (tipo_operacion 1001).

codigo_bien   string  optional    

Catálogo 54. This field is required when detraccion is present. Must match an existing stored value.

porcentaje   string  optional    

Porcentaje vigente (verificar). This field is required when detraccion is present. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

cuenta_banco   string  optional    

Cuenta en el Banco de la Nación. This field is required when detraccion is present. Must match the regex /^[A-Za-z0-9-_.\/]+$/. value no debe tener más de 30 caracteres.

medio_pago   string  optional    

Catálogo 59. Must match an existing stored value.

monto   string  optional    

Monto en soles (obligatorio si la moneda no es PEN). Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

forma_pago   object  optional    

Contado por defecto.

tipo   string  optional    

contado o credito. This field is required when forma_pago is present.

Must be one of:
  • contado
  • credito
cuotas   object[]  optional    

Cuotas; deben sumar el neto pendiente. value no debe tener más de 60 elementos.

monto   string  optional    

Monto de la cuota. Must match the regex /^-?\d{1,12}(.\d{1,10})?$/.

fecha   string  optional    

Vencimiento Y-m-d. Must be a valid date in the format Y-m-d.

guias   object[]  optional    

Guías de remisión relacionadas. value no debe tener más de 20 elementos.

tipo_doc   string  optional    

09 o 31.

Must be one of:
  • 9
  • 31
numero   string  optional    

T001-25. Must match the regex /^[A-Z0-9]{4}-\d{1,8}$/i.

leyendas   string[]  optional    

Texto de la leyenda. value debe tener 4 dígitos.

documento_afectado   object     

Comprobante que se modifica.

tipo_doc   string     

01 o 03. Example: 01

Must be one of:
  • 1
  • 3
numero   string     

Serie-correlativo. Must match the regex /^[FB][A-Z0-9]{3}-\d{1,8}$/i. Example: F001-125

motivo   object     

Motivo de la nota.

codigo   string     

Catálogo 09 (NC) o 10 (ND). Must match an existing stored value. Example: 07

descripcion   string     

Sustento. value debe tener al menos 3 caracteres. value no debe tener más de 250 caracteres. Example: Devolución de 1 unidad

Reenviar a SUNAT un comprobante firmado o pendiente de reintento.

requires authentication

Example request:
curl --request POST \
    "https://djmplatform.com/api/v1/documents/6ff8f7f6-1eb3-3525-be4a-3932c805afed/resend" \
    --header "Authorization: Bearer sk_beta_xxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://djmplatform.com/api/v1/documents/6ff8f7f6-1eb3-3525-be4a-3932c805afed/resend"
);

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


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://djmplatform.com/api/v1/documents/6ff8f7f6-1eb3-3525-be4a-3932c805afed/resend';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer sk_beta_xxx',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/v1/documents/{document_uuid}/resend

Headers

Authorization        

Example: Bearer sk_beta_xxx

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

document_uuid   integer     

Example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed

Consultar un comprobante.

requires authentication

Example request:
curl --request GET \
    --get "https://djmplatform.com/api/v1/documents/6ff8f7f6-1eb3-3525-be4a-3932c805afed" \
    --header "Authorization: Bearer sk_beta_xxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://djmplatform.com/api/v1/documents/6ff8f7f6-1eb3-3525-be4a-3932c805afed"
);

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


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://djmplatform.com/api/v1/documents/6ff8f7f6-1eb3-3525-be4a-3932c805afed';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer sk_beta_xxx',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "success": true,
    "data": {
        "id": "9f0c6b2e-6a1e-4b8f-9d0b-3e1f6f5c2a10",
        "tipo_doc": "01",
        "serie": "F001",
        "correlativo": 1,
        "numero": "F001-1",
        "fecha_emision": "2026-10-30T10:00:00-05:00",
        "moneda": "PEN",
        "cliente": {
            "tipo_doc": "6",
            "num_doc": "20100070970",
            "razon_social": "SUPERMERCADOS PERUANOS S.A."
        },
        "totales": {
            "op_gravadas": "200.00",
            "op_exoneradas": null,
            "op_inafectas": null,
            "op_exportacion": null,
            "op_gratuitas": null,
            "igv_gratuitas": "0.00",
            "base_ivap": null,
            "ivap": "0.00",
            "base_isc": "0.00",
            "isc": "0.00",
            "igv": "36.00",
            "icbper": "0.00",
            "total_impuestos": "36.00",
            "valor_venta": "200.00",
            "precio_venta": "236.00",
            "descuento_global": "0.00",
            "total_anticipos": "0.00",
            "importe_total": "236.00",
            "detraccion": null,
            "neto_pendiente": "236.00"
        },
        "estado": "aceptado",
        "estado_descripcion": "Aceptado",
        "hash": "0b6sN3m1yQb4Jm2bQ4r2v3xk9Ss=",
        "intentos": 1,
        "proximo_reintento": null,
        "urls": {
            "xml": "https://api.tudominio.pe/descargas/9f0c.../xml?expires=...&signature=...",
            "cdr": "https://api.tudominio.pe/descargas/9f0c.../cdr?expires=...&signature=...",
            "pdf": "https://api.tudominio.pe/descargas/9f0c.../pdf?expires=...&signature=...",
            "ticket": "https://api.tudominio.pe/descargas/9f0c.../pdf?format=ticket&expires=...&signature=..."
        },
        "creado": "2026-10-30T10:00:02-05:00"
    },
    "sunat": {
        "code": "0",
        "description": "La Factura numero F001-1, ha sido aceptada",
        "notes": []
    },
    "errors": null
}
 

Request      

GET api/v1/documents/{uuid}

Headers

Authorization        

Example: Bearer sk_beta_xxx

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed

Descargar XML firmado, CDR (zip) o PDF (format=a4|ticket).

requires authentication

Example request:
curl --request GET \
    --get "https://djmplatform.com/api/v1/documents/6ff8f7f6-1eb3-3525-be4a-3932c805afed/xml|cdr|pdf" \
    --header "Authorization: Bearer sk_beta_xxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://djmplatform.com/api/v1/documents/6ff8f7f6-1eb3-3525-be4a-3932c805afed/xml|cdr|pdf"
);

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


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://djmplatform.com/api/v1/documents/6ff8f7f6-1eb3-3525-be4a-3932c805afed/xml|cdr|pdf';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer sk_beta_xxx',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

GET api/v1/documents/{document_uuid}/{type}

Headers

Authorization        

Example: Bearer sk_beta_xxx

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

document_uuid   integer     

Example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed

type   string     

Example: xml|cdr|pdf

Resúmenes y bajas

Enviar Resumen Diario de boletas marcadas con "envio": "resumen".

requires authentication

Body opcional: {"fecha": "2026-10-30"} (fecha de emisión de las boletas).

Example request:
curl --request POST \
    "https://djmplatform.com/api/v1/summary/send" \
    --header "Authorization: Bearer sk_beta_xxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"fecha\": \"2022-11-25\"
}"
const url = new URL(
    "https://djmplatform.com/api/v1/summary/send"
);

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

let body = {
    "fecha": "2022-11-25"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://djmplatform.com/api/v1/summary/send';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer sk_beta_xxx',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'fecha' => '2022-11-25',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/v1/summary/send

Headers

Authorization        

Example: Bearer sk_beta_xxx

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

fecha   string  optional    

Must be a valid date in the format Y-m-d. Must be a date before or equal to today. Example: 2022-11-25

Anular comprobantes aceptados (RA para facturas y notas F; RC con condición 3 para boletas y notas B).

requires authentication

Example request:
curl --request POST \
    "https://djmplatform.com/api/v1/voided/send" \
    --header "Authorization: Bearer sk_beta_xxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"documentos\": [
        {
            \"id\": \"9f0c6b2e-6a1e-4b8f-9d0b-3e1f6f5c2a10\",
            \"motivo\": \"Error en el RUC del cliente\"
        }
    ]
}"
const url = new URL(
    "https://djmplatform.com/api/v1/voided/send"
);

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

let body = {
    "documentos": [
        {
            "id": "9f0c6b2e-6a1e-4b8f-9d0b-3e1f6f5c2a10",
            "motivo": "Error en el RUC del cliente"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://djmplatform.com/api/v1/voided/send';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer sk_beta_xxx',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'documentos' => [
                [
                    'id' => '9f0c6b2e-6a1e-4b8f-9d0b-3e1f6f5c2a10',
                    'motivo' => 'Error en el RUC del cliente',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/v1/voided/send

Headers

Authorization        

Example: Bearer sk_beta_xxx

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

documentos   object[]     

Comprobantes aceptados a anular (máx. 100). La plataforma usa RA (serie F) o RC condición 3 (serie B). value debe tener al menos 1 elementos. value no debe tener más de 100 elementos.

id   string     

UUID devuelto al emitir. value debe ser un UUID válido. Example: 9f0c6b2e-6a1e-4b8f-9d0b-3e1f6f5c2a10

motivo   string     

Motivo de la baja. value debe tener al menos 3 caracteres. value no debe tener más de 100 caracteres. Example: Error en el RUC del cliente

Consultar un ticket de RC/RA (getStatus) o de GRE (API REST). Actualiza los documentos afectados.

requires authentication

Example request:
curl --request GET \
    --get "https://djmplatform.com/api/v1/status/vjrG8He" \
    --header "Authorization: Bearer sk_beta_xxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://djmplatform.com/api/v1/status/vjrG8He"
);

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


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://djmplatform.com/api/v1/status/vjrG8He';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer sk_beta_xxx',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

GET api/v1/status/{ticket}

Headers

Authorization        

Example: Bearer sk_beta_xxx

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

ticket   string     

Example: vjrG8He

Guías de remisión

Emitir y enviar una GRE. El envío es asíncrono: responde con el ticket (202) o, si SUNAT ya lo procesó en la consulta inmediata, con el resultado (200 / 422). Header opcional `Idempotency-Key`.

requires authentication

Example request:
curl --request POST \
    "https://djmplatform.com/api/v1/despatch/send" \
    --header "Authorization: Bearer sk_beta_xxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"tipo_doc\": \"09\",
    \"serie\": \"T001\",
    \"destinatario\": {
        \"tipo_doc\": \"6\",
        \"num_doc\": \"20100070970\",
        \"razon_social\": \"SUPERMERCADOS PERUANOS S.A.\"
    },
    \"envio\": {
        \"motivo\": \"01\",
        \"modalidad\": \"02\",
        \"fecha_traslado\": \"2026-10-31\",
        \"peso_total\": \"125.5\",
        \"unidad_peso\": \"KGM\",
        \"partida\": {
            \"ubigeo\": \"120601\",
            \"direccion\": \"Av. Marginal Km 4, Satipo\"
        },
        \"llegada\": {
            \"ubigeo\": \"150131\",
            \"direccion\": \"Av. Morro Solar 1086, Santiago de Surco\"
        },
        \"vehiculos\": [
            {
                \"placa\": \"ABC123\"
            }
        ],
        \"conductores\": [
            {
                \"tipo_doc\": \"1\",
                \"num_doc\": \"45678912\",
                \"nombres\": \"JUAN\",
                \"apellidos\": \"PEREZ QUISPE\",
                \"licencia\": \"Q45678912\"
            }
        ]
    },
    \"items\": [
        {
            \"codigo\": \"CAF-01\",
            \"descripcion\": \"Café pergamino en sacos\",
            \"unidad\": \"KGM\",
            \"cantidad\": \"120.5\"
        }
    ],
    \"documentos_relacionados\": [
        {
            \"tipo\": \"01\",
            \"numero\": \"F001-125\"
        }
    ]
}"
const url = new URL(
    "https://djmplatform.com/api/v1/despatch/send"
);

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

let body = {
    "tipo_doc": "09",
    "serie": "T001",
    "destinatario": {
        "tipo_doc": "6",
        "num_doc": "20100070970",
        "razon_social": "SUPERMERCADOS PERUANOS S.A."
    },
    "envio": {
        "motivo": "01",
        "modalidad": "02",
        "fecha_traslado": "2026-10-31",
        "peso_total": "125.5",
        "unidad_peso": "KGM",
        "partida": {
            "ubigeo": "120601",
            "direccion": "Av. Marginal Km 4, Satipo"
        },
        "llegada": {
            "ubigeo": "150131",
            "direccion": "Av. Morro Solar 1086, Santiago de Surco"
        },
        "vehiculos": [
            {
                "placa": "ABC123"
            }
        ],
        "conductores": [
            {
                "tipo_doc": "1",
                "num_doc": "45678912",
                "nombres": "JUAN",
                "apellidos": "PEREZ QUISPE",
                "licencia": "Q45678912"
            }
        ]
    },
    "items": [
        {
            "codigo": "CAF-01",
            "descripcion": "Café pergamino en sacos",
            "unidad": "KGM",
            "cantidad": "120.5"
        }
    ],
    "documentos_relacionados": [
        {
            "tipo": "01",
            "numero": "F001-125"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://djmplatform.com/api/v1/despatch/send';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer sk_beta_xxx',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'tipo_doc' => '09',
            'serie' => 'T001',
            'destinatario' => [
                'tipo_doc' => '6',
                'num_doc' => '20100070970',
                'razon_social' => 'SUPERMERCADOS PERUANOS S.A.',
            ],
            'envio' => [
                'motivo' => '01',
                'modalidad' => '02',
                'fecha_traslado' => '2026-10-31',
                'peso_total' => '125.5',
                'unidad_peso' => 'KGM',
                'partida' => [
                    'ubigeo' => '120601',
                    'direccion' => 'Av. Marginal Km 4, Satipo',
                ],
                'llegada' => [
                    'ubigeo' => '150131',
                    'direccion' => 'Av. Morro Solar 1086, Santiago de Surco',
                ],
                'vehiculos' => [
                    [
                        'placa' => 'ABC123',
                    ],
                ],
                'conductores' => [
                    [
                        'tipo_doc' => '1',
                        'num_doc' => '45678912',
                        'nombres' => 'JUAN',
                        'apellidos' => 'PEREZ QUISPE',
                        'licencia' => 'Q45678912',
                    ],
                ],
            ],
            'items' => [
                [
                    'codigo' => 'CAF-01',
                    'descripcion' => 'Café pergamino en sacos',
                    'unidad' => 'KGM',
                    'cantidad' => '120.5',
                ],
            ],
            'documentos_relacionados' => [
                [
                    'tipo' => '01',
                    'numero' => 'F001-125',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "success": true,
    "data": {
        "id": "5d2f0b7e-2b8a-4c1e-9f3a-7c6b8e9d0a11",
        "tipo_doc": "09",
        "serie": "T001",
        "correlativo": 1,
        "numero": "T001-1",
        "fecha_emision": "2026-10-31T10:00:00-05:00",
        "fecha_traslado": "2026-10-31",
        "motivo": "01",
        "modalidad": "02",
        "peso_total": "125.500",
        "unidad_peso": "KGM",
        "destinatario": {
            "tipo_doc": "6",
            "num_doc": "20100070970",
            "razon_social": "SUPERMERCADOS PERUANOS S.A."
        },
        "remitente": null,
        "estado": "aceptado",
        "estado_descripcion": "Aceptado",
        "simulado": false,
        "ticket": "3a30c282-53d9-4275-a1d4-f331afc9f90c",
        "hash": "pZfJ7bE0tV1xq8m2kR9sYw3uNcA=",
        "qr_url": "https://e-factura.sunat.gob.pe/v1/contribuyente/gre/comprobantes/descargaqr?hashqr=…",
        "intentos": 2,
        "proximo_reintento": null,
        "proxima_consulta": null,
        "urls": {
            "xml": "https://djmplatform.com/descargas/guias/5d2f0b7e-…/xml?expires=…&signature=…",
            "cdr": "https://djmplatform.com/descargas/guias/5d2f0b7e-…/cdr?expires=…&signature=…",
            "pdf": "https://djmplatform.com/descargas/guias/5d2f0b7e-…/pdf?expires=…&signature=…"
        },
        "creado": "2026-10-31T10:00:01-05:00"
    },
    "sunat": {
        "code": "0",
        "description": "La Guia numero T001-1, ha sido aceptada",
        "notes": []
    },
    "errors": null
}
 

Example response (422):


{
    "success": false,
    "data": null,
    "sunat": null,
    "errors": {
        "code": "VALIDATION_FAILED",
        "message": "Los datos enviados no son válidos.",
        "fields": {
            "cliente.num_doc": [
                "El RUC del cliente no es válido."
            ]
        }
    }
}
 

Request      

POST api/v1/despatch/send

Headers

Authorization        

Example: Bearer sk_beta_xxx

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

tipo_doc   string     

09 remitente, 31 transportista. Example: 09

Must be one of:
  • 9
  • 31
serie   string     

T### (09) o V### (31). Must contain only letters and numbers. value debe tener 4 caracteres. Example: T001

correlativo   integer  optional    

Opcional. value debe ser al menos 1. value no debe ser mayor que 99999999.

fecha_emision   string  optional    

ISO 8601; por defecto ahora. value no es una fecha válida. Must be a date before or equal to now.

observacion   string  optional    

Máx. 250. value no debe tener más de 250 caracteres.

destinatario   object     

Destinatario.

tipo_doc   string  optional    

Catálogo 06. This field is required when destinatario is present. Must match an existing stored value. Example: 6

num_doc   string  optional    

Número de documento. This field is required when destinatario is present. Must match the regex /^[A-Za-z0-9-]+$/. value no debe tener más de 15 caracteres. Example: 20100070970

razon_social   string  optional    

Razón social o nombres. This field is required when destinatario is present. value debe tener al menos 3 caracteres. value no debe tener más de 250 caracteres. Example: SUPERMERCADOS PERUANOS S.A.

remitente   object  optional    

Solo guía 31: remitente de los bienes.

tipo_doc   string  optional    

Catálogo 06. This field is required when remitente is present. Must match an existing stored value.

num_doc   string  optional    

Número de documento. This field is required when remitente is present. Must match the regex /^[A-Za-z0-9-]+$/. value no debe tener más de 15 caracteres.

razon_social   string  optional    

Razón social o nombres. This field is required when remitente is present. value debe tener al menos 3 caracteres. value no debe tener más de 250 caracteres.

pagador_flete   object  optional    

Solo 31 con indicador SUNAT_Envio_IndicadorPagadorFlete_Tercero.

tipo_doc   string  optional    

Catálogo 06. This field is required when pagador_flete is present. Must match an existing stored value.

num_doc   string  optional    

Número de documento. This field is required when pagador_flete is present. Must match the regex /^[A-Za-z0-9-]+$/. value no debe tener más de 15 caracteres.

razon_social   string  optional    

Razón social o nombres. This field is required when pagador_flete is present. value debe tener al menos 3 caracteres. value no debe tener más de 250 caracteres.

documentos_relacionados   object[]  optional    

Catálogo 61. Sin emisor_ruc se usa la empresa (09) o el remitente (31). value no debe tener más de 10 elementos.

tipo   string     

01, 03, 09 o 31. Must match an existing stored value. Example: 01

numero   string     

Serie-número. Must match the regex /^[A-Za-z0-9-]+$/. value no debe tener más de 30 caracteres. Example: F001-125

emisor_ruc   string  optional    

RUC del emisor del documento. value debe tener 11 dígitos.

envio   object     

Datos del traslado.

motivo   string  optional    

Solo 09. Catálogo 20 (01 venta, 04 entre establecimientos, 13 otros…). Must match an existing stored value. Example: 01

descripcion_motivo   string  optional    

Obligatoria con motivo 13. value no debe tener más de 100 caracteres.

modalidad   string  optional    

Solo 09. Catálogo 18: 01 público, 02 privado. Must match an existing stored value. Example: 02

fecha_traslado   string     

Inicio del traslado (Y-m-d), no anterior a la emisión. Must be a valid date in the format Y-m-d. Example: 2026-10-31

fecha_entrega_transportista   string  optional    

Obligatoria en 09 transporte público. Must be a valid date in the format Y-m-d.

peso_total   string     

Peso bruto total. Must match the regex /^\d{1,12}(.\d{1,10})?$/. Example: 125.5

unidad_peso   string  optional    

KGM o TNE. Example: KGM

Must be one of:
  • KGM
  • TNE
numero_bultos   integer  optional    

Bultos o pallets. value debe ser al menos 1. value no debe ser mayor que 999999999999.

indicadores   string[]  optional    

Indicador.

Must be one of:
registro_mtc   string  optional    

Solo 31: registro MTC del emisor. Must contain only letters and numbers. value no debe tener más de 20 caracteres.

partida   object     

Punto de partida.

ubigeo   string     

Ubigeo INEI (6 dígitos). value debe tener 6 dígitos. Example: 120601

direccion   string     

Dirección. value debe tener al menos 3 caracteres. value no debe tener más de 250 caracteres. Example: Av. Marginal Km 4, Satipo

cod_local   string  optional    

Código de establecimiento SUNAT (4 dígitos). value debe tener 4 dígitos.

ruc   string  optional    

RUC del establecimiento (con cod_local). This field is required when envio.partida.cod_local is present. value debe tener 11 dígitos.

llegada   object     

Punto de llegada.

ubigeo   string     

Ubigeo INEI (6 dígitos). value debe tener 6 dígitos. Example: 150131

direccion   string     

Dirección. value debe tener al menos 3 caracteres. value no debe tener más de 250 caracteres. Example: Av. Morro Solar 1086, Santiago de Surco

cod_local   string  optional    

Código de establecimiento SUNAT (4 dígitos). value debe tener 4 dígitos.

ruc   string  optional    

RUC del establecimiento (con cod_local). This field is required when envio.llegada.cod_local is present. value debe tener 11 dígitos.

transportista   object  optional    

Solo 09 transporte público.

tipo_doc   string  optional    
  1. This field is required when envio.transportista is present.
Must be one of:
  • 6
num_doc   string  optional    

RUC. This field is required when envio.transportista is present. value debe tener 11 dígitos.

razon_social   string  optional    

Razón social. This field is required when envio.transportista is present. value debe tener al menos 3 caracteres. value no debe tener más de 250 caracteres.

registro_mtc   string  optional    

Registro MTC. Must contain only letters and numbers. value no debe tener más de 20 caracteres.

vehiculos   object[]  optional    

Principal + hasta 2 secundarios. value no debe tener más de 3 elementos.

placa   string     

Hasta 8 alfanuméricos (se quitan guiones). Must match the regex /^[A-Za-z0-9][A-Za-z0-9- ]{0,9}$/. Example: ABC123

tuc   string  optional    

Tarjeta Única de Circulación / certificado de habilitación. Must contain only letters and numbers. value no debe tener más de 15 caracteres.

autorizacion   object  optional    

Autorización especial.

numero   string  optional    

Número. This field is required when envio.vehiculos.*.autorizacion is present. Must match the regex /^[A-Za-z0-9-]+$/. value no debe tener más de 50 caracteres.

entidad   string  optional    

Código de entidad emisora (2). This field is required when envio.vehiculos.*.autorizacion is present. Must contain only letters and numbers. value debe tener 2 caracteres.

conductores   object[]  optional    

Un principal + hasta 2 secundarios. value no debe tener más de 3 elementos.

tipo_doc   string     

Catálogo 06. Must match an existing stored value. Example: 1

num_doc   string     

Documento. Must match the regex /^[A-Za-z0-9-]+$/. value no debe tener más de 15 caracteres. Example: 45678912

nombres   string     

Nombres. value no debe tener más de 250 caracteres. Example: JUAN

apellidos   string     

Apellidos. value no debe tener más de 250 caracteres. Example: PEREZ QUISPE

licencia   string     

Licencia de conducir. Must contain only letters and numbers. value no debe tener más de 10 caracteres. Example: Q45678912

principal   boolean  optional    

Por defecto el primero es el principal.

items   object[]     

Bienes trasladados. value debe tener al menos 1 elementos. value no debe tener más de 500 elementos.

codigo   string  optional    

Código interno. Must match the regex /^[A-Za-z0-9-_.\/]+$/. value no debe tener más de 30 caracteres. Example: CAF-01

descripcion   string     

Descripción. value debe tener al menos 1 caracteres. value no debe tener más de 500 caracteres. Example: Café pergamino en sacos

unidad   string  optional    

Catálogo 03. Must match an existing stored value. Example: KGM

cantidad   string     

Decimal como string. Must match the regex /^\d{1,12}(.\d{1,10})?$/. Example: 120.5

codigo_sunat   string  optional    

Código de producto SUNAT. Must contain only letters and numbers. value no debe tener más de 20 caracteres.

Reenviar una guía firmada o pendiente (p. ej. tras corregir credenciales), o forzar la consulta del ticket.

requires authentication

Example request:
curl --request POST \
    "https://djmplatform.com/api/v1/despatches/6ff8f7f6-1eb3-3525-be4a-3932c805afed/resend" \
    --header "Authorization: Bearer sk_beta_xxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://djmplatform.com/api/v1/despatches/6ff8f7f6-1eb3-3525-be4a-3932c805afed/resend"
);

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


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://djmplatform.com/api/v1/despatches/6ff8f7f6-1eb3-3525-be4a-3932c805afed/resend';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer sk_beta_xxx',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/v1/despatches/{despatch_uuid}/resend

Headers

Authorization        

Example: Bearer sk_beta_xxx

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

despatch_uuid   integer     

Example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed

Consultar una guía.

requires authentication

Example request:
curl --request GET \
    --get "https://djmplatform.com/api/v1/despatches/6ff8f7f6-1eb3-3525-be4a-3932c805afed" \
    --header "Authorization: Bearer sk_beta_xxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://djmplatform.com/api/v1/despatches/6ff8f7f6-1eb3-3525-be4a-3932c805afed"
);

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


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://djmplatform.com/api/v1/despatches/6ff8f7f6-1eb3-3525-be4a-3932c805afed';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer sk_beta_xxx',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "success": true,
    "data": {
        "id": "5d2f0b7e-2b8a-4c1e-9f3a-7c6b8e9d0a11",
        "tipo_doc": "09",
        "serie": "T001",
        "correlativo": 1,
        "numero": "T001-1",
        "fecha_emision": "2026-10-31T10:00:00-05:00",
        "fecha_traslado": "2026-10-31",
        "motivo": "01",
        "modalidad": "02",
        "peso_total": "125.500",
        "unidad_peso": "KGM",
        "destinatario": {
            "tipo_doc": "6",
            "num_doc": "20100070970",
            "razon_social": "SUPERMERCADOS PERUANOS S.A."
        },
        "remitente": null,
        "estado": "aceptado",
        "estado_descripcion": "Aceptado",
        "simulado": false,
        "ticket": "3a30c282-53d9-4275-a1d4-f331afc9f90c",
        "hash": "pZfJ7bE0tV1xq8m2kR9sYw3uNcA=",
        "qr_url": "https://e-factura.sunat.gob.pe/v1/contribuyente/gre/comprobantes/descargaqr?hashqr=…",
        "intentos": 2,
        "proximo_reintento": null,
        "proxima_consulta": null,
        "urls": {
            "xml": "https://djmplatform.com/descargas/guias/5d2f0b7e-…/xml?expires=…&signature=…",
            "cdr": "https://djmplatform.com/descargas/guias/5d2f0b7e-…/cdr?expires=…&signature=…",
            "pdf": "https://djmplatform.com/descargas/guias/5d2f0b7e-…/pdf?expires=…&signature=…"
        },
        "creado": "2026-10-31T10:00:01-05:00"
    },
    "sunat": {
        "code": "0",
        "description": "La Guia numero T001-1, ha sido aceptada",
        "notes": []
    },
    "errors": null
}
 

Request      

GET api/v1/despatches/{uuid}

Headers

Authorization        

Example: Bearer sk_beta_xxx

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed

Descargar XML firmado, CDR (zip) o PDF.

requires authentication

Example request:
curl --request GET \
    --get "https://djmplatform.com/api/v1/despatches/6ff8f7f6-1eb3-3525-be4a-3932c805afed/xml|cdr|pdf" \
    --header "Authorization: Bearer sk_beta_xxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://djmplatform.com/api/v1/despatches/6ff8f7f6-1eb3-3525-be4a-3932c805afed/xml|cdr|pdf"
);

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


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://djmplatform.com/api/v1/despatches/6ff8f7f6-1eb3-3525-be4a-3932c805afed/xml|cdr|pdf';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer sk_beta_xxx',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

GET api/v1/despatches/{despatch_uuid}/{type}

Headers

Authorization        

Example: Bearer sk_beta_xxx

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

despatch_uuid   integer     

Example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed

type   string     

Example: xml|cdr|pdf

Consultas

Consultar RUC: razón social, estado, condición y domicilio fiscal. Caché 24 h.

requires authentication

Example request:
curl --request GET \
    --get "https://djmplatform.com/api/v1/lookup/ruc//^^^///" \
    --header "Authorization: Bearer sk_beta_xxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://djmplatform.com/api/v1/lookup/ruc//^^^///"
);

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


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://djmplatform.com/api/v1/lookup/ruc//^^^///';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer sk_beta_xxx',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "success": true,
    "data": {
        "ruc": "20131312955",
        "razon_social": "SUPERINTENDENCIA NACIONAL DE ADUANAS Y DE ADMINISTRACION TRIBUTARIA - SUNAT",
        "nombre_comercial": null,
        "estado": "ACTIVO",
        "condicion": "HABIDO",
        "direccion": "AV. GARCILASO DE LA VEGA NRO 1472",
        "ubigeo": "150101",
        "departamento": "LIMA",
        "provincia": "LIMA",
        "distrito": "LIMA",
        "activo_habido": true,
        "consulta": {
            "proveedor": "decolecta",
            "cache": true,
            "desactualizado": false,
            "consultado_en": "2026-10-31T09:20:00-05:00"
        }
    },
    "sunat": null,
    "errors": null
}
 

Request      

GET api/v1/lookup/ruc/{ruc}

Headers

Authorization        

Example: Bearer sk_beta_xxx

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

ruc   string     

The ruc. Example: /^^^///

Consultar DNI: nombres y apellidos. Caché 30 días.

requires authentication

Example request:
curl --request GET \
    --get "https://djmplatform.com/api/v1/lookup/dni//^^^///" \
    --header "Authorization: Bearer sk_beta_xxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://djmplatform.com/api/v1/lookup/dni//^^^///"
);

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


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://djmplatform.com/api/v1/lookup/dni//^^^///';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer sk_beta_xxx',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

GET api/v1/lookup/dni/{dni}

Headers

Authorization        

Example: Bearer sk_beta_xxx

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dni   string     

The dni. Example: /^^^///

Catálogos

Ítems vigentes de un catálogo SUNAT (ej. 06, 07, 09).

requires authentication

Example request:
curl --request GET \
    --get "https://djmplatform.com/api/v1/catalogs/architecto" \
    --header "Authorization: Bearer sk_beta_xxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://djmplatform.com/api/v1/catalogs/architecto"
);

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


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://djmplatform.com/api/v1/catalogs/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer sk_beta_xxx',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

GET api/v1/catalogs/{id}

Headers

Authorization        

Example: Bearer sk_beta_xxx

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the catalog. Example: architecto