opportunities
Opportunities module · 6 operations
List opportunity rows
GET/opportunities
An opportunity published from an approved requisition. Without posted compensation it shows Rate on Request, never zero. Returns a cursor page of opportunity rows the caller may see. The default order is `created_at` ascending. Supports sparse fieldsets and the filter grammar.
Create an opportunity
POST/opportunities
An opportunity published from an approved requisition. Without posted compensation it shows Rate on Request, never zero. Creates an opportunity. 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 an opportunity
GET/opportunities/{id}
An opportunity published from an approved requisition. Without posted compensation it shows Rate on Request, never zero. Returns one opportunity with its `ETag`. A opportunity the caller may not see returns 404.
Update an opportunity
PATCH/opportunities/{id}
An opportunity published from an approved requisition. Without posted compensation it shows Rate on Request, never zero. 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.
Delete an opportunity
DELETE/opportunities/{id}
An opportunity published from an approved requisition. Without posted compensation it shows Rate on Request, never zero. Soft-deletes the opportunity: it moves to Trash and can be restored for its table's retention period.
Transition the opportunity state
POST/opportunities/{id}/transitions
Moves the opportunity state machine through its transition RPC, which writes its ledger. Publishing applies spend authority and refuses a posting without a pay range where the jurisdiction requires one. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.