API ReferenceapiclinicalPOST /v1/biomarkers/parse/vendor

POST /v1/biomarkers/parse/vendor

Service: clinical · operationId: (none)

Parse raw lab results from a specific vendor (LabCorp, Quest, Junction)

Required scopes

(no scope declared — review service config)

Request body

{
  "type": "object",
  "properties": {
    "patient_id": {
      "type": "string",
      "minLength": 1
    },
    "brand_id": {
      "type": "string",
      "minLength": 1
    },
    "vendor": {
      "type": "string",
      "enum": [
        "labcorp",
        "quest",
        "junction"
      ]
    },
    "raw_payload": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "patient_id",
    "brand_id",
    "vendor",
    "raw_payload"
  ]
}

Responses

200 Vendor payload parsed and biomarkers stored

{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "patient_id": {
            "type": "string"
          },
          "biomarker_code": {
            "type": "string"
          },
          "biomarker_name": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "unit": {
            "type": "string"
          },
          "reference_low": {
            "type": [
              "number",
              "null"
            ]
          },
          "reference_high": {
            "type": [
              "number",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "normal",
              "low",
              "high",
              "critical"
            ]
          },
          "collected_at": {
            "type": "string"
          },
          "parsed_at": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "patient_id",
          "biomarker_code",
          "biomarker_name",
          "value",
          "unit",
          "reference_low",
          "reference_high",
          "status",
          "collected_at",
          "parsed_at"
        ]
      }
    },
    "count": {
      "type": "number"
    },
    "vendor": {
      "type": "string",
      "enum": [
        "labcorp",
        "quest",
        "junction"
      ]
    }
  },
  "required": [
    "results",
    "count",
    "vendor"
  ]
}

400 Validation error or unsupported vendor

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://clinical.platform.loop.health/v1/biomarkers/parse/vendor \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'