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

write Confirm

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

Parameters: offer_shift
NameTypeDescription
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
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."}'
Python
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."})
Node.js
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."});
CLI
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

JSON

{
  "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."
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.