Créer une tâche gouvernante
POST
/v1/housekeeping/tasks
const url = 'https://example.com/v1/housekeeping/tasks';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"establishmentId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","unitId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","date":"2026-07-01","taskKind":"checkout_clean","priority":"p1_departure","estimatedMinutes":1,"requiredSkill":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/housekeeping/tasks \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "establishmentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "unitId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "date": "2026-07-01", "taskKind": "checkout_clean", "priority": "p1_departure", "estimatedMinutes": 1, "requiredSkill": "example" }'Authorizations
Section intitulée « Authorizations »Request Body required
Section intitulée « Request Body required » Media type application/json
object
establishmentId
required
string format: uuid
unitId
required
string format: uuid
date
required
string format: date
Example
2026-07-01 taskKind
required
string
priority
required
string
estimatedMinutes
integer
requiredSkill
string
Responses
Section intitulée « Responses »Tâche créée
Media type application/json
object
data
required
object
taskId
required
string format: uuid
created
required
boolean
Example generated
{ "data": { "taskId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "created": true }}Corps invalide
Media type application/json
object
code
required
Code machine de l’erreur
string
message
required
Message lisible
string
origin
Origine domaine de l’erreur (optionnel)
object
boundedContext
string
module
string
status
required
integer
traceId
required
Identifiant de corrélation pour le support
string
Example
{ "code": "RESERVATION_NOT_FOUND", "message": "Réservation introuvable", "status": 404}Non authentifié
Media type application/json
object
code
required
Code machine de l’erreur
string
message
required
Message lisible
string
origin
Origine domaine de l’erreur (optionnel)
object
boundedContext
string
module
string
status
required
integer
traceId
required
Identifiant de corrélation pour le support
string
Example
{ "code": "RESERVATION_NOT_FOUND", "message": "Réservation introuvable", "status": 404}Permission refusée
Media type application/json
object
code
required
Code machine de l’erreur
string
message
required
Message lisible
string
origin
Origine domaine de l’erreur (optionnel)
object
boundedContext
string
module
string
status
required
integer
traceId
required
Identifiant de corrélation pour le support
string
Example
{ "code": "RESERVATION_NOT_FOUND", "message": "Réservation introuvable", "status": 404}