Enregistrer une entrée dans la main courante (append-only)
POST
/v1/establishments/{establishmentId}/main-courante
const url = 'https://example.com/v1/establishments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/main-courante';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"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"}'};
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/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" }'Authorizations
Section intitulée « Authorizations »Parameters
Section intitulée « Parameters »Path Parameters
Section intitulée « Path Parameters » establishmentId
required
string format: uuid
Request Body required
Section intitulée « Request Body required » Media type application/json
object
shiftLabel
required
string
Example
Matin J. Dupont logKind
required
string
body
required
string
relatedInspectionId
string format: uuid
relatedWorkOrderId
string format: uuid
relatedStayId
string format: uuid
correctsEntryId
string format: uuid
Responses
Section intitulée « Responses »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}