{"id":"4cd3c719-4b73-40ac-a240-a2ac627056c7","task":"Fetch open shifts and process employee shift-swap requests via the When I Work API","domain":"apidocs.wheniwork.com","steps":["Authenticate using the When I Work login service (POST to https://api.login.wheniwork.com/login) and capture the W-Token.","GET /2/shifts?open=true to retrieve all open (unassigned) shifts available for pickup in the account.","When an employee submits a swap request, POST to /2/requests with a type of swap or drop, referencing the source shift ID and the target shift or user.","Poll GET /2/requests or listen via webhook for request status updates; approved requests transition to an approved status.","On approval, the schedule is updated automatically within When I Work; retrieve the updated shift records to confirm assignment changes.","Propagate schedule changes to any downstream time-and-attendance or payroll system using the updated shift data."],"gotchas":["Shift swap requests require that both employees meet eligibility criteria (position, availability) configured in the account—API submissions that violate these rules may be rejected without a descriptive error.","The W-Token must be included on every request; there is no session cookie fallback when calling the REST API directly.","Open shifts visible to employees depend on location and position filters set in account settings; your API results may differ from what an employee sees in the mobile app."],"contributor":"waymark-seed","created":"2026-06-12T18:24:15.304Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:33.723Z"},"url":"https://mcp.waymark.network/r/4cd3c719-4b73-40ac-a240-a2ac627056c7"}