Aller au contenu

Enregistrer une entrée dans la main courante (append-only)

POST
/v1/establishments/{establishmentId}/main-courante
curl --request POST \
--url https://example.com/v1/establishments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/main-courante \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "shiftLabel": "Matin J. Dupont", "logKind": "incident", "body": "example", "relatedInspectionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "relatedWorkOrderId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "relatedStayId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "correctsEntryId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'
establishmentId
required
string format: uuid
Media type application/json
object
shiftLabel
required
string
<= 64 characters
Example
Matin J. Dupont
logKind
required
string
Allowed values: incident handover observation action shift_summary
body
required
string
<= 8000 characters
relatedInspectionId
string format: uuid
nullable
relatedWorkOrderId
string format: uuid
nullable
relatedStayId
string format: uuid
nullable
correctsEntryId
string format: uuid
nullable

Entrée enregistrée

Media type application/json
object
data
required
object
entryId
required
string format: uuid
createdAt
required
string format: date-time
Example generated
{
"data": {
"entryId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"createdAt": "2026-04-15T12:00:00Z"
}
}

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
}