47 lines
3.4 KiB
YAML
47 lines
3.4 KiB
YAML
get:
|
|
operationId: GetMyInvitation
|
|
summary: Open the terms of an invitation addressed to the current candidate.
|
|
description: |-
|
|
Requires the session cookie of a candidate account. The candidate comes from the session; the invitation must be addressed to this candidate.
|
|
|
|
Returns the organization, the current terms version with the full terms, the state, and the deadline. While an acceptance is possible (`delivered` or `viewed` before the deadline), `contact_consent` holds the published text of the consent C4 for this organization and the kinds of contact that the profile holds, with nothing preselected; otherwise it is null. It is null as well when the profile holds no contact: a grant must cover at least one field, so the client asks the candidate to add a contact to the profile before accepting. After an answer the response holds the candidate's own decline or the contact grant that the acceptance created, with the selected kinds, its status, and whether the organization can read it now (`readable`, with `blocked_by` `visibility` when the profile is not published or is hidden from the organization), never contact values. The response never carries the candidate's handle, the need of the organization, the salary indicator of the organization, or any contact or salary minimum of the candidate.
|
|
|
|
Reading has no side effect on the invitation: it never records a view. The client records that the candidate opened the terms with ViewMyInvitation, an explicit command, so a prefetch, a retry, or a cache refresh never changes the state that the organization sees. The only change a read can cause is the due expiry: a read at the deadline or later first applies the server transition to `expired` with `invitation_timeout`, which would happen without the read as well, and the response shows it. Reading earlier terms versions is planned as a separate operation.
|
|
|
|
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden; a draft, an invitation addressed to another candidate, and an unknown identifier all answer 404 not_found, so identifiers cannot be enumerated. An `invitation_id` that is not a UUID answers 400 validation_failed with the path pointer.
|
|
security:
|
|
- sessionCookie: []
|
|
tags:
|
|
- invitation
|
|
parameters:
|
|
- $ref: ../components/parameters.yml#/MyInvitationId
|
|
responses:
|
|
"200":
|
|
description: The invitation in its current state.
|
|
headers:
|
|
Cache-Control:
|
|
$ref: ../components/headers.yml#/CacheControlNoStore
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yml#/CandidateInvitation
|
|
examples:
|
|
delivered:
|
|
$ref: ../components/examples.yml#/CandidateInvitationDelivered
|
|
viewed:
|
|
$ref: ../components/examples.yml#/CandidateInvitationViewed
|
|
accepted:
|
|
$ref: ../components/examples.yml#/CandidateInvitationAccepted
|
|
declined:
|
|
$ref: ../components/examples.yml#/CandidateInvitationDeclined
|
|
"400":
|
|
$ref: ../components/responses.yml#/ValidationFailed
|
|
"401":
|
|
$ref: ../components/responses.yml#/Unauthenticated
|
|
"403":
|
|
$ref: ../components/responses.yml#/Forbidden
|
|
"404":
|
|
$ref: ../components/responses.yml#/NotFound
|
|
default:
|
|
$ref: ../components/responses.yml#/Problem
|