Skip to content

Data Flow

When a new shift is created in the provider system:

sequenceDiagram
    participant Provider
    participant Seamlr

    Provider->>Seamlr: Webhook: shift.create
    Note over Seamlr: Queue event
    Seamlr->>Provider: GET /shifts/{id}
    Provider->>Seamlr: Shift details
    Note over Seamlr: Create internal job
    Note over Seamlr: Match candidates
    Note over Seamlr: Notify candidates

When a candidate accepts a job in Seamlr:

sequenceDiagram
    participant Provider
    participant Seamlr

    Note over Seamlr: Candidate accepts job
    Seamlr->>Provider: GET /candidates?personalNumber=...
    Provider->>Seamlr: Candidate (or 404)
    opt If not found
        Seamlr->>Provider: POST /candidates
        Provider->>Seamlr: Created candidate
    end
    Seamlr->>Provider: PUT /shifts/{id}/assign/{candidateId}
    Provider->>Seamlr: Assignment confirmed

When shift details change in the provider system:

sequenceDiagram
    participant Provider
    participant Seamlr

    Provider->>Seamlr: Webhook: shift.update
    Note over Seamlr: Queue event
    Seamlr->>Provider: GET /shifts/{id}
    Provider->>Seamlr: Updated shift
    Note over Seamlr: Update internal job
    Note over Seamlr: Notify assigned candidates

When an employer cancels a job in Seamlr that originated from the provider:

sequenceDiagram
    participant Provider
    participant Seamlr

    Note over Seamlr: Employer cancels job
    Note over Seamlr: Record pending operation
    Seamlr->>Provider: DELETE /shifts/{id}
    Provider->>Seamlr: 204 No Content
    Provider-->>Seamlr: Webhook: shift.delete (echo)
    Note over Seamlr: Detect pending operation
    Note over Seamlr: Skip processing (not external)