---
title: "Batch updates cases"
method: POST
path: "/cases/batchUpdate"
tags: ["Case"]
---

# Batch updates cases

`POST /cases/batchUpdate`

## Request body

- CaseArray
  - `cases` Case[], required
    - `caseReference` object
      - `sourceId` string — UUID of the source this case was extracted from
      - `sourceUrl` string — URL of the source this case was extracted from
      - `uploadIds` string[] — An array of UUIDs of uploads where this case was created or updated through bulk upload or automated ingestion.
      - `verificationStatus` 'UNVERIFIED' | 'VERIFIED' | 'EXCLUDED' — Whether the case document has been manually verified for correctness. For new cases, if this field isn't provided, a default value of UNVERIFIED will be used.
      - `additionalSources` object[] — List of additional URLs that described a case
        - `sourceUrl` string
    - `demographics` object
      - `gender` string
      - `ageRange` object — Age bracket, start is included, end is excluded if different than start. If no end is specified it means that the age bracket is from start and above.
        - `start` number
        - `end` number
      - `ethnicity` string — Social group that has a common national or cultural tradition.
      - `nationalities` string[]
      - `occupation` string
    - `location` Location — A geo location
      - `country` string — ISO-3166-2 code of a country
      - `administrativeAreaLevel1` string — First administrative subdivision of a country
      - `administrativeAreaLevel2` string — Second administrative subdivision of a country
      - `administrativeAreaLevel3` string — Third administrative subdivision of a country
      - `place` string — Name of the place this location refers to
      - `name` string — Full name of the location
      - `geoResolution` 'Point' | 'Admin3' | 'Admin2' | 'Admin1' | 'Country' — How granular the location is
      - `geometry` object
        - `latitude` number, required
        - `longitude` number, required
    - `events` object[] — An event with name "confirmed" is required.
      - `name` 'confirmed' | 'firstClinicalConsultation' | 'hospitalAdmission' | 'icuAdmission' | 'onsetSymptoms' | 'outcome' | 'selfIsolation'
      - `dateRange` DateRange
        - `start` union
          - string
          - object
          - number
        - `end` union
          - string
          - object
          - number
      - `value` string — For outcome event, value can be Death or Recovered. For icuAdmission and hospitalAdmission, value can be Yes or No. For confirmed event, the value can be the method of confirmation (i.e. "PCR test").
    - `symptoms` object — Symptoms that the patient had if any
      - `status` string
      - `values` string[]
    - `preexistingConditions` object — Any preexisting condition that the patient had
      - `hasPreexistingConditions` boolean
      - `values` string[]
    - `transmission` object — How this case got infected and by who if known
      - `routes` string[]
      - `places` string[]
      - `linkedCaseIds` string[]
    - `travelHistory` object — Travel history of the patient if known
      - `traveledPrior30Days` boolean
      - `travel` object[]
        - `dateRange` DateRange
          - `start` union
            - string
            - object
            - number
          - `end` union
            - string
            - object
            - number
        - `location` FuzzyLocation — A geo location that can be unspecific.
          - `country` string — ISO-3166-2 code of a country
          - `administrativeAreaLevel1` string — First administrative subdivision of a country
          - `administrativeAreaLevel2` string — Second administrative subdivision of a country
          - `administrativeAreaLevel3` string — Third administrative subdivision of a country
          - `place` string — Name of the place this location refers to
          - `name` string — Full name of the location
          - `geoResolution` 'undefined' | 'Point' | 'Admin3' | 'Admin2' | 'Admin1' | 'Country' — How granular the location is
          - `geometry` object
            - `latitude` number
            - `longitude` number
        - `purpose` string
        - `methods` string[]
    - `genomeSequences` object[] — Genome sequence of the pathogen
      - `sampleCollectionDate` union
        - string
        - object
        - number
      - `repositoryUrl` string
      - `sequenceId` string
      - `sequenceName` string
      - `sequenceLength` integer
    - `pathogens` object[] — Pathogens associated with the case
      - `name` string
      - `id` integer
    - `revisionMetadata` object — Various revisions of this case over time
      - `revisionNumber` integer
      - `creationMetadata` EditMetadata
        - `curator` string — Email of the curator
        - `date` union
          - string
          - object
          - number
        - `notes` string — Notes from the curator about the update
      - `editMetadata` EditMetadata
        - `curator` string — Email of the curator
        - `date` union
          - string
          - object
          - number
        - `notes` string — Notes from the curator about the update
    - `variant` object — Details of the variant of concern/interest if applicable.
      - `name` string — Name of the variant of concern or interest.
    - `vaccines` Vaccine[] — A list of vaccines
      - `name` string — The name of the vaccine administered
      - `batch` string — The batch ID of the vaccine dose administered
      - `date` union
        - string
        - object
        - number
      - `sideEffects` SymptomArray
        - `symptoms` string[]

## Response `200`

OK

- BatchCaseUpdateResponse — Response to batch update cases API requests
  - `numModified` number, required

## Other responses

- `400` — Malformed request
- `422` — Unprocessable entity
- `500` — Internal server error

---

[API](https://skmtc.net/globaldothealth/apis/global-health-curator-service-api.md) · [All operations](https://skmtc.net/globaldothealth/apis/global-health-curator-service-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/globaldothealth/global-health-curator-service-api/revisions/5b1151265235/schema)
