{
  "openapi": "3.0.3",
  "servers": [
    {
      "url": "https://app.spotdx.com",
      "description": "Production"
    }
  ],
  "info": {
    "title": "Spot API v2",
    "version": "2.0.0",
    "description": "API Docs for Spot API"
  },
  "paths": {
    "/api/v2/kits/": {
      "get": {
        "operationId": "api_v2_list_kits",
        "description": "Query your kits and return a summary, sorted by creation date. Providing any query params will further filter the results to only those that match the query params.",
        "parameters": [
          {
            "in": "query",
            "name": "results",
            "description": "Number of results to return per page. Must be in range 1-100. Default is 10.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "in": "query",
            "name": "email",
            "schema": {
              "type": "string"
            },
            "description": "Only retrieve kits associated with this email address. Case insensitive."
          },
          {
            "in": "query",
            "name": "first_name",
            "schema": {
              "type": "string"
            },
            "description": "Only retrieve kits associated with this first name. Case insensitive."
          },
          {
            "in": "query",
            "name": "kit_type",
            "schema": {
              "type": "string"
            },
            "description": "Only retrieve kits associated with this kit type."
          },
          {
            "in": "query",
            "name": "last_name",
            "schema": {
              "type": "string"
            },
            "description": "Only retrieve kits associated with this last name. Case insensitive."
          },
          {
            "in": "query",
            "name": "phone",
            "schema": {
              "type": "string"
            },
            "description": "Only retrieve kits associated with this phone number."
          },
          {
            "in": "query",
            "name": "has_order",
            "schema": {
              "type": "boolean"
            },
            "description": "Filter kits based on whether they are associated with an order. Kit ordered through the API will always have an order. Retail kits may not."
          },
          {
            "in": "query",
            "name": "kit_status",
            "schema": {
              "$ref": "#/components/schemas/KitStatus"
            },
            "description": "Only retrieve kits whose most recent event is this status."
          },
          {
            "in": "query",
            "name": "sample_status",
            "schema": {
              "$ref": "#/components/schemas/SampleStatus"
            },
            "description": "Only retrieve kits whose sample's most recent event is this status."
          },
          {
            "in": "query",
            "name": "created_before",
            "schema": {
              "type": "string"
            },
            "description": "Only retrieve orders created on or before this date. Format: YYYY-MM-DD"
          },
          {
            "in": "query",
            "name": "created_after",
            "schema": {
              "type": "string"
            },
            "description": "Only retrieve orders created on or after this date. Format: YYYY-MM-DD"
          },
          {
            "in": "query",
            "name": "updated_before",
            "schema": {
              "type": "string"
            },
            "description": "Only retrieve orders updated on or before this date. Format: YYYY-MM-DD"
          },
          {
            "in": "query",
            "name": "updated_after",
            "schema": {
              "type": "string"
            },
            "description": "Only retrieve orders updated on or after this date. Format: YYYY-MM-DD"
          }
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KitSummary"
                  }
                }
              }
            },
            "description": "Success"
          }
        }
      }
    },
    "/api/v2/kit_types": {
      "get": {
        "operationId": "api_v2_list_kit_types",
        "description": "Get an array of all valid kit types that can be created.",
        "parameters": [],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "example": [
                    "health_kit_1",
                    "health_kit_2",
                    "health_kit_3"
                  ]
                }
              }
            },
            "description": "Success"
          }
        }
      }
    },
    "/api/v2/kits/{public_id}/": {
      "get": {
        "operationId": "api_v2_get_kit",
        "description": "Returns an individual kit with the given kit id.",
        "parameters": [
          {
            "in": "path",
            "name": "public_id",
            "schema": {
              "type": "string"
            },
            "description": "ID of the kit to retrieve.",
            "required": true
          }
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Kit"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            },
            "description": "Bad request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            },
            "description": "Not found"
          }
        }
      },
      "post": {
        "operationId": "api_v2_update_kit_metadata",
        "description": "Update the metadata associated with a kit.",
        "parameters": [
          {
            "in": "path",
            "name": "public_id",
            "schema": {
              "type": "string"
            },
            "description": "ID of the kit to update.",
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "metadata": {
                    "type": "object",
                    "description": "Metadata to be associated with the kit."
                  }
                },
                "required": [
                  "metadata"
                ]
              }
            }
          }
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Kit"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            },
            "description": "Bad request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            },
            "description": "Not found"
          }
        }
      }
    },
    "/api/v2/orders/": {
      "get": {
        "operationId": "api_v2_list_orders",
        "description": "Get a list of your orders sorted by recently updated. Providing any query params will further filter the results to only those that match the query params.",
        "parameters": [
          {
            "in": "query",
            "name": "email",
            "schema": {
              "type": "string"
            },
            "description": "Only retrieve orders associated with this email address."
          },
          {
            "in": "query",
            "name": "first_name",
            "schema": {
              "type": "string"
            },
            "description": "Only retrieve orders associated with this first name."
          },
          {
            "in": "query",
            "name": "last_name",
            "schema": {
              "type": "string"
            },
            "description": "Only retrieve orders associated with this last name."
          },
          {
            "in": "query",
            "name": "phone",
            "schema": {
              "type": "string"
            },
            "description": "Only retrieve orders associated with this phone number."
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "canceled",
                "completed",
                "in_progress",
                "pending"
              ]
            },
            "description": "Only retrieve orders that have this status."
          },
          {
            "in": "query",
            "name": "created_before",
            "schema": {
              "type": "string"
            },
            "description": "Only retrieve orders created on or before this date. Format: YYYY-MM-DD"
          },
          {
            "in": "query",
            "name": "created_after",
            "schema": {
              "type": "string"
            },
            "description": "Only retrieve orders created on or after this date. Format: YYYY-MM-DD"
          },
          {
            "in": "query",
            "name": "updated_before",
            "schema": {
              "type": "string"
            },
            "description": "Only retrieve orders updated on or before this date. Format: YYYY-MM-DD"
          },
          {
            "in": "query",
            "name": "updated_after",
            "schema": {
              "type": "string"
            },
            "description": "Only retrieve orders updated on or after this date. Format: YYYY-MM-DD"
          },
          {
            "in": "query",
            "name": "results",
            "description": "Number of results to return. Must be in range 1-100. Default is 10.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrderSummary"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "api_v2_create_order",
        "description": "Create an order for delivering kits to a client, which will be created with a status of 'pending'.The order will be created with the user making the request as the 'placed_by' user.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrder"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrder"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrder"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderEmpty"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/v2/orders/{public_id}/": {
      "get": {
        "operationId": "api_v2_get_order",
        "description": "Retrieve a singular order matching the provided ID.",
        "parameters": [
          {
            "in": "path",
            "name": "public_id",
            "schema": {
              "type": "string"
            },
            "description": "The ID of the order to retrieve.",
            "required": true
          }
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderFull"
                }
              }
            },
            "description": ""
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "404": {
            "description": "Order not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "api_v2_update_order_metadata",
        "description": "Replace the metadata for an order with a new set of values",
        "parameters": [
          {
            "in": "path",
            "name": "public_id",
            "schema": {
              "type": "string"
            },
            "description": "The ID of the order to retrieve.",
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "metadata": {
                    "type": "object",
                    "description": "The metadata to replace the existing metadata with.",
                    "example": {
                      "some_key": "some_value"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderFull"
                }
              }
            },
            "description": ""
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "404": {
            "description": "Order not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tokens/patient_registration/": {
      "post": {
        "operationId": "api_v2_create_patient_token",
        "description": "Generate a one-time-use registration token for a patient with a lifetime of 10 minutes.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePatientRegistrationToken"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CreatePatientRegistrationToken"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CreatePatientRegistrationToken"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientRegistrationTokenResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/v2/requisitions/": {
      "get": {
        "operationId": "api_v2_list_requisitions",
        "description": "Retrieve a list of requisitions.",
        "parameters": [
          {
            "in": "query",
            "name": "lab",
            "schema": {
              "type": "string"
            },
            "description": "Filter by the lab name. This is case sensitive. If there is a space in the lab's name, use %20 in the url instead, eg. The Lab would become ?lab=The%20Lab"
          },
          {
            "in": "query",
            "name": "first_name",
            "schema": {
              "type": "string"
            },
            "description": "Filter by first name."
          },
          {
            "in": "query",
            "name": "last_name",
            "schema": {
              "type": "string"
            },
            "description": "Filter by last name."
          },
          {
            "in": "query",
            "name": "email",
            "schema": {
              "type": "string"
            },
            "description": "Filter by email."
          },
          {
            "in": "query",
            "name": "phone",
            "schema": {
              "type": "string"
            },
            "description": "Filter by phone number."
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            },
            "description": "Filter by status."
          },
          {
            "in": "query",
            "name": "created_before",
            "schema": {
              "type": "string"
            },
            "description": "Only retrieve orders created on or before this date. Format: YYYY-MM-DD"
          },
          {
            "in": "query",
            "name": "created_after",
            "schema": {
              "type": "string"
            },
            "description": "Only retrieve orders created on or after this date. Format: YYYY-MM-DD"
          },
          {
            "in": "query",
            "name": "updated_before",
            "schema": {
              "type": "string"
            },
            "description": "Only retrieve orders updated on or before this date. Format: YYYY-MM-DD"
          },
          {
            "in": "query",
            "name": "updated_after",
            "schema": {
              "type": "string"
            },
            "description": "Only retrieve orders updated on or after this date. Format: YYYY-MM-DD"
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The offset to start the list from."
          },
          {
            "in": "query",
            "name": "results",
            "schema": {
              "type": "integer"
            },
            "description": "The number of results to retrieve per page."
          }
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RequisitionSummary"
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "api_v2_create_requisition",
        "description": "Create a new requisition.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRequisition"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Requisition"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/v2/requisitions/{id}": {
      "get": {
        "operationId": "api_v2_get_requisition",
        "description": "Retrieve a requisition.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the requisition to retrieve.",
            "required": true
          }
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Requisition"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/v2/patients/": {
      "get": {
        "operationId": "api_v2_list_patients",
        "description": "Retrieve a requisition.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the requisition to retrieve.",
            "required": true
          }
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Requisition"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "api_v2_create_patient",
        "description": "Create a patient.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePatient"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CreatePatient"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CreatePatient"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Patient"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/v3/kits/{public_id}/activate/": {
      "post": {
        "operationId": "api_v3_kits_activate_create",
        "description": "Activate a kit via API by either providing 'patient_id' or the information needed to create a new patient. Please note that the activation API is only available for selected kits.",
        "parameters": [
          {
            "in": "path",
            "name": "public_id",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "public_id",
            "schema": {
              "type": "string"
            },
            "description": "Public ID of the kit",
            "required": true
          }
        ],
        "tags": [
          "api"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "patient_id": {
                    "type": "string",
                    "description": "ID of the existing patient. If provided, no other patient details are needed."
                  },
                  "first_name": {
                    "type": "string"
                  },
                  "last_name": {
                    "type": "string"
                  },
                  "date_of_birth": {
                    "type": "string",
                    "format": "date"
                  },
                  "sex": {
                    "type": "string"
                  },
                  "street1": {
                    "type": "string"
                  },
                  "street2": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string"
                  },
                  "zip": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "research_consent": {
                    "type": "boolean"
                  }
                },
                "description": "Provide 'patient_id' to activate the kit for an existing patient, or provide patient details to create a new patient. Individual field requirements depend on the kit type being activated. Please note that the activation API is only available for selected kits."
              }
            }
          }
        },
        "security": [
          {
            "tokenAuth": []
          },
          {}
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "string",
                          "example": "success"
                        }
                      }
                    }
                  },
                  "description": "Unspecified response body"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            },
            "description": "Bad request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            },
            "description": "Not found"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            },
            "description": "Not found"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Address": {
        "type": "object",
        "properties": {
          "street1": {
            "type": "string",
            "description": "Recipient's address.",
            "example": "123 Main St"
          },
          "street2": {
            "description": "Second line of recipient's address.",
            "type": "string",
            "nullable": true,
            "example": "Apt 1"
          },
          "city": {
            "type": "string",
            "description": "Recipient's city of residence.",
            "example": "San Francisco"
          },
          "state": {
            "type": "string",
            "description": "Recipient's state of residence.",
            "example": "CA"
          },
          "country": {
            "type": "string",
            "description": "Recipient's country of residence.",
            "enum": [
              "US",
              "CA"
            ],
            "example": "US"
          },
          "zip": {
            "type": "string",
            "description": "Recipient's zip code.",
            "example": "94105"
          }
        },
        "required": [
          "street1",
          "city",
          "state",
          "country",
          "zip"
        ]
      },
      "AssignKits": {
        "type": "object",
        "properties": {
          "order_id": {
            "type": "string",
            "example": "O1234567890"
          },
          "kit_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "SPOT123456",
              "SPOT123457"
            ]
          },
          "bypass_address_validation": {
            "type": "boolean",
            "example": false
          }
        }
      },
      "BadRequest": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "status": {
                "type": "number",
                "example": 400,
                "enum": [
                  400,
                  401,
                  403,
                  404,
                  500
                ]
              },
              "type": {
                "type": "string",
                "example": "bad_request",
                "enum": [
                  "bad_request",
                  "not_found",
                  "unauthorized",
                  "forbidden",
                  "rate_limit_exceeded",
                  "internal_server_error"
                ]
              },
              "detail": {
                "type": "string",
                "example": "The first_name field is required"
              }
            }
          }
        },
        "required": [
          "error"
        ]
      },
      "BuildKit": {
        "type": "object",
        "properties": {
          "kit_public_id": {
            "type": "string",
            "maxLength": 255
          },
          "sample_public_id": {
            "type": "string",
            "maxLength": 255
          },
          "tracking_number": {
            "type": "string",
            "maxLength": 255
          },
          "kit_type_public_id": {
            "type": "string",
            "maxLength": 255
          },
          "lot_public_id": {
            "type": "string",
            "maxLength": 255
          },
          "assemblers": {
            "type": "string",
            "maxLength": 255
          }
        },
        "required": [
          "kit_public_id",
          "kit_type_public_id",
          "sample_public_id",
          "tracking_number"
        ]
      },
      "CreateOrder": {
        "type": "object",
        "properties": {
          "kit_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of all the kit types to place in the order.",
            "example": [
              "health_kit_1"
            ]
          },
          "recipient": {
            "$ref": "#/components/schemas/Recipient"
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "description": "An optional dictionary of key-value pairs stored with the order.",
            "example": {
              "some_key": "some_value"
            }
          }
        },
        "required": [
          "kit_types",
          "recipient"
        ]
      },
      "CreatePatient": {
        "$ref": "#/components/schemas/Patient"
      },
      "CreatePatientRegistrationToken": {
        "type": "object",
        "properties": {
          "patient_id": {
            "type": "string",
            "description": "UUID of a patient you've already created."
          },
          "kit_type": {
            "type": "string",
            "description": "If this is a multi-purpose kit, optionally specify the kit type it should become. For more information about multi-purpose kits, read the advanced kit workflows guide.",
            "example": "health_kit_1"
          }
        },
        "required": [
          "patient_id"
        ]
      },
      "CreateRequisition": {
        "type": "object",
        "properties": {
          "barcode": {
            "type": "string",
            "description": "The barcode of the sample mailed to the lab. We use this to identify the sample from the lab report.",
            "example": "19742938328"
          },
          "panels": {
            "type": "array",
            "description": "The panel codes of the test being performed on the sample. We'll create these with you during onboarding.",
            "example": [
              "PANEL-123"
            ],
            "items": {
              "type": "string"
            }
          },
          "account_number": {
            "type": "string",
            "description": "The account number submitted to the lab.",
            "example": "1234567890"
          },
          "lab": {
            "type": "string",
            "description": "The name of the lab that will process the sample.",
            "example": "CRL"
          },
          "state_collected": {
            "type": "string",
            "description": "The two letter code of the state where the sample was collected.",
            "example": "OH"
          },
          "patient": {
            "type": "object",
            "properties": {
              "first_name": {
                "type": "string",
                "description": "The first name of the patient.",
                "example": "Alice"
              },
              "last_name": {
                "type": "string",
                "description": "The last name of the patient to be created.",
                "example": "Smith"
              },
              "email": {
                "type": "string",
                "format": "email",
                "description": "The email of the patient to be created.",
                "example": "alice123@gmail.com"
              },
              "phone": {
                "type": "string",
                "description": "Optional phone number of the patient.",
                "example": "1234567890"
              },
              "sex": {
                "type": "string",
                "description": "The biological sex of the patient to be created.",
                "enum": [
                  "M",
                  "F"
                ],
                "example": "F"
              },
              "date_of_birth": {
                "type": "string",
                "format": "date",
                "description": "The date of birth of the patient to be created."
              },
              "address": {
                "$ref": "#/components/schemas/Address"
              }
            }
          },
          "tracking": {
            "type": "object",
            "properties": {
              "tracking_number": {
                "type": "string",
                "nullable": true
              },
              "carrier": {
                "type": "string",
                "enum": [
                  "fedex",
                  "ups",
                  "usps"
                ],
                "nullable": true
              }
            },
            "example": {
              "tracking_number": "9400123456789999876500",
              "carrier": "usps"
            }
          },
          "attributes": {
            "type": "object",
            "nullable": true,
            "description": "An optional set of values that can be passed through to specific labs.",
            "properties": {
              "crl_slip_id": {
                "type": "string",
                "nullable": true,
                "description": "The slip ID to be passed through with the requisition if placing a requisition at CRL. Must be alphanumeric and maximum 10 characters.",
                "maxLength": 10,
                "example": "1234567890"
              }
            },
            "example": {
              "crl_slip_id": "1234567890"
            }
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "description": "An optional dictionary of key-value pairs stored with the requisition.",
            "example": {
              "some_key": "some_value"
            }
          }
        },
        "required": [
          "barcode",
          "panels",
          "account_number",
          "lab",
          "state_collected",
          "patient"
        ]
      },
      "Forbidden": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "status": {
                "type": "number",
                "example": 403,
                "enum": [
                  400,
                  401,
                  403,
                  404,
                  500
                ]
              },
              "type": {
                "type": "string",
                "example": "forbidden",
                "enum": [
                  "bad_request",
                  "not_found",
                  "unauthorized",
                  "forbidden",
                  "rate_limit_exceeded",
                  "internal_server_error"
                ]
              },
              "detail": {
                "type": "string",
                "example": "At-home testing is not available to residents of New York state"
              }
            }
          }
        },
        "required": [
          "error"
        ]
      },
      "Kit": {
        "type": "object",
        "properties": {
          "kit_id": {
            "type": "string",
            "description": "The unique identifier of the kit.",
            "example": "SPOT123456"
          },
          "type": {
            "type": "string",
            "description": "The kit's type",
            "example": "health_kit_1"
          },
          "status": {
            "$ref": "#/components/schemas/KitStatus"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KitEvent"
            },
            "description": "A list of all the events that have occurred for this kit.",
            "example": [
              {
                "status": "preparing",
                "created": "2023-01-01T04:30:11.222Z"
              },
              {
                "status": "in_transit",
                "created": "2023-01-05T04:30:11.222Z"
              },
              {
                "status": "delivered",
                "created": "2023-01-06T04:30:11.222Z"
              },
              {
                "status": "registered",
                "created": "2023-01-07T04:30:11.222Z"
              }
            ]
          },
          "shipment_to_customer": {
            "$ref": "#/components/schemas/Shipment"
          },
          "registered_to": {
            "type": "object",
            "properties": {
              "patient_id": {
                "type": "string",
                "format": "uuid",
                "example": "7563e8e2-7fbd-480c-9b8b-2070eda884bf"
              },
              "first_name": {
                "type": "string",
                "example": "Alice"
              },
              "last_name": {
                "type": "string",
                "example": "Smith"
              },
              "date_of_birth": {
                "type": "string",
                "format": "date",
                "example": "1990-01-01"
              },
              "sex": {
                "type": "string",
                "enum": [
                  "M",
                  "F"
                ],
                "example": "F"
              },
              "email": {
                "type": "string",
                "example": "alice123@gmail.com"
              },
              "phone": {
                "type": "string",
                "example": "1234567890"
              }
            }
          },
          "sample": {
            "type": "object",
            "properties": {
              "sample_id": {
                "type": "string",
                "example": "SPOT654321"
              },
              "status": {
                "$ref": "#/components/schemas/SampleStatus"
              },
              "events": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SampleEvent"
                },
                "example": [
                  {
                    "status": "awaiting_collection",
                    "created": "2023-01-01T04:30:11.222Z"
                  },
                  {
                    "status": "in_transit",
                    "created": "2023-01-10T04:30:11.222Z"
                  },
                  {
                    "status": "delivered",
                    "created": "2023-01-11T04:30:11.222Z"
                  },
                  {
                    "status": "received",
                    "created": "2023-01-12T04:30:11.222Z"
                  },
                  {
                    "status": "resulted",
                    "created": "2023-01-13T04:30:11.222Z"
                  }
                ]
              },
              "type": {
                "type": "string",
                "enum": [
                  "adx100",
                  "adx100_2",
                  "adx100_4",
                  "whatman903_10",
                  "dry_transport_swab",
                  "hemaspot_hf",
                  "saliva_3"
                ],
                "example": "adx100"
              },
              "shipments": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Shipment"
                }
              },
              "panels": {
                "type": "array",
                "description": "The panel codes of the test being performed on the sample. We'll create these with you during onboarding.",
                "example": [
                  "PANEL-123"
                ],
                "items": {
                  "type": "string"
                }
              },
              "reports": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Report"
                }
              }
            }
          }
        }
      },
      "KitEvent": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/KitStatus"
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time the event occurred.",
            "example": "2023-01-01T04:30:11.222Z"
          }
        }
      },
      "KitStatus": {
        "type": "string",
        "description": "The new status of the kit.",
        "enum": [
          "preparing",
          "in_transit",
          "delivered",
          "delivery_exception",
          "registered",
          "canceled"
        ],
        "example": "preparing"
      },
      "KitSummary": {
        "type": "object",
        "properties": {
          "kit_id": {
            "type": "string",
            "description": "The unique identifier of the kit.",
            "example": "SPOT123456"
          },
          "kit_type": {
            "type": "string",
            "description": "The kit's type",
            "example": "health_kit_1"
          },
          "order_id": {
            "type": "string",
            "description": "The order the kit belongs to.",
            "nullable": true,
            "example": "O1234567"
          },
          "kit_status": {
            "$ref": "#/components/schemas/KitStatus"
          },
          "sample_status": {
            "$ref": "#/components/schemas/SampleStatus"
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time the kit was created.",
            "example": "2023-01-01T04:30:11.222Z"
          },
          "updated": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time the kit was last updated.",
            "example": "2023-01-01T04:30:11.222Z"
          }
        }
      },
      "NotFound": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "status": {
                "type": "number",
                "example": 404,
                "enum": [
                  400,
                  401,
                  403,
                  404,
                  500
                ]
              },
              "type": {
                "type": "string",
                "example": "forbidden",
                "enum": [
                  "bad_request",
                  "not_found",
                  "unauthorized",
                  "forbidden",
                  "rate_limit_exceeded",
                  "internal_server_error"
                ]
              },
              "detail": {
                "type": "string",
                "example": "Kit id SPOTZZZZZZ not found"
              }
            }
          }
        },
        "required": [
          "error"
        ]
      },
      "OrderFull": {
        "type": "object",
        "properties": {
          "order_id": {
            "type": "string",
            "description": "The unique identifier of the order.",
            "example": "O1234567"
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus"
          },
          "recipient": {
            "$ref": "#/components/schemas/Recipient"
          },
          "kit_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of the kit types that are included in this order.",
            "example": [
              "health_kit_1"
            ]
          },
          "kits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Kit"
            }
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time the order was created.",
            "example": "2023-01-01T04:30:11.222Z"
          },
          "updated": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time the order was last updated.",
            "example": "2023-01-01T04:30:11.222Z"
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "description": "An optional dictionary of key-value pairs stored with the order.",
            "example": null
          }
        }
      },
      "OrderEmpty": {
        "type": "object",
        "properties": {
          "order_id": {
            "type": "string",
            "description": "The unique identifier of the order.",
            "example": "O1234567"
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "example": "2023-01-01T04:30:11.222Z"
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus"
          },
          "recipient": {
            "$ref": "#/components/schemas/Recipient"
          },
          "kit_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of the kit types that are included in this order.",
            "example": [
              "health_kit_1"
            ]
          },
          "kits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Kit"
            },
            "example": []
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "description": "An optional dictionary of key-value pairs stored with the order.",
            "example": {
              "some_key": "some_value"
            }
          }
        }
      },
      "OrderStatus": {
        "type": "string",
        "enum": [
          "pending",
          "in_progress",
          "completed",
          "canceled"
        ]
      },
      "OrderSummary": {
        "type": "object",
        "properties": {
          "order_id": {
            "type": "string",
            "description": "The order's unique ID.",
            "example": "O1234567"
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus"
          },
          "recipient": {
            "$ref": "#/components/schemas/Recipient"
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time the order was created.",
            "example": "2023-01-01T04:30:11.222Z"
          },
          "updated": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time the order was last updated.",
            "example": "2023-01-01T04:30:11.222Z"
          }
        }
      },
      "Patient": {
        "type": "object",
        "properties": {
          "first_name": {
            "type": "string",
            "description": "The first name of the patient.",
            "example": "Alice"
          },
          "last_name": {
            "type": "string",
            "description": "The last name of the patient to be created.",
            "example": "Smith"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "The email of the patient to be created.",
            "example": "alice123@gmail.com"
          },
          "phone": {
            "type": "string",
            "description": "Optional phone number of the patient.",
            "example": "1234567890"
          },
          "sex": {
            "type": "string",
            "description": "The biological sex of the patient to be created.",
            "enum": [
              "M",
              "F"
            ],
            "example": "F"
          },
          "date_of_birth": {
            "type": "string",
            "format": "date",
            "description": "The date of birth of the patient to be created."
          }
        },
        "required": [
          "date_of_birth",
          "email",
          "first_name",
          "last_name",
          "sex"
        ]
      },
      "PatientRegistrationTokenResponse": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "readOnly": true,
            "example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJtYXgiOjEsInN1YiI6InBhdGllbnRfcmVnaXN0cmF0aW9uIiwibW9kIjoibiIsImp0aSI6MzYsImV4cCI6MTY2MTg4NjgzOCwiaWF0IjoxNjYxODg2MjM4fQ.byD8FThgvNGm3csx_QzrpZQUrsfFW3rmBU3mLQQlL2I"
          }
        },
        "required": [
          "token"
        ]
      },
      "Recipient": {
        "type": "object",
        "properties": {
          "first_name": {
            "type": "string",
            "description": "Recipient's first name.",
            "example": "Alice"
          },
          "last_name": {
            "type": "string",
            "description": "Recipient's last name.",
            "example": "Smith"
          },
          "email": {
            "type": "string",
            "description": "Recipient's email.",
            "example": "alice123@gmail.com"
          },
          "phone": {
            "type": "string",
            "description": "Recipient's phone number, as a string.",
            "example": "1234567890"
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          }
        },
        "required": [
          "address",
          "email",
          "first_name",
          "last_name",
          "phone"
        ]
      },
      "Report": {
        "nullable": true,
        "type": "object",
        "properties": {
          "report_id": {
            "type": "string"
          },
          "results": {
            "description": "",
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ResultQuantity"
                },
                {
                  "$ref": "#/components/schemas/ResultReactivity"
                },
                {
                  "$ref": "#/components/schemas/ResultGenotype"
                }
              ]
            },
            "example": [
              {
                "result_type": "quantity",
                "name": "HDL Cholesterol",
                "time_collected": "2023-01-14T04:30:11.222Z",
                "result": 123,
                "unit_of_measure": "mg/dL",
                "range_minimum": 20,
                "range_maximum": 200,
                "comments": null
              },
              {
                "result_type": "quantity",
                "name": "Vitamin B12",
                "time_collected": "2023-01-14T04:30:11.222Z",
                "result": "<10",
                "unit_of_measure": "pg/mL",
                "range_minimum": 20,
                "range_maximum": 200,
                "comments": null
              },
              {
                "result_type": "reactivity",
                "name": "Chlamydia",
                "time_collected": "2023-01-14T04:30:11.222Z",
                "result": "negative",
                "unit_of_measure": null,
                "range_minimum": null,
                "range_maximum": null,
                "comments": null
              },
              {
                "result_type": "genotype",
                "name": "rs1234567",
                "time_collected": "2023-01-14T04:30:11.222Z",
                "result": "TT",
                "unit_of_measure": null,
                "range_minimum": null,
                "range_maximum": null,
                "comments": null
              }
            ]
          },
          "pdf": {
            "type": "string",
            "format": "url",
            "description": "A URL to the PDF report.",
            "example": "https://app.spotkits.com/results/f0e5a607-5b52-4d7c-a3f2-c40772d41482.pdf",
            "nullable": true
          },
          "txt": {
            "type": "string",
            "format": "url",
            "description": "A URL to the TXT report.",
            "example": "https://app.spotkits.com/results/f0e5a607-5b52-4d7c-a3f2-c40772d41482.txt",
            "nullable": true
          },
          "date_collected": {
            "type": "string",
            "format": "date-time"
          },
          "date_received": {
            "type": "string",
            "format": "date-time"
          },
          "date_resulted": {
            "type": "string",
            "format": "date-time"
          },
          "is_amendment": {
            "type": "boolean",
            "description": "Whether this report is an amendment to a previous report.",
            "example": false
          }
        }
      },
      "Requisition": {
        "type": "object",
        "properties": {
          "requisition_id": {
            "type": "string",
            "description": "The ID of the requisition.",
            "example": "f0e5a607-5b52-4d7c-a3f2-c40772d41482"
          },
          "barcode": {
            "type": "string",
            "description": "The full barcode of the sample mailed to the lab. Must be globally unique.",
            "example": "19742938328"
          },
          "account_number": {
            "type": "string",
            "description": "The account number submitted to the lab.",
            "example": "1234567890"
          },
          "lab": {
            "type": "string",
            "description": "The name of the lab that will process the sample.",
            "example": "CRL"
          },
          "panels": {
            "type": "array",
            "description": "The panel codes of the test being performed on the sample. We'll create these with you during onboarding.",
            "example": [
              "PANEL-123"
            ],
            "items": {
              "type": "string"
            }
          },
          "state_collected": {
            "type": "string",
            "description": "The two letter code of the state where the sample was collected.",
            "example": "OH"
          },
          "patient": {
            "type": "object",
            "properties": {
              "first_name": {
                "type": "string",
                "description": "The first name of the patient.",
                "example": "Alice"
              },
              "last_name": {
                "type": "string",
                "description": "The last name of the patient to be created.",
                "example": "Smith"
              },
              "email": {
                "type": "string",
                "format": "email",
                "description": "The email of the patient to be created.",
                "example": "alice123@gmail.com"
              },
              "phone": {
                "type": "string",
                "description": "Optional phone number of the patient.",
                "example": "1234567890"
              },
              "sex": {
                "type": "string",
                "description": "The biological sex of the patient to be created.",
                "enum": [
                  "M",
                  "F"
                ],
                "example": "F"
              },
              "date_of_birth": {
                "type": "string",
                "format": "date",
                "description": "The date of birth of the patient to be created."
              },
              "address": {
                "type": "object",
                "properties": {
                  "address": {
                    "$ref": "#/components/schemas/Address"
                  }
                }
              }
            }
          },
          "tracking": {
            "type": "object",
            "properties": {
              "tracking_number": {
                "type": "string",
                "nullable": true,
                "example": "9400123456789999876500"
              },
              "carrier": {
                "type": "string",
                "enum": [
                  "fedex",
                  "ups",
                  "usps"
                ],
                "example": "usps",
                "nullable": true
              }
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "created",
              "approved",
              "denied",
              "delivered",
              "received",
              "extra_quality_checks",
              "resulted",
              "rejected",
              "delivery_exception"
            ],
            "example": "resulted"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "event": {
                  "type": "string",
                  "enum": [
                    "created",
                    "approved",
                    "denied",
                    "delivered",
                    "received",
                    "extra_quality_checks",
                    "resulted",
                    "rejected",
                    "delivery_exception"
                  ]
                },
                "date": {
                  "type": "string",
                  "format": "date-time",
                  "example": "2020-01-01T00:00:00Z"
                }
              }
            },
            "example": [
              {
                "event": "created",
                "date": "2020-01-01T00:00:00Z"
              },
              {
                "event": "approved",
                "date": "2020-01-01T00:00:00Z"
              },
              {
                "event": "delivered",
                "date": "2020-01-02T00:00:00Z"
              },
              {
                "event": "received",
                "date": "2020-01-03T00:00:00Z"
              },
              {
                "event": "extra_quality_checks",
                "date": "2020-01-04T00:00:00Z"
              },
              {
                "event": "resulted",
                "date": "2020-01-05T00:00:00Z"
              }
            ]
          },
          "reports": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Report"
            }
          },
          "attributes": {
            "type": "object",
            "nullable": true,
            "description": "An optional set of values that can be passed through to specific labs.",
            "properties": {
              "crl_slip_id": {
                "type": "string",
                "nullable": true,
                "description": "The slip ID to be passed through with the requisition if placing a requisition at CRL. Must be alphanumeric and maximum 10 characters.",
                "maxLength": 10,
                "example": "1234567890"
              },
              "crl_tier3_account_number": {
                "type": "string",
                "nullable": true,
                "description": "The region ID to be passed through with the requisition if placing a requisition at CRL. Must be alphanumeric and exactly 8 characters.",
                "maxLength": 8,
                "minLength": 8,
                "example": "12345678"
              }
            },
            "example": {
              "crl_slip_id": "1234567890",
              "crl_tier3_account_number": "12345678"
            }
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "description": "An optional dictionary of key-value pairs stored with the requisition.",
            "example": {
              "some_key": "some_value"
            }
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "example": "2020-01-01T00:00:00Z"
          },
          "updated": {
            "type": "string",
            "format": "date-time",
            "example": "2020-01-01T00:00:00Z"
          }
        }
      },
      "RequisitionSummary": {
        "type": "object",
        "properties": {
          "requisition_id": {
            "type": "string",
            "description": "The ID of the requisition.",
            "example": "f0e5a607-5b52-4d7c-a3f2-c40772d41482"
          },
          "barcode": {
            "type": "string",
            "description": "The full barcode of the sample mailed to the lab. Must be globally unique.",
            "example": "19742938328"
          },
          "account_number": {
            "type": "string",
            "description": "The account number submitted to the lab.",
            "example": "1234567890"
          },
          "lab": {
            "type": "string",
            "description": "The name of the lab that will process the sample.",
            "example": "CRL"
          },
          "panels": {
            "type": "array",
            "description": "The panel codes of the test being performed on the sample. We'll create these with you during onboarding.",
            "example": [
              "PANEL-123"
            ],
            "items": {
              "type": "string"
            }
          },
          "patient": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Patient"
              },
              {
                "type": "object",
                "properties": {
                  "address": {
                    "$ref": "#/components/schemas/Address"
                  }
                }
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "created",
              "approved",
              "denied",
              "delivered",
              "received",
              "extra_quality_checks",
              "resulted",
              "rejected",
              "delivery_exception"
            ],
            "example": "resulted"
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "example": "2020-01-01T00:00:00Z"
          },
          "updated": {
            "type": "string",
            "format": "date-time",
            "example": "2020-01-01T00:00:00Z"
          }
        }
      },
      "ResultQuantity": {
        "type": "object",
        "properties": {
          "result_type": {
            "type": "string",
            "enum": [
              "quantity"
            ]
          },
          "name": {
            "type": "string",
            "description": "The biomarker that was analyzed."
          },
          "time_collected": {
            "type": "string",
            "format": "date-time"
          },
          "result": {
            "description": "",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          },
          "unit_of_measure": {
            "type": "string",
            "nullable": true
          },
          "range_minimum": {
            "type": "string",
            "minimum": 0
          },
          "range_maximum": {
            "type": "number",
            "minimum": 0
          },
          "comments": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ResultReactivity": {
        "type": "object",
        "properties": {
          "result_type": {
            "type": "string",
            "enum": [
              "reactivity"
            ]
          },
          "name": {
            "type": "string",
            "description": "The biomarker that was analyzed."
          },
          "time_collected": {
            "type": "string",
            "format": "date-time"
          },
          "result": {
            "description": "",
            "type": "string",
            "enum": [
              "positive",
              "negative"
            ]
          },
          "unit_of_measure": {
            "type": "string",
            "nullable": true
          },
          "range_minimum": {
            "type": "number",
            "nullable": true
          },
          "range_maximum": {
            "type": "number",
            "nullable": true
          },
          "comments": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ResultGenotype": {
        "type": "object",
        "properties": {
          "result_type": {
            "type": "string",
            "enum": [
              "genotype"
            ]
          },
          "name": {
            "type": "string",
            "description": "The biomarker that was analyzed."
          },
          "time_collected": {
            "type": "string",
            "format": "date-time"
          },
          "result": {
            "description": "",
            "type": "string",
            "enum": [
              "TT",
              "GG",
              "CG",
              "AG",
              "CT",
              "CC",
              "AA",
              "AT",
              "AC",
              "TA",
              "TG",
              "TC",
              "GA",
              "GT",
              "GC",
              "CA"
            ]
          },
          "unit_of_measure": {
            "type": "string",
            "nullable": true
          },
          "range_minimum": {
            "type": "number",
            "nullable": true
          },
          "range_maximum": {
            "type": "number",
            "nullable": true
          },
          "comments": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "SampleEvent": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/SampleStatus"
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "example": "2023-01-01T04:30:11.222Z"
          }
        }
      },
      "SampleStatus": {
        "type": "string",
        "description": "The new status of the sample.",
        "enum": [
          "awaiting_collection",
          "collection_exception",
          "delivery_exception",
          "delivered",
          "in_transit",
          "received",
          "resulted",
          "partially_resulted",
          "extra_quality_checks",
          "canceled"
        ]
      },
      "Shipment": {
        "type": "object",
        "properties": {
          "tracking_number": {
            "type": "string",
            "nullable": true,
            "example": "9400123456789999876500"
          },
          "carrier": {
            "type": "string",
            "enum": [
              "fedex",
              "ups",
              "usps"
            ],
            "example": "usps",
            "nullable": true
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "example": "2023-01-01T04:30:11.222Z"
          }
        }
      },
      "UploadGenotypeResults": {
        "type": "object",
        "properties": {
          "sample_id": {
            "type": "string"
          },
          "results": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "results",
          "sample_id"
        ]
      },
      "UploadGenotypeResultsResponse": {
        "type": "object",
        "properties": {
          "reports": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Report"
            }
          }
        },
        "required": [
          "reports"
        ]
      }
    },
    "securitySchemes": {
      "tokenAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Token-based authentication with required prefix \"Token\""
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  }
}
