{
  "opencollection": "1.0.0",
  "info": {
    "name": "VivaLNK Biometrics Data Platform API (Modeled)",
    "version": "1.0-modeled",
    "description": "MODELED Open Collection for the VivaLNK (Vivalink) Biometrics Data Platform cloud API. Partner-gated developer surface; requests modeled from documented capabilities (M2M cloud web services, webhooks, FHIR, bulk export). Confirm base URL and auth against VivaLNK's licensed docs."
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{accessToken}}"
    }
  },
  "items": [
    {
      "info": { "name": "Subjects", "type": "folder" },
      "items": [
        {
          "info": { "name": "List subjects", "type": "http" },
          "http": { "method": "GET", "url": "https://api.vivalink.com/v1/subjects" },
          "docs": "Lists enrolled subjects (modeled)."
        },
        {
          "info": { "name": "Create a subject", "type": "http" },
          "http": {
            "method": "POST",
            "url": "https://api.vivalink.com/v1/subjects",
            "body": { "type": "json", "data": "{\"externalId\":\"\",\"projectId\":\"\"}" }
          },
          "docs": "Enrolls a new subject (modeled)."
        },
        {
          "info": { "name": "Retrieve a subject", "type": "http" },
          "http": {
            "method": "GET",
            "url": "https://api.vivalink.com/v1/subjects/:subjectId",
            "params": [
              { "name": "subjectId", "value": "", "type": "path", "description": "The subject ID." }
            ]
          },
          "docs": "Retrieves a subject by ID (modeled)."
        },
        {
          "info": { "name": "Retrieve subject measurements", "type": "http" },
          "http": {
            "method": "GET",
            "url": "https://api.vivalink.com/v1/subjects/:subjectId/measurements?metric=heart_rate",
            "params": [
              { "name": "subjectId", "value": "", "type": "path", "description": "The subject ID." },
              { "name": "metric", "value": "heart_rate", "type": "query", "description": "heart_rate | hrv | rr_interval | respiratory_rate | temperature | spo2 | blood_pressure | activity | ecg_waveform" },
              { "name": "start", "value": "", "type": "query", "description": "ISO-8601 start time." },
              { "name": "end", "value": "", "type": "query", "description": "ISO-8601 end time." }
            ]
          },
          "docs": "Retrieves time-ranged biometric measurements for a subject (modeled). Near-real-time reads are served over REST, not a public socket."
        },
        {
          "info": { "name": "Request a bulk data-file export", "type": "http" },
          "http": {
            "method": "POST",
            "url": "https://api.vivalink.com/v1/subjects/:subjectId/exports",
            "params": [
              { "name": "subjectId", "value": "", "type": "path", "description": "The subject ID." }
            ],
            "body": { "type": "json", "data": "{\"start\":\"\",\"end\":\"\",\"format\":\"csv\"}" }
          },
          "docs": "Requests a bulk export of a subject's raw biometric data (modeled)."
        }
      ]
    },
    {
      "info": { "name": "Devices", "type": "folder" },
      "items": [
        {
          "info": { "name": "List devices", "type": "http" },
          "http": { "method": "GET", "url": "https://api.vivalink.com/v1/devices" },
          "docs": "Lists VivaLNK wearable biosensors (modeled)."
        },
        {
          "info": { "name": "Retrieve a device", "type": "http" },
          "http": {
            "method": "GET",
            "url": "https://api.vivalink.com/v1/devices/:deviceId",
            "params": [
              { "name": "deviceId", "value": "", "type": "path", "description": "The device ID." }
            ]
          },
          "docs": "Retrieves a device by ID (modeled)."
        },
        {
          "info": { "name": "Assign a device to a subject", "type": "http" },
          "http": {
            "method": "PUT",
            "url": "https://api.vivalink.com/v1/devices/:deviceId/assignment",
            "params": [
              { "name": "deviceId", "value": "", "type": "path", "description": "The device ID." }
            ],
            "body": { "type": "json", "data": "{\"subjectId\":\"\"}" }
          },
          "docs": "Assigns a device to a subject (modeled)."
        }
      ]
    },
    {
      "info": { "name": "Webhooks", "type": "folder" },
      "items": [
        {
          "info": { "name": "List webhook subscriptions", "type": "http" },
          "http": { "method": "GET", "url": "https://api.vivalink.com/v1/webhooks" },
          "docs": "Lists webhook subscriptions (modeled)."
        },
        {
          "info": { "name": "Create a webhook subscription", "type": "http" },
          "http": {
            "method": "POST",
            "url": "https://api.vivalink.com/v1/webhooks",
            "body": { "type": "json", "data": "{\"url\":\"https://example.com/vivalink/webhook\",\"events\":[\"measurement.created\",\"alert.arrhythmia\"]}" }
          },
          "docs": "Registers an HTTPS endpoint to receive pushed biometric data and alert events (modeled)."
        }
      ]
    },
    {
      "info": { "name": "FHIR", "type": "folder" },
      "items": [
        {
          "info": { "name": "Search FHIR Observations", "type": "http" },
          "http": {
            "method": "GET",
            "url": "https://api.vivalink.com/fhir/Observation?patient=&code=",
            "params": [
              { "name": "patient", "value": "", "type": "query", "description": "FHIR Patient reference or subject identifier." },
              { "name": "code", "value": "", "type": "query", "description": "LOINC code for the vital sign." }
            ]
          },
          "docs": "Returns biometric measurements as HL7 FHIR R4 Observation resources (modeled)."
        }
      ]
    }
  ]
}
