Payroll Timeline and Audit API
Summary
Two native queries expose run-level audit and lifecycle timeline evidence.
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 |
|---|---|---|---|---|---|---|---|---|---|
| Retrieve run audit | GET /payroll/runs/{id:guid}/audit | Retrieve run audit entries newest first. | Bearer context expected; service-local enforcement Requires confirmation | Forwarded or explicit tenant context; exact missing-context mapping Requires confirmation | Route and query parameters | PayrollAuditResponse[] | 200 | Direct | microservices/src/payroll-service/Api/PayrollRunEndpoints.cs |
| Retrieve run timeline | GET /payroll/runs/{id:guid}/timeline | Retrieve lifecycle timeline entries oldest first. | Bearer context expected; service-local enforcement Requires confirmation | Forwarded or explicit tenant context; exact missing-context mapping Requires confirmation | Route and query parameters | PayrollTimelineResponse[] | 200 | Direct | microservices/src/payroll-service/Api/PayrollRunEndpoints.cs |
Retrieve run audit
- API family / maturity: Payroll Timeline and Audit 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. - 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:
PayrollAuditResponse[]. - Success / error responses: 200; No endpoint-specific error response is mapped.
- Business behavior: Retrieve run audit entries newest first.
- State and input implications: Read-only. No input projection changes.
- Audit and event implications: No audit side effect confirmed. No event produced.
- Compatibility notes: Native Payroll contract.
- Safe example:
GET /payroll/runs/{id:guid}/audit→200 [] - Example error: No stable endpoint-specific error example is confirmed.
Retrieve run timeline
- API family / maturity: Payroll Timeline and Audit 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. - 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:
PayrollTimelineResponse[]. - Success / error responses: 200; No endpoint-specific error response is mapped.
- Business behavior: Retrieve lifecycle timeline entries oldest first.
- State and input implications: Read-only. No input projection changes.
- Audit and event implications: No audit side effect confirmed. No event produced.
- Compatibility notes: Native Payroll contract.
- Safe example:
GET /payroll/runs/{id:guid}/timeline→200 [] - Example error: No stable endpoint-specific error example is confirmed.
Family-level findings
Audit exposes identity, action, actor text, serialized details, and occurrence time. Timeline exposes identity, entry type, detail, actor, and occurrence time. Correlation is not part of these response DTOs. No employee timeline endpoint, paging, or filters exist. Empty arrays are returned when the run has no matching evidence.
Source References
microservices/src/payroll-service/Api/PayrollRunEndpoints.csmicroservices/src/payroll-service/Application/PayrollCalculationService.cs
Related Articles
See Also
Keywords
- Payroll API
- Payroll Timeline and Audit API
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly