Skip to content

payPeriods

Crew module · 5 operations

List pay period rows

GET/pay-periods

A pay period. A posted pay period cannot reopen. Returns a cursor page of pay period rows the caller may see. The default order is `created_at` ascending. Supports sparse fieldsets and the filter grammar.

Create a pay period

POST/pay-periods

A pay period. A posted pay period cannot reopen. Creates a pay period. Requires `Idempotency-Key`; a replay returns the original response. The organization is derived from the credential or the parent row, never from the body.

Get a pay period

GET/pay-periods/{id}

A pay period. A posted pay period cannot reopen. Returns one pay period with its `ETag`. A pay period the caller may not see returns 404.

Update a pay period

PATCH/pay-periods/{id}

A pay period. A posted pay period cannot reopen. Updates the fields sent; omitted fields are unchanged. Requires `If-Match` with the current `ETag`: a stale tag returns 412 and a missing tag returns 428.

Transition the pay period state

POST/pay-periods/{id}/transitions

Moves the pay period lifecycle to another state through its transition RPC, which writes the transition ledger. Uses compare-and-set on `expected_state`; a disallowed transition returns a 422 refusal. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.