Create a work details
Módulo Identity
POST/work-detailsworkDetails.create
The caller's own work details (Section 4.5.6 item 10): uniform sizes, dietary and accessibility needs and the travel profile. Read and written only by the person; an engaging org sees a category only while the person shares it with that engagement. The passport number is Restricted and encrypted: it is written here, always read masked, and shown only through the logged revealPassport action. One live row per person (409 on a second). Creates a work details. Requires `Idempotency-Key`; a replay returns the original response. The organization is derived from the credential or the parent row, never from the body.
- 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, 409, 422, 429. Los errores son detalles de problema RFC 9457.
Cuerpo de la solicitud: WorkDetailsCreate
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| shirt_size | GarmentLetterSize | null | No | |
| jacket_size | GarmentLetterSize | null | No | |
| pants_size | string | null | No | Pants size as the person writes it.Restricciones: length 1 to 20 |
| shoe_size | string | null | No | Shoe size with its system.Restricciones: length 1 to 20 |
| glove_size | GarmentLetterSize | null | No | |
| hat_size | string | null | No | Hat size as the person writes it.Restricciones: length 1 to 20 |
| uniform_notes | string | null | No | Anything else about fit.Restricciones: length 1 to 500 |
| dietary_needs | array of DietaryNeed | No | Dietary needs, each once, in enum order. |
| allergies | string | null | No | Allergies in the person's words, with how severe.Restricciones: length 1 to 500 |
| dietary_notes | string | null | No | Other dietary notes.Restricciones: length 1 to 500 |
| accessibility_needs | array of AccessibilityNeed | No | Accessibility needs, each once, in enum order. |
| accessibility_notes | string | null | No | Accessibility needs in the person's words.Restricciones: length 1 to 1000 |
| seat_preference | SeatPreference | null | No | |
| meal_preference | string | null | No | Preferred in-flight meal.Restricciones: length 1 to 100 |
| home_airport | string | null | No | IATA airport code.Restricciones: pattern ^[A-Z]{3}$ |
| passport_number | string | null | No | Passport number, write-only: letters and digits are kept and encrypted. Send null to clear it.Restricciones: length 5 to 30 |
| passport_issuing_country | string | null | No | Country that issued the passport.Restricciones: pattern ^[A-Z]{2}$ |
| passport_expires_on | string (date) | null | No | Day the passport expires. |
| passport_name | string | null | No | Name exactly as printed in the passport.Restricciones: length 1 to 200 |
{
"pants_size": "32x32",
"shoe_size": "US 10.5",
"hat_size": "7 1/4",
"uniform_notes": "Prefers a relaxed cut.",
"dietary_needs": [
"Vegan"
],
"allergies": "Peanuts, severe",
"dietary_notes": "No pork.",
"accessibility_needs": [
"Seating"
],
"accessibility_notes": "Needs a seat near the stage door.",
"meal_preference": "Vegetarian (VGML)",
"home_airport": "MIA",
"passport_number": "YA0000TEST",
"passport_issuing_country": "US",
"passport_expires_on": "2026-10-08",
"passport_name": "IVY MARCHETTI"
}Respuesta 201: WorkDetails
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| id | string (uuid) | Sí | Identifier of the work details. |
| created_at | string (date-time) | Sí | When the row was created. |
| updated_at | string (date-time) | Sí | When the row was last updated. |
| person_id | string (uuid) | Sí | Identifier of the person the work details belong to; always the caller. |
| shirt_size | GarmentLetterSize | null | Sí | |
| jacket_size | GarmentLetterSize | null | Sí | |
| pants_size | string | null | Sí | Pants size as the person writes it.Restricciones: length 1 to 20 |
| shoe_size | string | null | Sí | Shoe size with its system.Restricciones: length 1 to 20 |
| glove_size | GarmentLetterSize | null | Sí | |
| hat_size | string | null | Sí | Hat size as the person writes it.Restricciones: length 1 to 20 |
| uniform_notes | string | null | Sí | Anything else about fit.Restricciones: length 1 to 500 |
| dietary_needs | array of DietaryNeed | Sí | Dietary needs, each once, in enum order. |
| allergies | string | null | Sí | Allergies in the person's words, with how severe.Restricciones: length 1 to 500 |
| dietary_notes | string | null | Sí | Other dietary notes.Restricciones: length 1 to 500 |
| accessibility_needs | array of AccessibilityNeed | Sí | Accessibility needs, each once, in enum order. |
| accessibility_notes | string | null | Sí | Accessibility needs in the person's words.Restricciones: length 1 to 1000 |
| seat_preference | SeatPreference | null | Sí | |
| meal_preference | string | null | Sí | Preferred in-flight meal.Restricciones: length 1 to 100 |
| home_airport | string | null | Sí | IATA airport code.Restricciones: pattern ^[A-Z]{3}$ |
| passport_number | string | Masked | null | Sí | |
| passport_number_last4 | string | null | Sí | Last four characters of the passport number.Restricciones: pattern ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$ |
| passport_issuing_country | string | null | Sí | Country that issued the passport.Restricciones: pattern ^[A-Z]{2}$ |
| passport_expires_on | string (date) | null | Sí | Day the passport expires. |
| passport_name | string | null | Sí | Name exactly as printed in the passport.Restricciones: length 1 to 200 |
{
"id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"created_at": "2026-10-08T14:30:00Z",
"updated_at": "2026-10-08T14:30:00Z",
"person_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"shirt_size": "XXS",
"jacket_size": "XXS",
"pants_size": "32x32",
"shoe_size": "US 10.5",
"glove_size": "XXS",
"hat_size": "7 1/4",
"uniform_notes": "Prefers a relaxed cut.",
"dietary_needs": [
"Vegan"
],
"allergies": "Peanuts, severe",
"dietary_notes": "No pork.",
"accessibility_needs": [
"Seating"
],
"accessibility_notes": "Needs a seat near the stage door.",
"seat_preference": "Window",
"meal_preference": "Vegetarian (VGML)",
"home_airport": "MIA",
"passport_number": "YA0000TEST",
"passport_number_last4": "TEST",
"passport_issuing_country": "US",
"passport_expires_on": "2026-10-08",
"passport_name": "IVY MARCHETTI"
}Ejemplos de código
curl -X POST "$XOS_BASE_URL/work-details" \
-H "Authorization: Bearer $XOS_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"pants_size":"32x32","shoe_size":"US 10.5","hat_size":"7 1/4","uniform_notes":"Prefers a relaxed cut.","dietary_needs":["Vegan"],"allergies":"Peanuts, severe","dietary_notes":"No pork.","accessibility_needs":["Seating"],"accessibility_notes":"Needs a seat near the stage door.","meal_preference":"Vegetarian (VGML)","home_airport":"MIA","passport_number":"YA0000TEST","passport_issuing_country":"US","passport_expires_on":"2026-10-08","passport_name":"IVY MARCHETTI"}'const { data } = await xos.workDetails.create({
"pants_size": "32x32",
"shoe_size": "US 10.5",
"hat_size": "7 1/4",
"uniform_notes": "Prefers a relaxed cut.",
"dietary_needs": [
"Vegan"
],
"allergies": "Peanuts, severe",
"dietary_notes": "No pork.",
"accessibility_needs": [
"Seating"
],
"accessibility_notes": "Needs a seat near the stage door.",
"meal_preference": "Vegetarian (VGML)",
"home_airport": "MIA",
"passport_number": "YA0000TEST",
"passport_issuing_country": "US",
"passport_expires_on": "2026-10-08",
"passport_name": "IVY MARCHETTI"
});response = xos.work_details.create({"pants_size": "32x32", "shoe_size": "US 10.5", "hat_size": "7 1/4", "uniform_notes": "Prefers a relaxed cut.", "dietary_needs": ["Vegan"], "allergies": "Peanuts, severe", "dietary_notes": "No pork.", "accessibility_needs": ["Seating"], "accessibility_notes": "Needs a seat near the stage door.", "meal_preference": "Vegetarian (VGML)", "home_airport": "MIA", "passport_number": "YA0000TEST", "passport_issuing_country": "US", "passport_expires_on": "2026-10-08", "passport_name": "IVY MARCHETTI"})xos work-details create --data '{"pants_size":"32x32","shoe_size":"US 10.5","hat_size":"7 1/4","uniform_notes":"Prefers a relaxed cut.","dietary_needs":["Vegan"],"allergies":"Peanuts, severe","dietary_notes":"No pork.","accessibility_needs":["Seating"],"accessibility_notes":"Needs a seat near the stage door.","meal_preference":"Vegetarian (VGML)","home_airport":"MIA","passport_number":"YA0000TEST","passport_issuing_country":"US","passport_expires_on":"2026-10-08","passport_name":"IVY MARCHETTI"}'