Reveal the caller's passport number
Identity module
POST/work-details/{id}/reveal-passportworkDetails.revealPassport
Returns the caller's own passport number in plain text through `app.reveal_my_passport_number`. Every reveal is written to the person's access log. 422 passport_number_missing when none is recorded. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.
- Requires the capability me.work_details.write.
- OAuth scopes: me.
- Send an Idempotency-Key header. A replay with the same key returns the original response.
- Error statuses: 400, 401, 404, 409, 422, 429. Errors are RFC 9457 problem details.
Path and query parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | string (uuid) | Yes | Identifier of the work details. |
Response 200: PassportReveal
| Field | Type | Required | Description |
|---|---|---|---|
| passport_number | string | Yes | The passport number in plain text. |
{
"passport_number": "YA0000TEST"
}Code samples
curl -X POST "$XOS_BASE_URL/work-details/0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f/reveal-passport" \
-H "Authorization: Bearer $XOS_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"const { data } = await xos.workDetails.revealPassport("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f");response = xos.work_details.reveal_passport("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f")xos work-details reveal-passport 0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f