Skip to content

Create a case

A client creates a case, as in step 1 of the happy path scenario. The response includes BIOS identifiers which will be included in downstream events for the case.

Open questions: remove before sharing with clients

  • Will POST /cases accept the client's own identifiers for the case, proband and specimen?
  • How does the client get the order_id?

Create the case

The client sends its access token in the Authorization header. It should also send a new UUID in the Idempotency-Key header for each case. If it retries the request, it should send the same key so that retries don't create duplicate cases.

Which proband.requirements the client must send depends on the Order. This one requires only variant_files_collection_id.

IDEMPOTENCY_KEY=$(uuidgen)

curl -X POST https://sandbox.biosgenomics.com/api/v1/cases \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Idempotency-Key: \"$IDEMPOTENCY_KEY\"" \
  -H "Content-Type: application/json" \
  -d @case.json
case.json
{
  "order_id": "ord_01kfa2b3c4d5e6f7g8h9j0kmnp",
  "proband": {
    "patient_name": "Test Patient",
    "date_of_birth": "2026-07-05",
    "sex_assigned_at_birth": "FEMALE",
    "patient_identifier": "TEST-MRN-0001",
    "specimen": {
      "type": "dried_blood_spot",
      "collection_date": "2026-07-06T09:15:30-07:00",
      "received_date": "2026-07-07",
      "accession_id": "TEST-ACCESSION-0001"
    },
    "requirements": {
      "variant_files_collection_id": "TEST-VFC-0001"
    }
  }
}

Response

The BIOS API returns 200 with the case and its requirements. vcfs is missing because the client has not uploaded the VCFs yet.

{
  "case_id": "case_01kfb7q2r3s4t5v6w7x8y9z0ab",
  "organization_id": "org_01kf9c8d7e6f5g4h3j2k1m0npq",
  "order_id": "ord_01kfa2b3c4d5e6f7g8h9j0kmnp",
  "proband_id": "ind_01kfb7q2r3s4t5v6w7x8y9z0ac",
  "specimen_id": "spec_01kfb7q2r3s4t5v6w7x8y9z0ad",
  "customer_id": "cust_01kf9d2e3f4g5h6j7k8m9n0pqr",
  "status": "awaiting_requirements",
  "tags": {},
  "created_at": "2026-11-17T19:52:03.481920Z",
  "updated_at": "2026-11-17T19:52:03.481920Z",
  "requirements": [
    {
      "case_requirement_id": "req_01kfb7q2r3s4t5v6w7x8y9z0ae",
      "case_id": "case_01kfb7q2r3s4t5v6w7x8y9z0ab",
      "requirement_key": "variant_files_collection_id",
      "kind": "structured",
      "required": true,
      "status": "accepted",
      "value": "TEST-VFC-0001",
      "tags": {},
      "validation_message": null,
      "updated_at": "2026-11-17T19:52:03.481920Z"
    },
    {
      "case_requirement_id": "req_01kfb7q2r3s4t5v6w7x8y9z0af",
      "case_id": "case_01kfb7q2r3s4t5v6w7x8y9z0ab",
      "requirement_key": "vcfs",
      "kind": "file",
      "required": true,
      "status": "missing",
      "value": null,
      "tags": {},
      "validation_message": null,
      "updated_at": "2026-11-17T19:52:03.481920Z"
    }
  ]
}