Offer an unassigned shift
Offer an unassigned shift to one or more employees for their approval.
POST https://cotlet.dev/api/v1/quinyx/shifts/{shift_id}/offer
Works only on unassigned shifts in the published period and only if Offer shift is turned on in Account settings > Compliance settings. Each employee gets a Qmail. The first to accept is assigned the shift, and the others are told the offer is gone. If nobody accepts by the shift start, Quinyx denies the offer. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| shift_id string required | string | Id of an unassigned shift from list_shifts. |
| employee_ids array required | array | Employee ids from list_employees. |
| comment string | string | Why you picked them. The employees see it in their Qmail. |
Request
curl -X POST https://cotlet.dev/api/v1/quinyx/shifts/90518/offer \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"employee_ids":["3011","3027","3044"],"comment":"Open Friday opening shift after a sick call. First to accept gets it."}' result = client.call("quinyx", "offer_shift", {"shift_id":"90518","employee_ids":["3011","3027","3044"],"comment":"Open Friday opening shift after a sick call. First to accept gets it."}) const result = await cotlet.call('quinyx', 'offer_shift', {"shift_id":"90518","employee_ids":["3011","3027","3044"],"comment":"Open Friday opening shift after a sick call. First to accept gets it."}); cotlet call quinyx offer_shift --data '{"shift_id":"90518","employee_ids":["3011","3027","3044"],"comment":"Open Friday opening shift after a sick call. First to accept gets it."}' Example response
{
"offer_id": "5521",
"shift_id": "90518",
"status": "pending",
"offered_to": [
"Tom Becker",
"Maria Silva",
"Ana Lopez"
],
"comment": "Open Friday opening shift after a sick call. First to accept gets it."
}