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
- Regístrate en el panel y verifica tu correo.
- 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. - Certificado: sube tu
.pfx/.p12con su contraseña (en BETA sirve un certificado de pruebas). Se guarda cifrado. - Series: crea
F001(facturas) yB001(boletas) en BETA. - Tokens API: genera un token BETA (
sk_beta_…). Se muestra una sola vez. - 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
- Respuesta estándar:
{ "success": bool, "data": {…}, "sunat": { "code", "description", "notes" } | null, "errors": { "code", "message", "fields" } | null }. - Montos como string decimal (
"118.00"). Cada ítem llevavalor_unitario(sin IGV) oprecio_unitario(con IGV). - Idempotencia: envía
Idempotency-Keyen cada emisión. Repetirla con el mismo cuerpo devuelve el mismo comprobante (headerIdempotent-Replayed: true); con otro cuerpo,409 IDEMPOTENCY_CONFLICT. - Estados → HTTP: aceptado/observado
200· enviado/pendiente202· rechazado422 SUNAT_REJECTED. - Códigos SUNAT (
sunat.code):0aceptado ·0100–1999excepción (se reintenta solo) ·2000–3999rechazo (emite con nuevo correlativo) ·4000+observación. - Asíncronos (resúmenes, bajas, guías): reciben un
ticket; consultaGET /api/v1/status/{ticket}o usa webhooks (firma HMAC-SHA256). - Límites: solicitudes por minuto y cuotas según tu plan (
GET /api/v1/me); al exceder,429 RATE_LIMITEDo429 QUOTA_EXCEEDED. - Descargas: las URL de
data.urlsestán firmadas (24 h) y no requieren token: puedes compartirlas con tu cliente.
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));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
]
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.