For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get ECG data (Beta)

Each electrocardiogram (ECG) recording is stored as a measurement: one recording session with its own start and end time, a unique reference, and the voltage waveform of the recording as a health document. The ECG REST-API allows for data retrieval per end user.

There are two endpoints:

Endpoint
Use it to

POST /data/v6/electrocardiogram/list

Get all ECG recordings of a user within a time range

POST /data/v6/electrocardiogram

Get one specific ECG recording by its measurement reference

A typical flow is to call the list endpoint first to find a user's recordings, store each recording's measurement.reference, and use it later to fetch that specific recording again with the single ECG endpoint. Additional information, such as the derived heart rate or the recording device, can be added to the response with additionalDetails.

Supported data sources

Data source
Waveform
Heart rate
AFib (atrial fibrillation)

Apple Health

✓

✓

✓

Google Health

✓

✓

✓

Withings

✓

✓

✓

Polar

✓

✓

–

List ECG recordings in a time range

post

Looks up the end user by endUserId (access token) and returns all of their measurements that start within the requested time range, each with its ECG waveform (electrocardiogramData). Related epochs (e.g. heart rate, AFib) and device data are only returned when requested via additionalDetails.

Rules:

  • startTimestamp and endTimestamp must use the same format: both UNIX (epoch milliseconds) or both ISO-8601.

  • The range may be at most 31 days and must not be in the future.

  • The lower bound is extended by 24 hours internally, so recordings that started up to one day before startTimestamp can also be returned.

  • Results are not ordered and not paginated. If none are found, data is an empty list.

Header parameters
AuthorizationstringRequired

Basic Auth for your username:password. Required for all endpoints.

AppAuthorizationstringRequired

Basic Auth for your authID:authSecret. Required for all endpoints.

Body
endUserIdstringRequired

End user's access token.

startTimestampone ofRequired

Epoch milliseconds when timestampType is UNIX, ISO-8601 date-time when ISO.

endTimestampone ofRequired

Epoch milliseconds when timestampType is UNIX, ISO-8601 date-time when ISO.

dataSourceIdsinteger · int32[]Optional

Only return recordings from these Thryve data source IDs. All sources if omitted.

Example: [8]
Responses
200

ECG recordings found (may be an empty list)

application/json

Null fields are omitted.

endUserIdstringOptional

End user's access token.

endUserAliasstringOptional

Only present when endUserAlias was requested.

typestring · enumOptional

Response type identifier (ResponseType.ECG_LIST).

Possible values:
timestampTypestring · enumOptional

Case-insensitive. UNIX returns epoch milliseconds plus timezoneOffset; ISO returns ISO-8601 date-times with offset.

Possible values:
post/data/v6/electrocardiogram/list
POST /data/v6/electrocardiogram/list HTTP/1.1
Host: api.thryve.de
Authorization: text
AppAuthorization: text
Content-Type: application/json
Accept: */*
Content-Length: 108

{
  "endUserId": "3f1c2b0a9d8e4f7a8b6c5d4e3f2a1b0c",
  "startTimestamp": 1704067200000,
  "endTimestamp": 1704326400000
}
{
  "endUserId": "3f1c2b0a9d8e4f7a8b6c5d4e3f2a1b0c",
  "type": "response.data.electrocardiogram.list",
  "timestampType": "UNIX",
  "data": [
    {
      "dataSourceId": 8,
      "measurement": {
        "reference": 1234567890,
        "startTimestamp": 1704067200000,
        "endTimestamp": 1704067230000,
        "timezoneOffset": 60
      },
      "electrocardiogramData": {
        "unit": "mV",
        "samplingFrequencyHz": 500,
        "leads": {
          "I": [
            0.12,
            0.14,
            0.16,
            0.15,
            0.13
          ]
        }
      }
    },
    {
      "dataSourceId": 8,
      "measurement": {
        "reference": 1234567891,
        "startTimestamp": 1704153600000,
        "endTimestamp": 1704153630000,
        "timezoneOffset": 60
      },
      "electrocardiogramData": {
        "unit": "mV",
        "samplingFrequencyHz": 500,
        "leads": {
          "I": [
            0.11,
            0.13,
            0.15,
            0.14,
            0.12
          ]
        }
      }
    }
  ]
}

Get one ECG recording by measurement reference

post

Looks up the end user by endUserId (access token), loads the measurement identified by measurementReference, and always includes its ECG waveform (electrocardiogramData).

Related epochs (e.g. heart rate, AFib) and device data are only returned when requested via additionalDetails.

Header parameters
AuthorizationstringRequired

Basic Auth for your username:password. Required for all endpoints.

AppAuthorizationstringRequired

Basic Auth for your authID:authSecret. Required for all endpoints.

Body
endUserIdstringRequired

End user's access token (mapped to accessToken in code).

measurementReferenceinteger · int64Required

Reference of the ECG measurement, as stored by the consumer service.

timestampTypestring · enumRequired

Case-insensitive. UNIX returns epoch milliseconds plus timezoneOffset; ISO returns ISO-8601 date-times with offset.

Possible values:
Responses
200

ECG recording found

application/json

Null fields are omitted. Note: unlike the list endpoint, this single-recording response does not set timestampType.

endUserIdstringOptional

End user's access token.

endUserAliasstringOptional

Only present when endUserAlias was requested.

typestring · enumOptional

Response type identifier (ResponseType.ECG).

Possible values:
post/data/v6/electrocardiogram
POST /data/v6/electrocardiogram HTTP/1.1
Host: api.thryve.de
Authorization: text
AppAuthorization: text
Content-Type: application/json
Accept: */*
Content-Length: 105

{
  "endUserId": "3f1c2b0a9d8e4f7a8b6c5d4e3f2a1b0c",
  "measurementReference": 1234567890,
  "timestampType": "UNIX"
}
{
  "endUserId": "3f1c2b0a9d8e4f7a8b6c5d4e3f2a1b0c",
  "type": "response.data.electrocardiogram",
  "data": [
    {
      "dataSourceId": 8,
      "measurement": {
        "reference": 1234567890,
        "startTimestamp": 1704067200000,
        "endTimestamp": 1704067230000,
        "timezoneOffset": 60
      },
      "electrocardiogramData": {
        "unit": "mV",
        "samplingFrequencyHz": 500,
        "leads": {
          "I": [
            0.12,
            0.14,
            0.16,
            0.15,
            0.13
          ]
        }
      }
    }
  ]
}

Last updated