DATA MODEL (all modules) - Medisana/vitadock-api GitHub Wiki

Data types

Type Description Format Example
GUID 36 characters Standard GUID/UUID format 936DA01F-9ABD-4D9D-80C7-02AF85C822A8
Date Day yyyy-MM-dd e.g. 2013-05-17
Datetime Timestamp (UTC) in ms Integer e.g. 1342110577428 for Thu, 12 Jul 2012 18:29:37 GMT+2 (*)
String This is a string.
Float 36.8
Integer non-negative number 123

*http://www.epochconverter.com/

Required Values for requests

  • All underlined values have to be provided with each POST
  • All other values are optional, if they have no value (e.g. measurement not taken, user skipped manual entry etc.) they should not be set to some default value but instead be skipped when posting the JSON object
  • "Main values" describe values that can be created
  • Additional values are optional values that can be entered by the user, calculated out of the measurements or retrieved from the user settings 

General values

Data present in each type of measurement across all modules cases. See exceptions!

Friendly Name Parameter name Description Type Comment
Uuid id Unique identifier of an entry

GUID

ID is created by the server when receiving the entry.
Timestamp of measurement (miliseconds) measurement_date Timestamp (UTC, milliseconds) at which measurement was performed. Set by iOS device

DateTime

Timestamp (milliseconds) of last update updated_date Timestamp (UTC, milliseconds) at which result was transmitted to the server. DateTime This timestamp (milliseconds) will be used to sync latest measurements and is set by the server.

Version

version Specifies the number of changes on this entry

Integer

1: Initial version

Active flag

active Flag to specify if the specific item is active or if it was marked for removal on the server

Boolean

true: normal entry false: this entry was deleted

Additional values

Friendly Name Parameter name Description Type Comment
Activity status 1.) activity_status Activity status. Part of a user's comments for the current measurement

Integer

0: sick 1: resting 2: normal 3: active/sports
Mood 1.) mood Mood. Part of a user's comment for the current measurement

Integer

0: happy 1: neutral 2: sad
Meal status 1.) 2.) meal_status Meal status. Part of a user's comments for the current measurement

Integer

0: no meal / before meal 1: after meal
Note 1.) note Textual comment. Part of a user's comments for the current measurement

String

Maximum length of string is 512 characters
Module serial ID module_serial_id Serial number of the corresponding hardware module that measured the value (optional)

String

Maximum length of string is 32 characters
1.) Does not apply for GlucoDockInsulin and GlucoDockMeal 2.) Does not apply for ThermoDock, CardioDock
⚠️ **GitHub.com Fallback** ⚠️