Alerts - SocialGouv/code-du-travail-backoffice GitHub Wiki

Description

The agreements represent the labor agreements.

List alerts

GET /alerts

Response

Array<{
  answer_id: UUID
  dila_cid: string
  dila_container_id: string
  dila_id: string
  is_done: boolean
  value: {
    etat: {
      current: string
      previous: string
    }
    texts: Array<{
      current: string
      previous: string
    }>
  }
  version: string
}>

Create multiple alerts

POST /alerts

Request

You must to send the request with the header Prefer: merge-duplicates in order to avoid any issue with the batch upsert.

All the fields are mandatory:

Array<{
  answer_id: UUID
  dila_cid: string
  dila_container_id: string
  dila_id: string
  value: {
    etat: {
      current: string
      previous: string
    }
    texts: Array<{
      current: string
      previous: string
    }>
  }
  version: string
}>

Response

On success, you should receive a 201 header.