Evaluate Shift Claims

Asks what the scheduling rules say about a claim, without writing anything. A proposal item gives an employeeId and a shiftId and asks what happens if the employee took the shift, and a reference item gives a shiftClaimId and asks whether that pending claim could be approved. Each item names the actions to decide, and gets one evaluation per action, evaluated with the shift's published times and the employee's published commitments. A reference is evaluated for its claimant and shift as they are now. The operation writes nothing and reserves nothing. A result never authorizes a write: claiming and approving evaluate again when they commit. An employee is evaluated for the shifts GET /api/v1/scheduling/open-shifts would list for them, so a shift that is not open to the employee, or a projected occurrence that has no row yet, fails its item with invalid_shift_id. The one exception is a shift starting on a day the employee has no active employment status: the list leaves it out, and this operation evaluates it and blocks it with EMPLOYEE_NOT_ACTIVE, or with RESTRICTED_REASON when the caller may not see the employee's employment status. A reference is accepted for exactly the claims GET /api/v1/scheduling/shift-claims would show the caller. An employee, shift or claim that does not exist and one the caller may not see fail identically. A blocked outcome is shown to the claimant and the approver alike, and findings and coverage a caller may not see are withheld. Returns 200 when every item was evaluated and 207 when any item failed, including when every item did. A request holds at most 100 items, and proposals and references may be mixed. Evaluating fails with open_shifts_disabled while Open Shifts is off.

OAuth Scopes: scheduling:shifts

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

The shift claims to evaluate. Every problem that can be found from the request alone fails the whole request with no results: a malformed body, no items or too many, a duplicate or missing ref, an item with both forms or neither, a proposal missing employeeId or shiftId, an item missing actions, or an action the item's form does not support.

items
array of objects
required
length between 1 and 100

The items to evaluate. At most 100, the same cap as the page size of the open-shifts and shift-claims lists.

items*

One claim to evaluate, in one of two forms. A reference gives a shiftClaimId and asks whether that pending claim could be approved. A proposal gives an employeeId and a shiftId and asks what the rules say if the employee took the shift. An item never has both forms. An item is an independent alternative and never sees the other items.

string
required

Your identifier for this item, unique within the request. The response echoes it on the item's result or error.

Reference form: the existing claim to evaluate for approval, at its claimant and shift as they are now. Exclusive with employeeId and shiftId. A claim that does not exist and one the caller may not see both fail the item with invalid_shift_claim_id, and a claim that is no longer pending fails it with shift_claim_not_pending.

Proposal form: the employee who would claim the shift. Required with shiftId, and exclusive with shiftClaimId.

Proposal form: the shift they would claim. Required with employeeId, and exclusive with shiftClaimId. A recurring occurrence has a composite ID,

actions
array of strings
required
length ≥ 1

The actions to decide. Each action gets its own evaluation in the result. A reference item takes exactly APPROVE_SHIFT_CLAIM, and a proposal item takes exactly CLAIM_SHIFT.

actions*
Allowed:
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json