Skip to content

Create or update a data source for a patient

Request

Internal endpoint to upsert patient data source provider details in all their associated clinic records.

Security
sessionToken
Path
userIdstring(Tidepool User ID)^([0-9a-f]{10}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-...read-onlyrequired

String representation of a Tidepool User ID. Old style IDs are 10-digit strings consisting of only hexadeximcal digits. New style IDs are 36-digit UUID v4

Bodyapplication/json
Array [
statestring(Data source connection state)required
Enum:"pending""pendingReconnect""connected""disconnected""error"
Example:"connected"
providerNamestring, [ 1 .. 100 ] characters(Provider Name)required
Example:"dexcom"
modifiedTimestring, (date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example:"2017-02-06T02:37:46Z"
expirationTimestring, (date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example:"2017-02-06T02:37:46Z"
latestDataTimestring, (date-time)(Time of the latest data point from this source)

RFC 3339 / ISO 8601 timestamp with timezone information

Example:"2017-02-06T02:37:46Z"
]
curl -i -X PUT \
  'https://tidepool.redocly.app/_mock/reference/clinic.v1/v1/patients/{userId}/data_sources' \
  -H 'Content-Type: application/json' \
  -H 'x-tidepool-session-token: YOUR_API_KEY_HERE' \
  -d '[
    {
      "state": "connected",
      "providerName": "dexcom",
      "modifiedTime": "2017-02-06T02:37:46Z",
      "expirationTime": "2017-02-06T02:37:46Z",
      "latestDataTime": "2017-02-06T02:37:46Z"
    }
  ]'

Responses

OK