GuíaEjemplosReferencia API
apisunat.netIngresar

Consultas SUNAT

  • POSTBuscar contribuyentes por DNI
  • POSTBuscar por nombres, apellidos o razón social
  • POSTConsultar ficha pública por RUC

Laboral

  • GETListar Trabajadores
  • POSTCrear Trabajadores
  • PUTEditar Trabajadores
  • GETListar Planillas
  • POSTCrear Planillas
  • PUTEditar Planillas
  • GETListar Honorarios
  • POSTCrear Honorarios
  • PUTEditar Honorarios
  • POSTCambiar estado de planilla
  • POSTRegistrar pago de honorarios
  • POSTAnular registro local de honorarios
  • GETRegímenes laborales

Cuenta

  • GETComprobar la clave
  • GETPlan y consumo del mes

Emisores

  • GETListar RUC
  • POSTRegistrar un RUC
  • GETConsultar un RUC
  • PATCHActivar o desactivar un RUC
  • PUTGuardar credenciales SUNAT
  • POSTValidar el RUC con SUNAT
  • POSTPasar el RUC a producción

Series y establecimientos

  • GETListar series
  • GETListar establecimientos
  • POSTCrear o actualizar un establecimiento

Utilidades

  • POSTCalcular totales e IGV
  • GETListar catálogos SUNAT
  • GETBuscar en el catálogo 25 (productos SUNAT)
  • GETConsultar un catálogo

Documentos

  • GETListar documentos
  • POSTEmitir factura, boleta, nota o retención
  • GETConsultar un documento
  • GETDescargar PDF, XML, ZIP o CDR
  • POSTReenviar a SUNAT
  • POSTConsultar el ticket en SUNAT
  • GETHistorial de correos
  • POSTEnviar por correo
  • POSTReintentar un correo

Anulaciones

  • POSTAnular documentos
  • GETConsultar una anulación

GRE

  • POSTEmitir una guía de remisión (GRE)
  • GETConsultar una guía

Recursos

  • GETEspecificación OpenAPI
  • GETColección Postman
  • GETResumen para asistentes de IA
POST/issuer/issuers/{ruc}/payroll/runs/{id}/status

Cambiar estado de planilla

Send request

Use the documented inputs to call this endpoint directly.

API serverbase URL
Bearer tokenBearerAuthoptional
Stored only in this browser for the BearerAuth security scheme and reused on every API page in this group.

Parameters

Values are applied to the request and the example on the right.

rucpath · stringrequired
idpath · string · uuidrequired

Request body

application/jsonrequired
datestringoptional
referencestringoptional
revisionnumberrequired
statusenumrequired

Values: "approved" · "paid" · "void"

Responses

200application/json

Correcto.

{
  "deductionCents": 1.5,
  "employerEssaludCents": 1.5,
  "grossCents": 1.5,
  "id": "",
  "lines": [
    {
      "afpDeductionCents": 1.5,
      "basePayCents": 1.5,
      "ctsCents": 1.5,
      "days": 1.5,
      "documentNumber": "string",
      "employeeId": "",
      "employeeName": "string",
      "employerContributionCents": 1.5,
      "employerEssaludCents": 1.5,
      "fifthCategoryCents": 1.5,
      "gratuityCents": 1.5,
      "grossCents": 1.5,
      "healthSystem": "essalud",
      "laborRegime": "general",
      "netCents": 1.5,
      "nonTaxableCents": 1.5,
      "otherDeductionCents": 1.5,
      "pensionCents": 1.5,
      "pensionSystem": "onp",
      "salaryCents": 1.5,
      "taxableCents": 1.5,
      "taxableExtraCents": 1.5,
      "vacationCents": 1.5
    }
  ],
  "minimumWageCents": 1.5,
  "netCents": 1.5,
  "paidAt": "string",
  "paymentReference": "string",
  "period": "string",
  "revision": 1.5,
  "status": "draft"
}
deductionCentsnumberrequired
employerEssaludCentsnumberrequired
grossCentsnumberrequired
idstringrequired
linesarray<>required
minimumWageCentsnumberrequired
netCentsnumberrequired
paidAtobjectrequired
paymentReferencestringrequired
periodstringrequired
revisionnumberrequired
statusenumrequired

Values: "draft" · "approved" · "paid" · "void"

400application/json

VALIDATION_ERROR: El cuerpo, los parámetros o una regla del comprobante no son válidos. fields indica el campo.

{
  "error": {
    "code": "string",
    "fields": {},
    "message": "string",
    "requestId": "",
    "retryable": true
  }
}
errorrequired
401application/json

UNAUTHENTICATED: Falta la clave API o no es válida.

{
  "error": {
    "code": "string",
    "fields": {},
    "message": "string",
    "requestId": "",
    "retryable": true
  }
}
errorrequired
402application/json

TRIAL_EXPIRED: La prueba gratuita venció.

{
  "error": {
    "code": "string",
    "fields": {},
    "message": "string",
    "requestId": "",
    "retryable": true
  }
}
errorrequired
403application/json

WORKSPACE_SUSPENDED: El workspace está suspendido.

{
  "error": {
    "code": "string",
    "fields": {},
    "message": "string",
    "requestId": "",
    "retryable": true
  }
}
errorrequired
429application/json

RATE_LIMITED: Se superó el límite de peticiones. Respeta el header Retry-After.

{
  "error": {
    "code": "string",
    "fields": {},
    "message": "string",
    "requestId": "",
    "retryable": true
  }
}
errorrequired
500application/json

INTERNAL_ERROR: Error interno. Reintenta y comparte el requestId con soporte.

{
  "error": {
    "code": "string",
    "fields": {},
    "message": "string",
    "requestId": "",
    "retryable": true
  }
}
errorrequired
Editar Honorarios< PreviousRegistrar pago de honorariosNext >

Powered by heyo

curl --request POST \
  'https://api.apisunat.net/api/v1/issuer/issuers/string/payroll/runs/{id}/status' \
  --header 'Content-Type: application/json' \
  --data '{
  "date": "string",
  "reference": "string",
  "revision": 1.5,
  "status": "approved"
}'
{
  "deductionCents": 1.5,
  "employerEssaludCents": 1.5,
  "grossCents": 1.5,
  "id": "",
  "lines": [
    {
      "afpDeductionCents": 1.5,
      "basePayCents": 1.5,
      "ctsCents": 1.5,
      "days": 1.5,
      "documentNumber": "string",
      "employeeId": "",
      "employeeName": "string",
      "employerContributionCents": 1.5,
      "employerEssaludCents": 1.5,
      "fifthCategoryCents": 1.5,
      "gratuityCents": 1.5,
      "grossCents": 1.5,
      "healthSystem": "essalud",
      "laborRegime": "general",
      "netCents": 1.5,
      "nonTaxableCents": 1.5,
      "otherDeductionCents": 1.5,
      "pensionCents": 1.5,
      "pensionSystem": "onp",
      "salaryCents": 1.5,
      "taxableCents": 1.5,
      "taxableExtraCents": 1.5,
      "vacationCents": 1.5
    }
  ],
  "minimumWageCents": 1.5,
  "netCents": 1.5,
  "paidAt": "string",
  "paymentReference": "string",
  "period": "string",
  "revision": 1.5,
  "status": "draft"
}