Reveal the caller's passport number
Módulo Identity
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`.
- Requiere la capacidad me.work_details.write.
- Alcances de OAuth: me.
- Envía el encabezado Idempotency-Key. Una repetición con la misma clave devuelve la respuesta original.
- Estados de error: 400, 401, 404, 409, 422, 429. Los errores son detalles de problema RFC 9457.
Parámetros de ruta y de consulta
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| id | string (uuid) | Sí | Identifier of the work details. |
Respuesta 200: PassportReveal
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| passport_number | string | Sí | The passport number in plain text. |
{
"passport_number": "YA0000TEST"
}Ejemplos de código
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