Claim shift
PATCH {{baseUrl}}/shifts/claim
Claims an open shift. Source: models/shifts.ts claim().
Response fields:
status— aShiftResultStatusenum value:Success,Overlap(conflicts with another shift you hold —datawill contain the conflictingShift[]),InvalidBounds,NoUser,Unauthorized, orUnkownError(sic — real typo in the enum, not a doc error).shift— present onSuccess, the claimedShiftrow.
Request body
Section titled “Request body”{ "id": "<shift-id>", "user_id": "{{userId}}"}Examples
Section titled “Examples”curl --request PATCH 'https://api.firstdelivery.com/api/shifts/claim' \ --header 'Content-Type: application/json' \ --data '{ "id": "<shift-id>", "user_id": "{{userId}}"}'const response = await fetch("https://api.firstdelivery.com/api/shifts/claim", { "method": "PATCH", "headers": { "Content-Type": "application/json" }, "body": "{\n \"id\": \"<shift-id>\",\n \"user_id\": \"{{userId}}\"\n}"})const data = await response.json()import requests
response = requests.request( "PATCH", "https://api.firstdelivery.com/api/shifts/claim", headers={ 'Content-Type': 'application/json'}, data="{\n \"id\": \"<shift-id>\",\n \"user_id\": \"{{userId}}\"\n}",)response.raise_for_status()Saved responses
Section titled “Saved responses”{ "status": "Success", "shift": { "id": "<shift-id>", "user_id": "8e17d5db-da6e-453c-966f-bfc72c125094", "start": "2026-06-23T16:00:00.000Z", "stop": "2026-06-23T20:00:00.000Z", "retreat_point": "c1d2e3f4-1111-4a2b-9c3d-4e5f6a7b8c9d", "hourly_rate": 18, "length_hours": 4, "checked_in": null, "cash": false, "hotbag": false }}{ "status": "Overlap", "data": [ { "id": "<conflicting-shift-id>", "start": "2026-06-23T18:00:00.000Z", "stop": "2026-06-23T22:00:00.000Z" } ]}
