API ReferenceapiclinicalPATCH /v1/wearables/metrics

PATCH /v1/wearables/metrics

Service: clinical · operationId: (none)

Update optimize-page visibility for wearable metrics

Required scopes

(no scope declared — review service config)

Request body

{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "provider": {
        "type": "string",
        "enum": [
          "apple_health_kit",
          "google_fit",
          "oura",
          "whoop",
          "eight_sleep",
          "dexcom",
          "freestyle_libre",
          "garmin"
        ]
      },
      "metric": {
        "type": "string",
        "minLength": 1
      },
      "show_on_optimize": {
        "type": "boolean"
      }
    },
    "required": [
      "provider",
      "metric",
      "show_on_optimize"
    ]
  }
}

Responses

200 Updated wearable metric visibility

{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "provider": {
        "type": "string"
      },
      "metric": {
        "type": "string"
      },
      "label": {
        "type": "string"
      },
      "value": {
        "type": "string"
      },
      "show_on_optimize": {
        "type": "boolean"
      }
    },
    "required": [
      "provider",
      "metric",
      "label",
      "value",
      "show_on_optimize"
    ]
  }
}

400 Validation error

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

404 Wearable connection not found

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

502 Upstream dependency error

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

Example

curl -X PATCH https://clinical.platform.loop.health/v1/wearables/metrics \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'