API Requirements
Required
Seamlr requires your scheduling system to expose REST endpoints for fetching shift data and syncing assignments.
Shift Operations
Section titled “Shift Operations”| Method | Endpoint | Description |
|---|---|---|
GET | /shifts/{id} | Fetch full shift details |
PUT | /shifts/{id} | Update shift (time, slots) |
DELETE | /shifts/{id} | Cancel/delete shift |
PUT | /shifts/{id}/assign/{candidateId} | Assign candidate to shift |
PUT | /shifts/{id}/unassign/{candidateId} | Remove candidate from shift |
Candidate Operations
Section titled “Candidate Operations”| Method | Endpoint | Description |
|---|---|---|
GET | /candidates | Search candidates by personal number or name |
POST | /candidates | Create or update candidate record |
Path-Based Routing
Section titled “Path-Based Routing”Recommended pattern:
/providers/{providerId}/shifts/{shiftId}Alternative (header-based):
X-Provider-Id: 550e8400-e29b-41d4-a716-446655440000Example: Get Shift
Section titled “Example: Get Shift”Request:
GET /providers/550e8400-e29b-41d4-a716-446655440000/shifts/6ba7b810-9dad-11d1-80b4-00c04fd430c8Authorization: Bearer {seamlr-access-token}Response:
{ "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8", "startTime": "2024-01-15T09:00:00Z", "endTime": "2024-01-15T17:00:00Z", "outletId": "6ba7b811-9dad-11d1-80b4-00c04fd430c8", "outletName": "Downtown Location", "roleId": "6ba7b812-9dad-11d1-80b4-00c04fd430c8", "roleName": "Server", "slots": 3, "assignedCandidates": [ { "candidateId": "6ba7b813-9dad-11d1-80b4-00c04fd430c8" } ]}Example: Assign Candidate
Section titled “Example: Assign Candidate”Request:
PUT /providers/{providerId}/shifts/{shiftId}/assign/{candidateId}Authorization: Bearer {seamlr-access-token}Response:
{ "success": true}