v1

latestOpenAPI 3.0.3MIT2026-07-17162044.6 KB
Case

Batch upserts cases

post/cases/batchUpsert

Request body

Example request

{
  "cases": [
    {
      "location": {
        "country": "GB"
      },
      "travelHistory": {
        "travel": [
          {
            "location": {
              "country": "CR",
              "administrativeAreaLevel1": "Any province in Costa Rica",
              "administrativeAreaLevel2": "Any canton in Costa Rica",
              "administrativeAreaLevel3": "Any district in Costa Rica",
              "place": "Boston Children's Hospital",
              "name": "Lyon, Auvergne-Rhône-Alpes, France"
            }
          }
        ]
      },
      "vaccines": [
        {
          "name": "AstraZeneca",
          "batch": "PV12345"
        }
      ]
    }
  ]
}

Response

OK

phase'GEOCODE' | 'VALIDATE' | 'UPSERT' required

The last operation completed by the server

numCreatednumber required

The number of cases created by the request.

numUpdatednumber required

The number of cases modified by the request. Note that this only includes cases that are actually modified by the batch upsert. If a case is included in the batch upsert request, but contains no changes compared to the currently stored case, it won't be counted.

Example response

{
  "errors": [
    {
      "message": "Cannot parse age"
    }
  ]
}