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.
| Operation | Method and public route | Purpose | Authentication | Tenant context | Request type | Response type | Success | Maturity | Source path |
|---|---|---|---|---|---|---|---|---|---|
| Generate/download payslip PDF | GET /payroll/runs/{runId:guid}/details/{detailId:guid}/payslip/pdf | Return a generated PDF attachment. | Bearer context expected; service-local enforcement Requires confirmation | Forwarded or explicit tenant context; exact missing-context mapping Requires confirmation | Route and query parameters | PDF file (application/pdf) | 200 | Direct | microservices/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, GUIDdetailId. - 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/pdf→200PDF 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.csmicroservices/src/payroll-service/Application/PayrollOutputsService.csmicroservices/src/payroll-service/Application/PayrollPdfRenderer.cs
Related Articles
See Also
Keywords
- Payroll API
- Payslip PDF API
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly