v1

latestOpenAPI 3.0.3MIT2026-07-17403684.7 KB
Case

Upserts a case

Creates or updates a case, depending on whether the provided values for the caseReference.sourceId and caseReference.sourceEntryId fields correspond to an existing case record.

put/cases

Request body

Example request

{
  "caseReference": {
    "sourceId": "5ef22491937717c3331c3729",
    "sourceUrl": "https://api.covid19india.org/raw_data7.json"
  },
  "demographics": {
    "ethnicity": "Asian",
    "occupation": "Epidemiologist"
  },
  "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"
  },
  "events": [
    {
      "name": "confirmed",
      "dateRange": {
        "start": "06/20/2020",
        "end": "06/20/2020"
      }
    },
    {
      "name": "outcome",
      "value": "Death"
    },
    {
      "name": "icuAdmission",
      "dateRange": {
        "start": "06/20/2020",
        "end": "06/25/2020"
      },
      "value": "Yes"
    }
  ],
  "symptoms": {
    "status": "Symptomatic",
    "values": [
      "Headache",
      "Vomiting"
    ]
  },
  "preexistingConditions": {
    "hasPreexistingConditions": true,
    "values": [
      "acatalasia",
      "pleuropneumonia"
    ]
  },
  "transmission": {
    "routes": [
      "Oral",
      "Air-borne"
    ],
    "places": [
      "Airplane",
      "Bus",
      "Gym"
    ],
    "linkedCaseIds": [
      "5f3a99d615246c7402ac07d3"
    ]
  },
  "travelHistory": {
    "traveledPrior30Days": true,
    "travel": {
      "dateRange": {
        "start": "02/18/2020",
        "end": "02/20/2020"
      },
      "location": {
        "name": "Peru"
      },
      "purpose": "Business",
      "methods": [
        "Plane",
        "Ferry",
        "Train"
      ]
    }
  },
  "genomeSequences": [
    {
      "repositoryUrl": "https://www.ncbi.nlm.nih.gov/nuccore/AY242057.1",
      "sequenceId": "AY242057.1",
      "sequenceName": "Danio rerio foxi one (foo) gene, complete cds",
      "sequenceLength": 2074
    }
  ],
  "pathogens": [
    {
      "name": "Brucellosis"
    }
  ],
  "revisionMetadata": {
    "creationMetadata": {
      "curator": "foo@bar.com"
    },
    "editMetadata": {
      "curator": "foo@bar.com"
    }
  },
  "variant": {
    "name": "B.1.351"
  },
  "vaccines": [
    {
      "name": "AstraZeneca",
      "batch": "PV12345"
    }
  ]
}

Response

OK

Example response

{
  "caseReference": {
    "sourceId": "5ef22491937717c3331c3729",
    "sourceUrl": "https://api.covid19india.org/raw_data7.json"
  },
  "demographics": {
    "ethnicity": "Asian",
    "occupation": "Epidemiologist"
  },
  "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"
  },
  "events": [
    {
      "name": "confirmed",
      "dateRange": {
        "start": "06/20/2020",
        "end": "06/20/2020"
      }
    },
    {
      "name": "outcome",
      "value": "Death"
    },
    {
      "name": "icuAdmission",
      "dateRange": {
        "start": "06/20/2020",
        "end": "06/25/2020"
      },
      "value": "Yes"
    }
  ],
  "symptoms": {
    "status": "Symptomatic",
    "values": [
      "Headache",
      "Vomiting"
    ]
  },
  "preexistingConditions": {
    "hasPreexistingConditions": true,
    "values": [
      "acatalasia",
      "pleuropneumonia"
    ]
  },
  "transmission": {
    "routes": [
      "Oral",
      "Air-borne"
    ],
    "places": [
      "Airplane",
      "Bus",
      "Gym"
    ],
    "linkedCaseIds": [
      "5f3a99d615246c7402ac07d3"
    ]
  },
  "travelHistory": {
    "traveledPrior30Days": true,
    "travel": {
      "dateRange": {
        "start": "02/18/2020",
        "end": "02/20/2020"
      },
      "location": {
        "name": "Peru"
      },
      "purpose": "Business",
      "methods": [
        "Plane",
        "Ferry",
        "Train"
      ]
    }
  },
  "genomeSequences": [
    {
      "repositoryUrl": "https://www.ncbi.nlm.nih.gov/nuccore/AY242057.1",
      "sequenceId": "AY242057.1",
      "sequenceName": "Danio rerio foxi one (foo) gene, complete cds",
      "sequenceLength": 2074
    }
  ],
  "pathogens": [
    {
      "name": "Brucellosis"
    }
  ],
  "revisionMetadata": {
    "creationMetadata": {
      "curator": "foo@bar.com"
    },
    "editMetadata": {
      "curator": "foo@bar.com"
    }
  },
  "variant": {
    "name": "B.1.351"
  },
  "vaccines": [
    {
      "name": "AstraZeneca",
      "batch": "PV12345"
    }
  ]
}