Employee Initialization API Boundary
Summary
Extracted onboarding completion synchronously calls Employee Service to create an employee. A deterministic employee code and a follow-up search after a create conflict provide retry-oriented idempotence. The two outbound operations are listed in the endpoint catalog.
Audience
Integration developers, QA, support, security reviewers, and solution architects.
HTTP handoff
Recruitment constructs an employee create request from candidate and onboarding data, forwards explicit tenant context, and sends no user credential. Employee Service binds the request to its create command and returns a standard envelope with a created response. On conflict, Recruitment searches by deterministic code and uses the existing record when found.
Mapping boundary
Verified mapping includes employee code, candidate names, display name, contact data, joining date, employment type, and optional organization/manager identifiers available to the gateway request. Extracted onboarding currently passes no department or designation identifiers and does not translate its numeric manager reference into Employee Service's identifier type. Work location is unset.
Response handling
Recruitment reads the Employee Service envelope and stores the employee identifier plus a derived legacy numeric reference when possible. Non-conflict unsuccessful responses raise through the HTTP client. A successful response without usable employee data can produce a null result and downstream provisioning failure.
Security boundary
The Employee direct endpoint group has no required authorization metadata. Tenant context is an explicit forwarded request value. Network isolation and service authentication are therefore critical but not proven by the inspected API code.
Requires confirmation
- Workload authentication for service-to-service requests.
- Department, designation, manager, and location mapping ownership.
- Reconciliation after Employee success and Recruitment commit failure.
- Whether search-by-code can return an unintended first record if exact matching fails.
Source References
microservices/src/recruitment-service/Infrastructure/EmployeeServiceClient.csmicroservices/src/recruitment-service/Infrastructure/Gateways.csmicroservices/src/recruitment-service/Application/Commands/OnboardingCommands.csmicroservices/src/employee-service/Api/EmployeeDirectEndpoints.csmicroservices/src/employee-service/Application/Commands/EmployeeApplicationCommands.csmicroservices/src/employee-service/Application/Validators/EmployeeCommandValidators.cs
Related Articles
See Also
Keywords
- Employee initialization
- Conflict recovery
- Service-to-service API
Revision Information
- Status: Draft
- Last reviewed: 2026-07-20
- Review cycle: Quarterly