Skip to main content

Payslip PDF API

Summary

One native operation persists the structured payslip and renders PDF bytes in process.

Audience

Frontend and backend developers, QA and support engineers, architects, security reviewers, and implementation partners.

Reference Content

Authentication: bearer context is expected for business APIs; service-local enforcement Requires confirmation. Authorization: no endpoint-specific Payroll Service role policy is confirmed. Maturity: Direct / Shadow.

OperationMethod and public routePurposeAuthenticationTenant contextRequest typeResponse typeSuccessMaturitySource path
Generate/download payslip PDFGET /payroll/runs/{runId:guid}/details/{detailId:guid}/payslip/pdfReturn a generated PDF attachment.Bearer context expected; service-local enforcement Requires confirmationForwarded or explicit tenant context; exact missing-context mapping Requires confirmationRoute and query parametersPDF file (application/pdf)200Directmicroservices/src/payroll-service/Api/PayrollOutputEndpoints.cs

Generate/download payslip PDF

  • API family / maturity: Payslip PDF API; Direct
  • Authentication / authorization: Bearer context expected; service-local enforcement Requires confirmation. No endpoint-specific role policy is confirmed.
  • Tenant context: Forwarded or explicit tenant context; exact missing-context mapping Requires confirmation.
  • Route parameters: Required GUID runId, GUID detailId.
  • Query parameters: Optional tenantId.
  • Request body / type: None; Route and query parameters.
  • Validation: Only checks stated in the error mapping below are confirmed; model-binding failures are framework behavior and not specified as a stable contract.
  • Response body / type: PDF file (application/pdf).
  • Success / error responses: 200; 404 {message} for missing run/detail; 409 {message} unless run/detail are Frozen.
  • Business behavior: Return a generated PDF attachment.
  • State and input implications: Does not change run state; structured payslip persistence occurs before rendering. No input projection changes.
  • Audit and event implications: Persists payslip-generation audit. Stages a payslip-generated outbox event before PDF rendering.
  • Compatibility notes: Native Payroll contract.
  • Safe example: GET /payroll/runs/{runId:guid}/details/{detailId:guid}/payslip/pdf200 PDF attachment; missing detail → 404 {"message":"Payroll detail not found."}
  • Example error: {"message":"Request could not be completed."} (illustrative safe wording)

Family-level findings

Generation is in-process. No Document Service storage, document identifier, history API, or separate regeneration command exists. Access enforcement and compensation when rendering fails after structured persistence Require confirmation.

Source References

  • microservices/src/payroll-service/Api/PayrollOutputEndpoints.cs
  • microservices/src/payroll-service/Application/PayrollOutputsService.cs
  • microservices/src/payroll-service/Application/PayrollPdfRenderer.cs

See Also

Keywords

  • Payroll API
  • Payslip PDF API

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-15
  • Review cycle: Quarterly