Compatibility Salary Components API
Summary
Four compatibility operations list, create, update, and soft-delete salary components.
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: Compatibility / Transitional.
| Operation | Method and public route | Purpose | Authentication | Tenant context | Request type | Response type | Success | Maturity | Source path |
|---|---|---|---|---|---|---|---|---|---|
| List active components | GET /api/salary-components | List active tenant components. | Bearer expected by the compatibility contract; downstream enforcement Requires confirmation | Forwarded tenant context expected; no tenant query parameter | None | Anonymous component array | 200 | Compatibility | microservices/src/payroll-service/Api/PayrollCompatEndpoints.cs |
| Create component | POST /api/salary-components | Create an active salary component. | Bearer expected by the compatibility contract; downstream enforcement Requires confirmation | Forwarded tenant context expected; no tenant query parameter | SalaryComponentCompatRequest | Anonymous component object | 200 | Compatibility | microservices/src/payroll-service/Api/PayrollCompatEndpoints.cs |
| Update component | PUT /api/salary-components/{id:guid} | Replace mutable compatibility component metadata. | Bearer expected by the compatibility contract; downstream enforcement Requires confirmation | Forwarded tenant context expected; no tenant query parameter | Route parameter and SalaryComponentCompatRequest | Anonymous component object | 200 | Compatibility | microservices/src/payroll-service/Api/PayrollCompatEndpoints.cs |
| Deactivate component | DELETE /api/salary-components/{id:guid} | Soft-delete by marking the component inactive. | Bearer expected by the compatibility contract; downstream enforcement Requires confirmation | Forwarded tenant context expected; no tenant query parameter | Route parameter | Raw success string | 200 | Compatibility | microservices/src/payroll-service/Api/PayrollCompatEndpoints.cs |
List active components
- API family / maturity: Compatibility Salary Components API; Compatibility
- Authentication / authorization: Bearer expected by the compatibility contract; downstream enforcement Requires confirmation. No endpoint-specific role policy is confirmed.
- Tenant context: Forwarded tenant context expected; no tenant query parameter.
- Route parameters: None.
- Query parameters: None.
- Request body / type: None; None.
- 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: Anonymous component array.
- Success / error responses: 200; No endpoint-specific error response is mapped.
- Business behavior: List active tenant components.
- State and input implications: Read-only. No input projection changes.
- Audit and event implications: No audit side effect confirmed. No event produced.
- Compatibility notes: Monolith-shaped compatibility contract.
- Safe example:
GET /api/salary-components→200 [] - Example error: No stable endpoint-specific error example is confirmed.
Create component
- API family / maturity: Compatibility Salary Components API; Compatibility
- Authentication / authorization: Bearer expected by the compatibility contract; downstream enforcement Requires confirmation. No endpoint-specific role policy is confirmed.
- Tenant context: Forwarded tenant context expected; no tenant query parameter.
- Route parameters: None.
- Query parameters: None.
- Request body / type:
name,category,basis,defaultAmount,isRecurring,isActive;SalaryComponentCompatRequest. - 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: Anonymous component object.
- Success / error responses: 200; 400 raw text when name is missing.
- Business behavior: Create an active salary component.
- State and input implications: Creates active component; supplied create
isActiveis not used. No input projection changes. - Audit and event implications: No audit side effect confirmed. No event produced.
- Compatibility notes: Monolith-shaped compatibility contract.
- Safe example: Illustrative body:
{ "name":"Example Component", "category":"Earning", "basis":"Fixed", "defaultAmount":"<financial value>", "isRecurring":true, "isActive":true }→200metadata - Example error:
"Request could not be completed."(illustrative raw compatibility wording)
Update component
- API family / maturity: Compatibility Salary Components API; Compatibility
- Authentication / authorization: Bearer expected by the compatibility contract; downstream enforcement Requires confirmation. No endpoint-specific role policy is confirmed.
- Tenant context: Forwarded tenant context expected; no tenant query parameter.
- Route parameters: Required GUID
componentId. - Query parameters: None.
- Request body / type:
SalaryComponentCompatRequestfields; Route parameter andSalaryComponentCompatRequest. - 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: Anonymous component object.
- Success / error responses: 200; 404 empty response when missing; no handled 400 mapping.
- Business behavior: Replace mutable compatibility component metadata.
- State and input implications: Updates name/category/basis/default metadata, recurrence and active state. No input projection changes.
- Audit and event implications: No audit side effect confirmed. No event produced.
- Compatibility notes: Monolith-shaped compatibility contract.
- Safe example:
PUT /api/salary-components/{id:guid}with illustrative component body →200; missing →404 - Example error:
"Request could not be completed."(illustrative raw compatibility wording)
Deactivate component
- API family / maturity: Compatibility Salary Components API; Compatibility
- Authentication / authorization: Bearer expected by the compatibility contract; downstream enforcement Requires confirmation. No endpoint-specific role policy is confirmed.
- Tenant context: Forwarded tenant context expected; no tenant query parameter.
- Route parameters: Required GUID
componentId. - Query parameters: None.
- Request body / type: None; Route parameter.
- 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: Raw success string.
- Success / error responses: 200; 404 empty response when missing.
- Business behavior: Soft-delete by marking the component inactive.
- State and input implications: Sets active state false; record is retained. No input projection changes.
- Audit and event implications: No audit side effect confirmed. No event produced.
- Compatibility notes: Monolith-shaped compatibility contract.
- Safe example:
DELETE /api/salary-components/{id:guid}→200raw text; missing →404 - Example error:
"Request could not be completed."(illustrative raw compatibility wording)
Family-level findings
The list returns active components only. No retrieve-by-id, assignment, effectivity-management, formula-expression, approval, or version endpoint exists. Category and basis values are not validated against a closed HTTP vocabulary. Customer-specific component values are excluded.
Source References
microservices/src/payroll-service/Api/PayrollCompatEndpoints.csmicroservices/src/payroll-service/Application/PayrollCompatService.csControllers/SalaryComponentsController.cs
Related Articles
See Also
Keywords
- Payroll API
- Compatibility Salary Components API
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly