{"openapi":"3.2.0","info":{"contact":{"email":"hi@hedia.com","name":"Hedia ApS","url":"https://hedia.com"},"termsOfService":"https://www.hedia.com/terms-and-conditions","title":"Data API","version":"1.0.0","description":"Data Service API"},"servers":[{"url":"https://data.hedia.com/api/v1"}],"tags":[{"name":"Objects","description":"Manage objects.","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/operations#objects","description":"Documentation"}},{"name":"Permissions","description":"Manage permissions for objects.","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/operations#permissions","description":"Documentation"}}],"paths":{"/permissions/check":{"post":{"summary":"Check permissions","operationId":"checkPermissions","description":"Check if a security principal is authorized to perform the action.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckPermissionsRequestBody"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckPermissionsResponseBody"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"default":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"service":[]}],"tags":["Permissions"],"externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/operations/checkPermissions","description":"Documentation"}}},"/users/{userId}/objects":{"get":{"summary":"List objects","operationId":"listObjects","parameters":[{"$ref":"#/components/parameters/UserIdPathParameter"},{"$ref":"#/components/parameters/SkipQueryParameter"},{"$ref":"#/components/parameters/LimitQueryParameter"},{"$ref":"#/components/parameters/OrderQueryParameter"},{"$ref":"#/components/parameters/SortQueryParameter"},{"$ref":"#/components/parameters/StartDateQueryParameter"},{"$ref":"#/components/parameters/EndDateQueryParameter"},{"$ref":"#/components/parameters/TypeQueryParameter"},{"$ref":"#/components/parameters/SourcesQueryParameter"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectsArray"},"examples":{"objectsArray":{"$ref":"#/components/examples/ObjectsArray"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"default":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"app":[]}],"tags":["Objects"],"externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/operations/listObjects","description":"Documentation"}},"post":{"summary":"Create an object","operationId":"createObject","parameters":[{"$ref":"#/components/parameters/UserIdPathParameter"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewObjects"},"examples":{"bloodGlucoseSample":{"$ref":"#/components/examples/NewBloodGlucoseSample"},"bolusCalculationSample":{"$ref":"#/components/examples/NewBolusCalculationSample"},"diabetesTypeCharacteristic":{"$ref":"#/components/examples/NewDiabetesTypeCharacteristic"}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Objects"},"examples":{"bloodGlucoseSample":{"$ref":"#/components/examples/BloodGlucoseSample"},"bolusCalculationSample":{"$ref":"#/components/examples/BolusCalculationSample"},"diabetesTypeCharacteristic":{"$ref":"#/components/examples/DiabetesTypeCharacteristic"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"default":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"app":[]}],"tags":["Objects"],"externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/operations/createObject","description":"Documentation"}}},"/users/{userId}/objects/{objectId}":{"parameters":[{"$ref":"#/components/parameters/UserIdPathParameter"},{"$ref":"#/components/parameters/ObjectIdPathParameter"}],"delete":{"summary":"Delete an object","operationId":"deleteObject","responses":{"204":{"$ref":"#/components/responses/NoContent"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"app":[]}],"tags":["Objects"],"externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/operations/deleteObject","description":"Documentation"}},"get":{"summary":"Get an object","operationId":"getObject","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Objects"},"examples":{"bloodGlucoseSample":{"$ref":"#/components/examples/BloodGlucoseSample"},"bolusCalculationSample":{"$ref":"#/components/examples/BolusCalculationSample"},"diabetesTypeCharacteristic":{"$ref":"#/components/examples/DiabetesTypeCharacteristic"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"app":[]}],"tags":["Objects"],"externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/operations/getObject","description":"Documentation"}}},"/users/{userId}/quantity-samples":{"get":{"summary":"List quantity samples","operationId":"listQuantitySamples","parameters":[{"$ref":"#/components/parameters/UserIdPathParameter"},{"$ref":"#/components/parameters/SkipQueryParameter"},{"$ref":"#/components/parameters/LimitQueryParameter"},{"$ref":"#/components/parameters/OrderQueryParameter"},{"$ref":"#/components/parameters/SortQueryParameter"},{"$ref":"#/components/parameters/StartDateQueryParameter"},{"$ref":"#/components/parameters/EndDateQueryParameter"},{"$ref":"#/components/parameters/QuantitySampleTypeQueryParameter"},{"$ref":"#/components/parameters/SourcesQueryParameter"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompactQuantitySampleArray"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"default":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"app":[]}],"tags":["Objects"],"externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/operations/listQuantitySamples","description":"Documentation"}}}},"components":{"securitySchemes":{"app":{"description":"An Application Bearer JSON Web Token. The token should include an issuer (the app ID), a software version (a string) and an audience (the API URL). The public key should be uploaded to developer website in the app keys section.","type":"http","scheme":"bearer","bearerFormat":"JWT"},"service":{"description":"A Service Bearer JSON Web Token.","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PermissionAction":{"title":"Permission Action","description":"The action property grant access to different endpoints.","type":"string","enum":["read","write"],"$id":"./components/schemas/PermissionAction","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/PermissionAction","description":"Documentation"}},"PermissionScope":{"title":"Permission Scope","description":"The scope property grant access to a specific set of data.","type":"string","enum":["biologicalSex","bloodGlucose","bloodGlucoseTarget","bloodType","bolusCalculation","carbohydrates","carbohydratesRecommendation","dateOfBirth","diabetesType","insulinDelivery","insulinOnBoard","insulinRecommendation","insulinReduction","insulinSensitivity","insulinToCarbohydratesRatio","interstitialGlucose"],"$id":"./components/schemas/PermissionScope","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/PermissionScope","description":"Documentation"}},"ApplicationSecurityPrincipal":{"title":"Application Security Principal","description":"An application security principal object.","type":"object","properties":{"id":{"type":"string","format":"uuid","examples":["f6c8e76c-d8a3-4339-879a-4a626edba805"]},"type":{"const":"app"}},"required":["id","type"],"additionalProperties":false,"$id":"./components/schemas/ApplicationSecurityPrincipal","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/ApplicationSecurityPrincipal","description":"Documentation"}},"UserSecurityPrincipal":{"title":"User Security Principal","description":"A user security principal object.","type":"object","properties":{"id":{"type":"string","format":"uuid","examples":["f6c8e76c-d8a3-4339-879a-4a626edba805"]},"type":{"const":"user"}},"required":["id","type"],"additionalProperties":false,"$id":"./components/schemas/UserSecurityPrincipal","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/UserSecurityPrincipal","description":"Documentation"}},"SystemSecurityPrincipal":{"title":"System Security Principal","description":"A system security principal object. System security principal does not have an ID.","type":"object","properties":{"id":{"type":"null"},"type":{"const":"system"}},"required":["id","type"],"additionalProperties":false,"$id":"./components/schemas/SystemSecurityPrincipal","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/SystemSecurityPrincipal","description":"Documentation"}},"SecurityPrincipal":{"title":"SecurityPrincipal","description":"An object representing a security principal, which can be an app, user or system. System security principal does not have an ID","type":"object","oneOf":[{"$ref":"#/components/schemas/ApplicationSecurityPrincipal"},{"$ref":"#/components/schemas/UserSecurityPrincipal"},{"$ref":"#/components/schemas/SystemSecurityPrincipal"}],"$id":"./components/schemas/SecurityPrincipal","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/SecurityPrincipal","description":"Documentation"}},"CheckPermissionsRequestBody":{"type":"object","properties":{"action":{"$ref":"#/components/schemas/PermissionAction"},"scope":{"$ref":"#/components/schemas/PermissionScope"},"principal":{"$ref":"#/components/schemas/SecurityPrincipal"},"resourceCreatorId":{"type":"string","format":"uuid","examples":["f6c8e76c-d8a3-4339-879a-4a626edba805"]},"resourceOwnerId":{"type":"string","format":"uuid","examples":["34de05f1-ecb3-4dea-ab16-81e1a584ebfb"]}},"required":["action","scope","principal","resourceCreatorId","resourceOwnerId"],"$id":"./components/schemas/CheckPermissionsRequestBody","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/CheckPermissionsRequestBody","description":"Documentation"}},"CheckPermissionsResponseBody":{"type":"object","properties":{"isAuthorized":{"type":"boolean","description":"Indicates whether the security principal is authorized to perform the action."}},"required":["isAuthorized"],"$id":"./components/schemas/CheckPermissionsResponseBody","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/CheckPermissionsResponseBody","description":"Documentation"}},"UserId":{"title":"User ID","type":"string","format":"uuid","examples":["70c09d76-e53c-470f-916a-ef33706382b4"],"$id":"./components/schemas/UserId","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/UserId","description":"Documentation"}},"Skip":{"title":"Skip","type":"number","minimum":0,"default":0,"examples":[100],"$id":"./components/schemas/Skip","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/Skip","description":"Documentation"}},"Limit":{"title":"Limit","type":"number","minimum":1,"maximum":1000,"default":100,"$id":"./components/schemas/Limit","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/Limit","description":"Documentation"}},"Order":{"title":"Order","type":"string","default":"asc","enum":["asc","desc"],"$id":"./components/schemas/Order","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/Order","description":"Documentation"}},"Sort":{"title":"Sort","type":"string","default":"createdAt","enum":["createdAt","startDate"],"$id":"./components/schemas/Sort","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/Sort","description":"Documentation"}},"StartDate":{"title":"Start Date","type":"string","format":"date-time","examples":["2024-01-01T00:00:00Z"],"$id":"./components/schemas/StartDate","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/StartDate","description":"Documentation"}},"EndDate":{"title":"End Date","type":"string","format":"date-time","examples":["2024-01-31T00:00:00Z"],"$id":"./components/schemas/EndDate","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/EndDate","description":"Documentation"}},"BiologicalSexCharacteristicType":{"title":"Biological Sex Characteristic Type","description":"A constant used for biological sex characteristics.","type":"string","const":"biologicalSex","$id":"./components/schemas/BiologicalSexCharacteristicType","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/BiologicalSexCharacteristicType","description":"Documentation"}},"BloodGlucoseSampleType":{"title":"Blood Glucose Sample Type","description":"A constant used for blood glucose samples.","type":"string","const":"bloodGlucose","$id":"./components/schemas/BloodGlucoseSampleType","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/BloodGlucoseSampleType","description":"Documentation"}},"BloodGlucoseTargetSampleType":{"title":"Blood Glucose Target Sample Type","description":"A constant used for blood glucose target samples.","type":"string","const":"bloodGlucoseTarget","$id":"./components/schemas/BloodGlucoseTargetSampleType","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/BloodGlucoseTargetSampleType","description":"Documentation"}},"BloodTypeCharacteristicType":{"title":"Blood Type Characteristic Type","description":"A constant used for blood type characteristics.","type":"string","const":"bloodType","$id":"./components/schemas/BloodTypeCharacteristicType","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/BloodTypeCharacteristicType","description":"Documentation"}},"BolusCalculationSampleType":{"title":"Bolus Calculation Sample Type","description":"A constant used for bolus calculation samples.","type":"string","const":"bolusCalculation","$id":"./components/schemas/BolusCalculationSampleType","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/BolusCalculationSampleType","description":"Documentation"}},"CarbohydratesRecommendationSampleType":{"title":"Carbohydrates Recommendation Sample Type","description":"A constant used for carbohydrates recommendation samples.","type":"string","const":"carbohydratesRecommendation","$id":"./components/schemas/CarbohydratesRecommendationSampleType","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/CarbohydratesRecommendationSampleType","description":"Documentation"}},"CarbohydratesSampleType":{"title":"Carbohydrates Sample Type","description":"A constant used for carbohydrates samples.","type":"string","const":"carbohydrates","$id":"./components/schemas/CarbohydratesSampleType","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/CarbohydratesSampleType","description":"Documentation"}},"DateOfBirthCharacteristicType":{"title":"Date Of Birth Characteristic Type","description":"A constant used for date of birth characteristics.","type":"string","const":"dateOfBirth","$id":"./components/schemas/DateOfBirthCharacteristicType","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/DateOfBirthCharacteristicType","description":"Documentation"}},"DiabetesTypeCharacteristicType":{"title":"Diabetes Type Characteristic Type","description":"A constant used for diabetes type characteristics.","type":"string","const":"diabetesType","$id":"./components/schemas/DiabetesTypeCharacteristicType","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/DiabetesTypeCharacteristicType","description":"Documentation"}},"InsulinDeliverySampleType":{"title":"Insulin Delivery Sample Type","description":"A constant used for insulin delivery samples.","type":"string","const":"insulinDelivery","$id":"./components/schemas/InsulinDeliverySampleType","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinDeliverySampleType","description":"Documentation"}},"InsulinOnBoardSampleType":{"title":"Insulin On Board Sample Type","description":"A constant used for insulin on board samples.","type":"string","const":"insulinOnBoard","$id":"./components/schemas/InsulinOnBoardSampleType","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinOnBoardSampleType","description":"Documentation"}},"InsulinRecommendationSampleType":{"title":"Insulin Recommendation Sample Type","description":"A constant used for insulin recommendation samples.","type":"string","const":"insulinRecommendation","$id":"./components/schemas/InsulinRecommendationSampleType","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinRecommendationSampleType","description":"Documentation"}},"InsulinReductionSampleType":{"title":"Insulin Reduction Sample Type","description":"A constant used for insulin reduction samples.","type":"string","const":"insulinReduction","$id":"./components/schemas/InsulinReductionSampleType","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinReductionSampleType","description":"Documentation"}},"InsulinSensitivitySampleType":{"title":"Insulin Sensitivity Sample Type","description":"A constant used for insulin sensitivity samples.","type":"string","const":"insulinSensitivity","$id":"./components/schemas/InsulinSensitivitySampleType","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinSensitivitySampleType","description":"Documentation"}},"InsulinToCarbohydratesRatioSampleType":{"title":"Insulin To Carbohydrates Ratio Sample Type","description":"A constant used for insulin to carbohydrates ratio samples.","type":"string","const":"insulinToCarbohydratesRatio","$id":"./components/schemas/InsulinToCarbohydratesRatioSampleType","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinToCarbohydratesRatioSampleType","description":"Documentation"}},"InterstitialGlucoseSampleType":{"title":"Interstitial Glucose Sample Type","description":"A constant used for interstitial glucose samples.","type":"string","const":"interstitialGlucose","$id":"./components/schemas/InterstitialGlucoseSampleType","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InterstitialGlucoseSampleType","description":"Documentation"}},"Type":{"title":"Type","type":"string","oneOf":[{"$ref":"#/components/schemas/BiologicalSexCharacteristicType"},{"$ref":"#/components/schemas/BloodGlucoseSampleType"},{"$ref":"#/components/schemas/BloodGlucoseTargetSampleType"},{"$ref":"#/components/schemas/BloodTypeCharacteristicType"},{"$ref":"#/components/schemas/BolusCalculationSampleType"},{"$ref":"#/components/schemas/CarbohydratesRecommendationSampleType"},{"$ref":"#/components/schemas/CarbohydratesSampleType"},{"$ref":"#/components/schemas/DateOfBirthCharacteristicType"},{"$ref":"#/components/schemas/DiabetesTypeCharacteristicType"},{"$ref":"#/components/schemas/InsulinDeliverySampleType"},{"$ref":"#/components/schemas/InsulinOnBoardSampleType"},{"$ref":"#/components/schemas/InsulinRecommendationSampleType"},{"$ref":"#/components/schemas/InsulinReductionSampleType"},{"$ref":"#/components/schemas/InsulinSensitivitySampleType"},{"$ref":"#/components/schemas/InsulinToCarbohydratesRatioSampleType"},{"$ref":"#/components/schemas/InterstitialGlucoseSampleType"}],"$id":"./components/schemas/Type","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/Type","description":"Documentation"}},"SourceId":{"title":"Source ID","description":"The source's identifier.","type":"string","format":"uuid","examples":["f6c8e76c-d8a3-4339-879a-4a626edba805"],"$id":"./components/schemas/SourceId","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/SourceId","description":"Documentation"}},"SourcesArray":{"title":"Sources","description":"A list of data sources.","type":"array","items":{"$ref":"#/components/schemas/SourceId"},"$id":"./components/schemas/SourcesArray","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/SourcesArray","description":"Documentation"}},"ObjectId":{"title":"Object ID","type":"string","format":"uuid","examples":["f906f26b-6a0c-4c72-97f2-c9ad8701f730"],"$id":"./components/schemas/ObjectId","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/ObjectId","description":"Documentation"}},"ObjectType":{"title":"Object Type","type":"string","examples":["bloodGlucose","bolusCalculation","diabetesType"],"$id":"./components/schemas/ObjectType","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/ObjectType","description":"Documentation"}},"DeviceId":{"title":"Device Id","description":"An identifier that uniquely identifies the device object on the hardware running this code.","type":"string","maxLength":256,"examples":["34de05f1-ecb3-4dea-ab16-81e1a584ebfb"],"$id":"./components/schemas/DeviceId","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/DeviceId","description":"Documentation"}},"DeviceFirmwareVersion":{"title":"Device Firmware Version","description":"An arbitrary string representing the current version of the firmware running on the device.","type":"string","maxLength":256,"examples":["3.0.5"],"$id":"./components/schemas/DeviceFirmwareVersion","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/DeviceFirmwareVersion","description":"Documentation"}},"DeviceHardwareVersion":{"title":"Device Hardware Version","description":"An arbitrary string representing the hardware version of the device.","type":"string","maxLength":256,"examples":["6.1.0"],"$id":"./components/schemas/DeviceHardwareVersion","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/DeviceHardwareVersion","description":"Documentation"}},"DeviceManufacturer":{"title":"Device Manufacturer","description":"A string representing the device's manufacturer.","type":"string","maxLength":256,"examples":["Novo Nordisk A/S"],"$id":"./components/schemas/DeviceManufacturer","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/DeviceManufacturer","description":"Documentation"}},"DeviceModel":{"title":"Device Model","description":"A string representing the device's model.","type":"string","maxLength":256,"examples":["NovoPen 6"],"$id":"./components/schemas/DeviceModel","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/DeviceModel","description":"Documentation"}},"DeviceName":{"title":"Device Name","description":"The user-facing name for the device.","type":"string","maxLength":256,"examples":["NovoPen"],"$id":"./components/schemas/DeviceName","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/DeviceName","description":"Documentation"}},"DeviceSoftwareVersion":{"title":"Device Software Version","description":"An arbitrary string representing the version of the software running on the device.","type":"string","maxLength":256,"examples":["8.1.2"],"$id":"./components/schemas/DeviceSoftwareVersion","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/DeviceSoftwareVersion","description":"Documentation"}},"Device":{"title":"Device","description":"Devices include Continuous Glucose Monitors, Bolus Calculators, and any other health or fitness peripherals that produce the sample data stored in HDS. Device objects are immutable: You set the device's properties when you create the Device object, and they cannot change.","type":"object","properties":{"id":{"$ref":"#/components/schemas/DeviceId"},"firmwareVersion":{"$ref":"#/components/schemas/DeviceFirmwareVersion"},"hardwareVersion":{"$ref":"#/components/schemas/DeviceHardwareVersion"},"manufacturer":{"$ref":"#/components/schemas/DeviceManufacturer"},"model":{"$ref":"#/components/schemas/DeviceModel"},"name":{"$ref":"#/components/schemas/DeviceName"},"softwareVersion":{"$ref":"#/components/schemas/DeviceSoftwareVersion"}},"required":["name"],"additionalProperties":false,"examples":[{"id":"34de05f1-ecb3-4dea-ab16-81e1a584ebfb","firmwareVersion":"3.0.5","hardwareVersion":"6.1.0","manufacturer":"Novo Nordisk A/S","model":"NovoPen 6","name":"NovoPen","softwareVersion":"8.1.2"}],"$id":"./components/schemas/Device","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/Device","description":"Documentation"}},"MetadataExternalId":{"title":"Metadata External ID","description":"A unique identifier for an object that is set by its source.","type":"object","properties":{"externalId":{"type":"string","examples":["EX123"]}},"$id":"./components/schemas/MetadataExternalId","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/MetadataExternalId","description":"Documentation"}},"MetadataTimeZone":{"title":"Metadata TimeZone","description":"The Time Zone for an object. Accepts either an IANA time zone identifier (e.g., \"Europe/Copenhagen\") or a UTC offset in ISO 8601 format (e.g., \"-08:00\").","type":"object","properties":{"timeZone":{"type":"string","examples":["Europe/Copenhagen","-08:00"]}},"$id":"./components/schemas/MetadataTimeZone","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/MetadataTimeZone","description":"Documentation"}},"MetadataUserEntered":{"title":"Metadata User Entered","description":"The User Entered indicates whether the sample was entered by the user.","properties":{"userEntered":{"type":"boolean","examples":[false]}},"$id":"./components/schemas/MetadataUserEntered","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/MetadataUserEntered","description":"Documentation"}},"MetadataBoolean":{"title":"Metadata Boolean","type":"boolean","examples":[true],"$id":"./components/schemas/MetadataBoolean","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/MetadataBoolean","description":"Documentation"}},"MetadataNumber":{"title":"Metadata Number","type":"number","examples":[100],"$id":"./components/schemas/MetadataNumber","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/MetadataNumber","description":"Documentation"}},"MetadataString":{"title":"Metadata String","type":"string","maxLength":2048,"examples":["abc"],"$id":"./components/schemas/MetadataString","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/MetadataString","description":"Documentation"}},"ObjectMetadata":{"title":"Object Metadata","description":"The metadata for an object.","type":"object","allOf":[{"$ref":"#/components/schemas/MetadataExternalId"},{"$ref":"#/components/schemas/MetadataTimeZone"},{"$ref":"#/components/schemas/MetadataUserEntered"}],"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/MetadataBoolean"},{"$ref":"#/components/schemas/MetadataNumber"},{"$ref":"#/components/schemas/MetadataString"}]},"maxProperties":100,"examples":[{"externalId":"EX123","timeZone":"Europe/Copenhagen","userEntered":false,"property1":true,"property2":100,"property3":"abc"}],"$id":"./components/schemas/ObjectMetadata","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/ObjectMetadata","description":"Documentation"}},"SourceName":{"title":"Source Name","description":"The source app name.","type":"string","maxLength":256,"examples":["hda"],"$id":"./components/schemas/SourceName","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/SourceName","description":"Documentation"}},"SourceVersion":{"title":"Source Version","description":"A string that identifies a particular version of the source.","type":"string","maxLength":256,"examples":["2.18.0"],"$id":"./components/schemas/SourceVersion","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/SourceVersion","description":"Documentation"}},"Source":{"title":"Source","description":"An object indicating the source of a HDS object.","type":"object","properties":{"id":{"$ref":"#/components/schemas/SourceId"},"name":{"$ref":"#/components/schemas/SourceName"},"version":{"$ref":"#/components/schemas/SourceVersion"}},"required":["id","name","version"],"additionalProperties":false,"examples":[{"id":"f6c8e76c-d8a3-4339-879a-4a626edba805","name":"hda","version":"2.18.0"}],"$id":"./components/schemas/Source","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/Source","description":"Documentation"}},"CreatedAt":{"title":"Created At","type":"string","format":"date-time","examples":["2024-01-29T13:15:40.390Z"],"$id":"./components/schemas/CreatedAt","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/CreatedAt","description":"Documentation"}},"Object":{"title":"Object","type":"object","properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"userId":{"$ref":"#/components/schemas/UserId"},"type":{"$ref":"#/components/schemas/ObjectType"},"device":{"$ref":"#/components/schemas/Device"},"metadata":{"$ref":"#/components/schemas/ObjectMetadata"},"source":{"$ref":"#/components/schemas/Source"},"createdAt":{"$ref":"#/components/schemas/CreatedAt"}},"required":["id","userId","type","source","createdAt"],"examples":[{"id":"f906f26b-6a0c-4c72-97f2-c9ad8701f730","userId":"70c09d76-e53c-470f-916a-ef33706382b4","type":"object","metadata":{"externalId":"EX123","timeZone":"Europe/Copenhagen","userEntered":false,"property1":true,"property2":123,"property3":"abc"},"device":{"id":"34de05f1-ecb3-4dea-ab16-81e1a584ebfb","firmwareVersion":"3.0.5","hardwareVersion":"6.1.0","manufacturer":"Novo Nordisk A/S","model":"NovoPen 6","name":"NovoPen","softwareVersion":"8.1.2"},"source":{"id":"f6c8e76c-d8a3-4339-879a-4a626edba805","name":"hda","version":"2.18.0"},"createdAt":"2024-01-29T13:15:40.390Z"}],"$id":"./components/schemas/Object","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/Object","description":"Documentation"}},"Characteristic":{"title":"Characteristic","description":"A characteristic represents a piece of data that rarely changes.","type":"object","allOf":[{"$ref":"#/components/schemas/Object"}],"examples":[{"id":"f906f26b-6a0c-4c72-97f2-c9ad8701f730","userId":"70c09d76-e53c-470f-916a-ef33706382b4","type":"characteristic","metadata":{},"device":{"name":"Example device"},"source":{"id":"f6c8e76c-d8a3-4339-879a-4a626edba805","name":"hda","version":"2.18.0"},"createdAt":"2024-01-29T13:15:40.390Z"}],"$id":"./components/schemas/Characteristic","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/Characteristic","description":"Documentation"}},"BiologicalSex":{"title":"Biological Sex","description":"Enum indicating the user's biological sex. A person's biological sex is a combination of bodily characteristics including: chromosomes, hormones, internal and external reproductive organs, and secondary sex characteristics.","type":"string","enum":["female","male","other"],"$id":"./components/schemas/BiologicalSex","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/BiologicalSex","description":"Documentation"}},"BiologicalSexCharacteristic":{"title":"Biological Sex Characteristic","description":"A characteristic representing the user's biological sex.","type":"object","properties":{"biologicalSex":{"$ref":"#/components/schemas/BiologicalSex"},"type":{"$ref":"#/components/schemas/BiologicalSexCharacteristicType"}},"required":["biologicalSex"],"allOf":[{"$ref":"#/components/schemas/Characteristic"}],"$id":"./components/schemas/BiologicalSexCharacteristic","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/BiologicalSexCharacteristic","description":"Documentation"}},"SampleStartDate":{"title":"Sample Start Date","description":"The sample's start date.","type":"string","format":"date-time","examples":["2024-01-29T13:15:38.098Z"],"$id":"./components/schemas/SampleStartDate","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/SampleStartDate","description":"Documentation"}},"SampleEndDate":{"title":"Sample End Date","description":"The sample's end date.","type":"string","format":"date-time","examples":["2024-01-29T13:15:39.412Z"],"$id":"./components/schemas/SampleEndDate","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/SampleEndDate","description":"Documentation"}},"Sample":{"title":"Sample","description":"An object representing a piece of data associated with a start and end time.","type":"object","properties":{"startDate":{"$ref":"#/components/schemas/SampleStartDate"},"endDate":{"$ref":"#/components/schemas/SampleEndDate"}},"required":["startDate","endDate"],"allOf":[{"$ref":"#/components/schemas/Object"}],"examples":[{"id":"f906f26b-6a0c-4c72-97f2-c9ad8701f730","userId":"70c09d76-e53c-470f-916a-ef33706382b4","type":"sample","startDate":"2024-01-29T13:15:38.098Z","endDate":"2024-01-29T13:15:39.412Z","metadata":{},"device":{"name":"Example device"},"source":{"id":"f6c8e76c-d8a3-4339-879a-4a626edba805","name":"hda","version":"2.18.0"},"createdAt":"2024-01-29T13:15:40.390Z"}],"$id":"./components/schemas/Sample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/Sample","description":"Documentation"}},"QuantityUnit":{"title":"Quantity Unit","description":"The quantity's unit.","type":"string","examples":["mg/dL"],"$id":"./components/schemas/QuantityUnit","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/QuantityUnit","description":"Documentation"}},"QuantityValue":{"title":"Quantity Value","description":"The quantity's value.","type":"number","examples":[100],"$id":"./components/schemas/QuantityValue","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/QuantityValue","description":"Documentation"}},"Quantity":{"title":"Quantity","description":"An object that stores a value for a given unit.","type":"object","properties":{"unit":{"$ref":"#/components/schemas/QuantityUnit"},"value":{"$ref":"#/components/schemas/QuantityValue"}},"required":["unit","value"],"additionalProperties":false,"$id":"./components/schemas/Quantity","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/Quantity","description":"Documentation"}},"QuantitySample":{"title":"Quantity Sample","description":"A sample representing a quantity associated with a start and end time.","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/Quantity"}},"required":["quantity"],"allOf":[{"$ref":"#/components/schemas/Sample"}],"examples":[{"id":"f906f26b-6a0c-4c72-97f2-c9ad8701f730","userId":"70c09d76-e53c-470f-916a-ef33706382b4","type":"quantitySample","startDate":"2024-01-29T13:15:38.098Z","endDate":"2024-01-29T13:15:39.412Z","quantity":{"unit":"mg/dL","value":100},"metadata":{},"device":{"name":"Example device"},"source":{"id":"f6c8e76c-d8a3-4339-879a-4a626edba805","name":"hda","version":"2.18.0"},"createdAt":"2024-01-29T13:15:40.390Z"}],"$id":"./components/schemas/QuantitySample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/QuantitySample","description":"Documentation"}},"GlucoseMilligramsPerDeciliterQuantity":{"title":"Glucose Quantity (mg/dL)","properties":{"unit":{"title":"Milligrams per deciliter","type":"string","const":"mg/dL"},"value":{"type":"number","minimum":0,"maximum":900}},"allOf":[{"$ref":"#/components/schemas/Quantity"}],"$id":"./components/schemas/GlucoseMilligramsPerDeciliterQuantity","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/GlucoseMilligramsPerDeciliterQuantity","description":"Documentation"}},"GlucoseMillimolesPerLiterQuantity":{"title":"Glucose Quantity (mmol/L)","properties":{"unit":{"title":"Millimoles per liter","type":"string","const":"mmol/L"},"value":{"type":"number","minimum":0,"maximum":49}},"allOf":[{"$ref":"#/components/schemas/Quantity"}],"$id":"./components/schemas/GlucoseMillimolesPerLiterQuantity","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/GlucoseMillimolesPerLiterQuantity","description":"Documentation"}},"GlucoseQuantity":{"title":"Glucose Quantity","oneOf":[{"$ref":"#/components/schemas/GlucoseMilligramsPerDeciliterQuantity"},{"$ref":"#/components/schemas/GlucoseMillimolesPerLiterQuantity"}],"$id":"./components/schemas/GlucoseQuantity","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/GlucoseQuantity","description":"Documentation"}},"BloodGlucoseMealTime":{"title":"Blood Glucose Meal Time","description":"An enum that indicates the relative timing of a blood glucose reading to a meal.","type":"string","enum":["postprandial","preprandial"],"$id":"./components/schemas/BloodGlucoseMealTime","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/BloodGlucoseMealTime","description":"Documentation"}},"MetadataBloodGlucoseMealTime":{"title":"Metadata Blood Glucose Meal Time","description":"A key that indicates the relative timing of a blood glucose reading to a meal.","type":"object","properties":{"bloodGlucoseMealTime":{"$ref":"#/components/schemas/BloodGlucoseMealTime"}},"$id":"./components/schemas/MetadataBloodGlucoseMealTime","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/MetadataBloodGlucoseMealTime","description":"Documentation"}},"BloodGlucoseSampleMetadata":{"title":"Blood Glucose Sample Metadata","type":"object","allOf":[{"$ref":"#/components/schemas/MetadataBloodGlucoseMealTime"}],"$id":"./components/schemas/BloodGlucoseSampleMetadata","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/BloodGlucoseSampleMetadata","description":"Documentation"}},"BloodGlucoseSample":{"title":"Blood Glucose Sample","description":"A quantity sample that measures the user's blood glucose level. These samples use mass/volume units and measure discrete values.","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/GlucoseQuantity"},"type":{"$ref":"#/components/schemas/BloodGlucoseSampleType"},"metadata":{"$ref":"#/components/schemas/BloodGlucoseSampleMetadata"}},"allOf":[{"$ref":"#/components/schemas/QuantitySample"}],"$id":"./components/schemas/BloodGlucoseSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/BloodGlucoseSample","description":"Documentation"}},"MetadataBloodGlucoseTargetProfile":{"title":"Metadata Blood Glucose Target Profile","description":"The blood glucose target profile expressed in mmol/L.","type":"object","properties":{"bloodGlucoseTargetProfile":{"type":"string","examples":["6:00=5.5,12:00=6.0,18:00=5.0,22:00=4.5"]}},"$id":"./components/schemas/MetadataBloodGlucoseTargetProfile","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/MetadataBloodGlucoseTargetProfile","description":"Documentation"}},"BloodGlucoseTargetSampleMetadata":{"title":"Blood Glucose Target Sample Metadata","type":"object","allOf":[{"$ref":"#/components/schemas/MetadataBloodGlucoseTargetProfile"}],"$id":"./components/schemas/BloodGlucoseTargetSampleMetadata","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/BloodGlucoseTargetSampleMetadata","description":"Documentation"}},"BloodGlucoseTargetSample":{"title":"Blood Glucose Target Sample","description":"A quantity sample type that measures the user's target blood glucose.","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/GlucoseQuantity"},"type":{"$ref":"#/components/schemas/BloodGlucoseTargetSampleType"},"metadata":{"$ref":"#/components/schemas/BloodGlucoseTargetSampleMetadata"}},"allOf":[{"$ref":"#/components/schemas/QuantitySample"}],"$id":"./components/schemas/BloodGlucoseTargetSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/BloodGlucoseTargetSample","description":"Documentation"}},"BloodType":{"title":"Blood Type","description":"Enum indicating the user's blood type.","type":"string","enum":["abNegative","abPositive","ANegative","aPositive","bNegative","bPositive","oNegative","oPositive"],"$id":"./components/schemas/BloodType","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/BloodType","description":"Documentation"}},"BloodTypeCharacteristic":{"title":"Blood Type Characteristic","description":"A characteristic representing the user's blood type.","type":"object","properties":{"bloodType":{"$ref":"#/components/schemas/BloodType"},"type":{"$ref":"#/components/schemas/BloodTypeCharacteristicType"}},"required":["bloodType"],"allOf":[{"$ref":"#/components/schemas/Characteristic"}],"$id":"./components/schemas/BloodTypeCharacteristic","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/BloodTypeCharacteristic","description":"Documentation"}},"CorrelationSample":{"title":"Correlation Sample","description":"A sample representing multiple samples.","type":"object","properties":{"objects":{"type":"array","items":{"$ref":"#/components/schemas/ObjectId"}}},"required":["objects"],"allOf":[{"$ref":"#/components/schemas/Sample"}],"$id":"./components/schemas/CorrelationSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/CorrelationSample","description":"Documentation"}},"BolusCalculationSample":{"title":"Bolus Calculation Sample","description":"A correlation sample that represents a bolus calculation.","type":"object","properties":{"type":{"$ref":"#/components/schemas/BolusCalculationSampleType"}},"allOf":[{"$ref":"#/components/schemas/CorrelationSample"}],"$id":"./components/schemas/BolusCalculationSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/BolusCalculationSample","description":"Documentation"}},"CarbohydratesQuantity":{"title":"Carbohydrates Quantity","properties":{"unit":{"title":"Grams","type":"string","const":"g"},"value":{"type":"number","minimum":0,"maximum":1500,"examples":[10]}},"allOf":[{"$ref":"#/components/schemas/Quantity"}],"$id":"./components/schemas/CarbohydratesQuantity","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/CarbohydratesQuantity","description":"Documentation"}},"CarbohydratesRecommendationSample":{"title":"Carbohydrates Recommendation Sample","description":"A quantity sample type that measures carbohydrates recommendation.","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/CarbohydratesQuantity"},"type":{"$ref":"#/components/schemas/CarbohydratesRecommendationSampleType"}},"allOf":[{"$ref":"#/components/schemas/QuantitySample"}],"$id":"./components/schemas/CarbohydratesRecommendationSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/CarbohydratesRecommendationSample","description":"Documentation"}},"MetadataFoodIntakeId":{"title":"Metadata Food Intake Id","description":"A reference to a food intake recorded in Food Service.\n\nThe referenced food intake must be consistent with the sample that links to it: its start and end dates must encompass the sample timestamp, and any derived values must agree (e.g. the total carbohydrates calculated from the food intake should match the quantity of an associated carbohydrates sample).\n","type":"object","properties":{"foodIntakeId":{"type":"string","format":"uuid","examples":["20dc51eb-53a2-4211-9871-e481d23ca531"]}},"$id":"./components/schemas/MetadataFoodIntakeId","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/MetadataFoodIntakeId","description":"Documentation"}},"CarbohydratesSampleMetadata":{"title":"Carbohydrates Sample Metadata","type":"object","allOf":[{"$ref":"#/components/schemas/MetadataFoodIntakeId"}],"$id":"./components/schemas/CarbohydratesSampleMetadata","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/CarbohydratesSampleMetadata","description":"Documentation"}},"CarbohydratesSample":{"title":"Carbohydrates Sample","description":"A quantity sample that measures the amount of carbohydrates consumed.","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/CarbohydratesQuantity"},"type":{"$ref":"#/components/schemas/CarbohydratesSampleType"},"metadata":{"$ref":"#/components/schemas/CarbohydratesSampleMetadata"}},"allOf":[{"$ref":"#/components/schemas/QuantitySample"}],"$id":"./components/schemas/CarbohydratesSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/CarbohydratesSample","description":"Documentation"}},"DateOfBirth":{"title":"Date Of Birth","type":"string","format":"Date","examples":["1970-01-01"],"$id":"./components/schemas/DateOfBirth","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/DateOfBirth","description":"Documentation"}},"DateOfBirthCharacteristic":{"title":"Date Of Birth Characteristic","description":"A characteristic representing the user's date of birth.","type":"object","properties":{"dateOfBirth":{"$ref":"#/components/schemas/DateOfBirth"},"type":{"$ref":"#/components/schemas/DateOfBirthCharacteristicType"}},"required":["dateOfBirth"],"allOf":[{"$ref":"#/components/schemas/Characteristic"}],"$id":"./components/schemas/DateOfBirthCharacteristic","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/DateOfBirthCharacteristic","description":"Documentation"}},"DiabetesType":{"title":"Diabetes Type","description":"Enum indicating the user's diabetes type.","type":"string","enum":["type1","type2","gestationalDiabetes"],"$id":"./components/schemas/DiabetesType","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/DiabetesType","description":"Documentation"}},"DiabetesTypeCharacteristic":{"title":"Diabetes Type Characteristic","description":"A characteristic representing the users's diabetes type.","type":"object","properties":{"diabetesType":{"$ref":"#/components/schemas/DiabetesType"},"type":{"$ref":"#/components/schemas/DiabetesTypeCharacteristicType"}},"required":["diabetesType"],"allOf":[{"$ref":"#/components/schemas/Characteristic"}],"$id":"./components/schemas/DiabetesTypeCharacteristic","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/DiabetesTypeCharacteristic","description":"Documentation"}},"InsulinQuantity":{"title":"Insulin Quantity","properties":{"unit":{"title":"Units","type":"string","const":"units"},"value":{"type":"number","minimum":0,"maximum":500}},"allOf":[{"$ref":"#/components/schemas/Quantity"}],"$id":"./components/schemas/InsulinQuantity","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinQuantity","description":"Documentation"}},"MetadataInsulinDeliveryReason":{"title":"Metadata Insulin Delivery Reason","description":"The medical reason for administering insulin.","type":"object","properties":{"insulinDeliveryReason":{"oneOf":[{"title":"Basal","const":"basal","description":"The long-acting insulin that is admistered once or twice a day."},{"title":"Bolus","const":"bolus","description":"The short-acting insulin that is admistered at mealtime."}]}},"$id":"./components/schemas/MetadataInsulinDeliveryReason","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/MetadataInsulinDeliveryReason","description":"Documentation"}},"InsulinDeliverySampleMetadata":{"title":"Insulin Delivery Sample Metadata","type":"object","allOf":[{"$ref":"#/components/schemas/MetadataInsulinDeliveryReason"}],"$id":"./components/schemas/InsulinDeliverySampleMetadata","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinDeliverySampleMetadata","description":"Documentation"}},"InsulinDeliverySample":{"title":"Insulin Delivery Sample","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/InsulinQuantity"},"type":{"$ref":"#/components/schemas/InsulinDeliverySampleType"},"metadata":{"$ref":"#/components/schemas/InsulinDeliverySampleMetadata"}},"allOf":[{"$ref":"#/components/schemas/QuantitySample"}],"$id":"./components/schemas/InsulinDeliverySample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinDeliverySample","description":"Documentation"}},"InsulinOnBoardSample":{"title":"Insulin on Board (IoB) Sample","description":"A quantity sample type that measures the user's Insulin on Board.","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/InsulinQuantity"},"type":{"$ref":"#/components/schemas/InsulinOnBoardSampleType"}},"allOf":[{"$ref":"#/components/schemas/QuantitySample"}],"$id":"./components/schemas/InsulinOnBoardSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinOnBoardSample","description":"Documentation"}},"InsulinRecommendationSampleMetadata":{"title":"Insulin Recommendation Sample Metadata","type":"object","allOf":[{"$ref":"#/components/schemas/MetadataInsulinDeliveryReason"}],"$id":"./components/schemas/InsulinRecommendationSampleMetadata","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinRecommendationSampleMetadata","description":"Documentation"}},"InsulinRecommendationSample":{"title":"Insulin Recommendation Sample","description":"A quantity sample type that measures insulin recommendation.","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/InsulinQuantity"},"type":{"$ref":"#/components/schemas/InsulinRecommendationSampleType"},"metadata":{"$ref":"#/components/schemas/InsulinRecommendationSampleMetadata"}},"allOf":[{"$ref":"#/components/schemas/QuantitySample"}],"$id":"./components/schemas/InsulinRecommendationSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinRecommendationSample","description":"Documentation"}},"InsulinReductionQuantity":{"title":"Insulin Reduction Quantity","description":"The insulin reduction quantity indicates how much the insulin recommendation has been reduced. 25 means a 25% reduction.","properties":{"unit":{"title":"Percent","type":"string","const":"percent"},"value":{"type":"number","minimum":0,"maximum":100,"examples":[25]}},"allOf":[{"$ref":"#/components/schemas/Quantity"}],"$id":"./components/schemas/InsulinReductionQuantity","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinReductionQuantity","description":"Documentation"}},"MetadataInsulinReductionReason":{"title":"Metadata Insulin Reduction Reason","type":"object","properties":{"insulinReductionReason":{"type":"string","enum":["physicalActivity"]}},"$id":"./components/schemas/MetadataInsulinReductionReason","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/MetadataInsulinReductionReason","description":"Documentation"}},"InsulinReductionSampleMetadata":{"title":"Insulin Reduction Sample Metadata","type":"object","allOf":[{"$ref":"#/components/schemas/MetadataInsulinReductionReason"}],"$id":"./components/schemas/InsulinReductionSampleMetadata","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinReductionSampleMetadata","description":"Documentation"}},"InsulinReductionSample":{"title":"Insulin Reduction Factor Sample","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/InsulinReductionQuantity"},"type":{"$ref":"#/components/schemas/InsulinReductionSampleType"},"metadata":{"$ref":"#/components/schemas/InsulinReductionSampleMetadata"}},"allOf":[{"$ref":"#/components/schemas/QuantitySample"}],"$id":"./components/schemas/InsulinReductionSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinReductionSample","description":"Documentation"}},"InsulinSensitivityMilligramsPerDeciliterPerUnitQuantity":{"title":"Insulin Sensitivity Quantity (mg/dL/unit)","properties":{"unit":{"title":"Milligrams per deciliter per unit","type":"string","const":"(mg/dL)/unit"},"value":{"type":"number","minimum":0,"maximum":270}},"allOf":[{"$ref":"#/components/schemas/Quantity"}],"$id":"./components/schemas/InsulinSensitivityMilligramsPerDeciliterPerUnitQuantity","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinSensitivityMilligramsPerDeciliterPerUnitQuantity","description":"Documentation"}},"InsulinSensitivityMillimolesPerLiterPerUnitQuantity":{"title":"Insulin Sensitivity Quantity (mmol/L/unit)","properties":{"unit":{"title":"Millimoles per liter per unit","type":"string","const":"(mmol/L)/unit"},"value":{"type":"number","minimum":0,"maximum":22}},"allOf":[{"$ref":"#/components/schemas/Quantity"}],"$id":"./components/schemas/InsulinSensitivityMillimolesPerLiterPerUnitQuantity","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinSensitivityMillimolesPerLiterPerUnitQuantity","description":"Documentation"}},"InsulinSensitivityQuantity":{"title":"Insulin Sensitivity Quantity","oneOf":[{"$ref":"#/components/schemas/InsulinSensitivityMilligramsPerDeciliterPerUnitQuantity"},{"$ref":"#/components/schemas/InsulinSensitivityMillimolesPerLiterPerUnitQuantity"}],"$id":"./components/schemas/InsulinSensitivityQuantity","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinSensitivityQuantity","description":"Documentation"}},"MetadataInsulinSensitivityProfile":{"title":"Metadata Insulin Sensitivity Profile","description":"The insulin sensitivity profile expressed in mmol/L.","type":"object","properties":{"insulinSensitivityProfile":{"type":"string","examples":["6:00=5.5,12:00=6.0,18:00=5.0,22:00=4.5"]}},"$id":"./components/schemas/MetadataInsulinSensitivityProfile","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/MetadataInsulinSensitivityProfile","description":"Documentation"}},"InsulinSensitivitySampleMetadata":{"title":"Insulin Sensitivity Sample Metadata","type":"object","allOf":[{"$ref":"#/components/schemas/MetadataInsulinSensitivityProfile"}],"$id":"./components/schemas/InsulinSensitivitySampleMetadata","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinSensitivitySampleMetadata","description":"Documentation"}},"InsulinSensitivitySample":{"title":"Insulin Sensitivity Factor (ISF) Sample","description":"A quantity sample type that measures the user's blood glucose level. These samples use mass/volume units and measure discrete values.","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/InsulinSensitivityQuantity"},"type":{"$ref":"#/components/schemas/InsulinSensitivitySampleType"},"metadata":{"$ref":"#/components/schemas/InsulinSensitivitySampleMetadata"}},"allOf":[{"$ref":"#/components/schemas/QuantitySample"}],"$id":"./components/schemas/InsulinSensitivitySample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinSensitivitySample","description":"Documentation"}},"InsulinToCarbohydratesRatioQuantity":{"title":"Insulin To Carbohydrates Ratio Quantity","properties":{"unit":{"title":"Grams/Unit","type":"string","const":"g/unit"},"value":{"type":"number","minimum":0,"maximum":500}},"allOf":[{"$ref":"#/components/schemas/Quantity"}],"$id":"./components/schemas/InsulinToCarbohydratesRatioQuantity","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinToCarbohydratesRatioQuantity","description":"Documentation"}},"MetadataInsulinToCarbohydratesRatioProfile":{"title":"Metadata Insulin To Carbohydrates Ratio Profile","description":"The insulin to carbohydrates ratio profile expressed in mmol/L.","type":"object","properties":{"insulinToCarbohydratesRatioProfile":{"type":"string","examples":["6:00=5.5,12:00=6.0,18:00=5.0,22:00=4.5"]}},"$id":"./components/schemas/MetadataInsulinToCarbohydratesRatioProfile","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/MetadataInsulinToCarbohydratesRatioProfile","description":"Documentation"}},"InsulinToCarbohydratesRatioSampleMetadata":{"title":"Insulin To Carbohydrates Ratio Metadata","type":"object","allOf":[{"$ref":"#/components/schemas/MetadataInsulinToCarbohydratesRatioProfile"}],"$id":"./components/schemas/InsulinToCarbohydratesRatioSampleMetadata","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinToCarbohydratesRatioSampleMetadata","description":"Documentation"}},"InsulinToCarbohydratesRatioSample":{"title":"Insulin To Carbohydrates Ratio Sample","description":"A quantity sample type that measures the user's blood glucose level. These samples use mass/volume units and measure discrete values.","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/InsulinToCarbohydratesRatioQuantity"},"type":{"$ref":"#/components/schemas/InsulinToCarbohydratesRatioSampleType"},"metadata":{"$ref":"#/components/schemas/InsulinToCarbohydratesRatioSampleMetadata"}},"allOf":[{"$ref":"#/components/schemas/QuantitySample"}],"$id":"./components/schemas/InsulinToCarbohydratesRatioSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InsulinToCarbohydratesRatioSample","description":"Documentation"}},"MetadataBolusable":{"title":"Metadata Bolusable","type":"object","properties":{"bolusable":{"type":"boolean","description":"Indicates whether the sample can be used for a bolus calculation."}},"$id":"./components/schemas/MetadataBolusable","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/MetadataBolusable","description":"Documentation"}},"MetadataCalibrated":{"title":"Metadata Calibrated","type":"object","properties":{"calibrated":{"type":"boolean","description":"Indicates whether the forecast model has been calibrated, ensuring the accuracy and reliability of the sample value."}},"$id":"./components/schemas/MetadataCalibrated","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/MetadataCalibrated","description":"Documentation"}},"MetadataForecast":{"title":"Metadata Forecast","type":"object","properties":{"forecast":{"type":"boolean","description":"Indicates whether the sample is a forecasted value."}},"$id":"./components/schemas/MetadataForecast","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/MetadataForecast","description":"Documentation"}},"MetadataHypoglycemia":{"title":"Metadata Hypoglycemia","type":"object","properties":{"hypoglycemia":{"type":"boolean","description":"Indicates whether the sample predicts a hypoglycemic event."}},"$id":"./components/schemas/MetadataHypoglycemia","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/MetadataHypoglycemia","description":"Documentation"}},"InterstitialGlucoseSampleMetadata":{"title":"Interstitial Glucose Sample Metadata","type":"object","allOf":[{"$ref":"#/components/schemas/MetadataBolusable"},{"$ref":"#/components/schemas/MetadataCalibrated"},{"$ref":"#/components/schemas/MetadataForecast"},{"$ref":"#/components/schemas/MetadataHypoglycemia"}],"$id":"./components/schemas/InterstitialGlucoseSampleMetadata","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InterstitialGlucoseSampleMetadata","description":"Documentation"}},"InterstitialGlucoseSample":{"title":"Interstitial Glucose Sample","description":"A quantity sample that measures the user's interstitial glucose level. These samples use mass/volume units and measure discrete values.","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/GlucoseQuantity"},"type":{"$ref":"#/components/schemas/InterstitialGlucoseSampleType"},"metadata":{"$ref":"#/components/schemas/InterstitialGlucoseSampleMetadata"}},"allOf":[{"$ref":"#/components/schemas/QuantitySample"}],"$id":"./components/schemas/InterstitialGlucoseSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/InterstitialGlucoseSample","description":"Documentation"}},"Objects":{"title":"Objects","type":"object","oneOf":[{"$ref":"#/components/schemas/BiologicalSexCharacteristic"},{"$ref":"#/components/schemas/BloodGlucoseSample"},{"$ref":"#/components/schemas/BloodGlucoseTargetSample"},{"$ref":"#/components/schemas/BloodTypeCharacteristic"},{"$ref":"#/components/schemas/BolusCalculationSample"},{"$ref":"#/components/schemas/CarbohydratesRecommendationSample"},{"$ref":"#/components/schemas/CarbohydratesSample"},{"$ref":"#/components/schemas/DateOfBirthCharacteristic"},{"$ref":"#/components/schemas/DiabetesTypeCharacteristic"},{"$ref":"#/components/schemas/InsulinDeliverySample"},{"$ref":"#/components/schemas/InsulinOnBoardSample"},{"$ref":"#/components/schemas/InsulinRecommendationSample"},{"$ref":"#/components/schemas/InsulinReductionSample"},{"$ref":"#/components/schemas/InsulinSensitivitySample"},{"$ref":"#/components/schemas/InsulinToCarbohydratesRatioSample"},{"$ref":"#/components/schemas/InterstitialGlucoseSample"}],"$id":"./components/schemas/Objects","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/Objects","description":"Documentation"}},"ObjectsArray":{"title":"Objects Array","type":"array","items":{"$ref":"#/components/schemas/Objects"},"$id":"./components/schemas/ObjectsArray","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/ObjectsArray","description":"Documentation"}},"NewObject":{"title":"New Object","type":"object","properties":{"type":{"$ref":"#/components/schemas/ObjectType"},"device":{"$ref":"#/components/schemas/Device"},"metadata":{"$ref":"#/components/schemas/ObjectMetadata"}},"required":["type"],"examples":[{"type":"object","metadata":{"externalId":"EX123","timeZone":"Europe/Copenhagen","userEntered":false,"property1":true,"property2":123,"property3":"abc"},"device":{"id":"34de05f1-ecb3-4dea-ab16-81e1a584ebfb","firmwareVersion":"3.0.5","hardwareVersion":"6.1.0","manufacturer":"Novo Nordisk A/S","model":"NovoPen 6","name":"NovoPen","softwareVersion":"8.1.2"}}],"$id":"./components/schemas/NewObject","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewObject","description":"Documentation"}},"NewCharacteristic":{"title":"New Characteristic","type":"object","properties":{},"allOf":[{"$ref":"#/components/schemas/NewObject"}],"examples":[{"type":"characteristic","metadata":{},"device":{"name":"Example device"}}],"$id":"./components/schemas/NewCharacteristic","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewCharacteristic","description":"Documentation"}},"NewBiologicalSexCharacteristic":{"title":"New Biological Sex Characteristic","description":"A new characteristic representing biological sex.","type":"object","properties":{"biologicalSex":{"$ref":"#/components/schemas/BiologicalSex"},"type":{"$ref":"#/components/schemas/BiologicalSexCharacteristicType"}},"required":["biologicalSex"],"allOf":[{"$ref":"#/components/schemas/NewCharacteristic"}],"$id":"./components/schemas/NewBiologicalSexCharacteristic","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewBiologicalSexCharacteristic","description":"Documentation"}},"NewSample":{"title":"New Sample","type":"object","properties":{"startDate":{"$ref":"#/components/schemas/SampleStartDate"},"endDate":{"$ref":"#/components/schemas/SampleEndDate"}},"required":["startDate","endDate"],"allOf":[{"$ref":"#/components/schemas/NewObject"}],"examples":[{"type":"sample","startDate":"2024-01-29T13:15:38.098Z","endDate":"2024-01-29T13:15:39.412Z","metadata":{},"device":{"name":"Example device"}}],"$id":"./components/schemas/NewSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewSample","description":"Documentation"}},"NewQuantitySample":{"title":"New Quantity Sample","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/Quantity"}},"required":["quantity"],"allOf":[{"$ref":"#/components/schemas/NewSample"}],"examples":[{"type":"quantitySample","startDate":"2024-01-29T13:15:38.098Z","endDate":"2024-01-29T13:15:39.412Z","quantity":{"unit":"mg/dL","value":100},"metadata":{},"device":{"name":"Example device"}}],"$id":"./components/schemas/NewQuantitySample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewQuantitySample","description":"Documentation"}},"NewBloodGlucoseSample":{"title":"New Blood Glucose Sample","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/GlucoseQuantity"},"type":{"$ref":"#/components/schemas/BloodGlucoseSampleType"},"metadata":{"$ref":"#/components/schemas/BloodGlucoseSampleMetadata"}},"allOf":[{"$ref":"#/components/schemas/NewQuantitySample"}],"$id":"./components/schemas/NewBloodGlucoseSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewBloodGlucoseSample","description":"Documentation"}},"NewBloodGlucoseTargetSample":{"title":"New Blood Glucose Target Sample","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/GlucoseQuantity"},"type":{"$ref":"#/components/schemas/BloodGlucoseTargetSampleType"},"metadata":{"$ref":"#/components/schemas/BloodGlucoseTargetSampleMetadata"}},"allOf":[{"$ref":"#/components/schemas/NewQuantitySample"}],"$id":"./components/schemas/NewBloodGlucoseTargetSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewBloodGlucoseTargetSample","description":"Documentation"}},"NewBloodTypeCharacteristic":{"title":"New Blood Type Characteristic","description":"A new characteristic representing a blood type.","type":"object","properties":{"bloodType":{"$ref":"#/components/schemas/BloodType"},"type":{"$ref":"#/components/schemas/BloodTypeCharacteristicType"}},"required":["bloodType"],"allOf":[{"$ref":"#/components/schemas/NewCharacteristic"}],"$id":"./components/schemas/NewBloodTypeCharacteristic","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewBloodTypeCharacteristic","description":"Documentation"}},"NewCorrelationSample":{"title":"New Correlation Sample","type":"object","properties":{"objects":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/NewQuantitySample"},{"$ref":"#/components/schemas/ObjectId"}]}}},"required":["objects"],"allOf":[{"$ref":"#/components/schemas/NewSample"}],"$id":"./components/schemas/NewCorrelationSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewCorrelationSample","description":"Documentation"}},"NewCarbohydratesRecommendationSample":{"title":"New Carbohydrates Recommendation Sample","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/CarbohydratesQuantity"},"type":{"$ref":"#/components/schemas/CarbohydratesRecommendationSampleType"}},"allOf":[{"$ref":"#/components/schemas/NewQuantitySample"}],"$id":"./components/schemas/NewCarbohydratesRecommendationSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewCarbohydratesRecommendationSample","description":"Documentation"}},"NewCarbohydratesSample":{"title":"New Carbohydrates Sample","description":"A new quantity sample that measures the amount of carbohydrates consumed.","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/CarbohydratesQuantity"},"type":{"$ref":"#/components/schemas/CarbohydratesSampleType"},"metadata":{"$ref":"#/components/schemas/CarbohydratesSampleMetadata"}},"allOf":[{"$ref":"#/components/schemas/NewQuantitySample"}],"$id":"./components/schemas/NewCarbohydratesSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewCarbohydratesSample","description":"Documentation"}},"NewInsulinDeliverySample":{"title":"New Insulin Delivery Sample","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/InsulinQuantity"},"type":{"$ref":"#/components/schemas/InsulinDeliverySampleType"},"metadata":{"$ref":"#/components/schemas/InsulinDeliverySampleMetadata"}},"allOf":[{"$ref":"#/components/schemas/NewQuantitySample"}],"$id":"./components/schemas/NewInsulinDeliverySample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewInsulinDeliverySample","description":"Documentation"}},"NewInsulinOnBoardSample":{"title":"New Insulin on Board (IoB) Sample","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/InsulinQuantity"},"type":{"$ref":"#/components/schemas/InsulinOnBoardSampleType"}},"allOf":[{"$ref":"#/components/schemas/NewQuantitySample"}],"$id":"./components/schemas/NewInsulinOnBoardSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewInsulinOnBoardSample","description":"Documentation"}},"NewInsulinRecommendationSample":{"title":"New Insulin Recommendation Sample","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/InsulinQuantity"},"type":{"$ref":"#/components/schemas/InsulinRecommendationSampleType"},"metadata":{"$ref":"#/components/schemas/InsulinRecommendationSampleMetadata"}},"allOf":[{"$ref":"#/components/schemas/NewQuantitySample"}],"$id":"./components/schemas/NewInsulinRecommendationSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewInsulinRecommendationSample","description":"Documentation"}},"NewInsulinReductionSample":{"title":"New Insulin Reduction Factor Sample","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/InsulinReductionQuantity"},"type":{"$ref":"#/components/schemas/InsulinReductionSampleType"}},"allOf":[{"$ref":"#/components/schemas/NewQuantitySample"}],"$id":"./components/schemas/NewInsulinReductionSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewInsulinReductionSample","description":"Documentation"}},"NewInsulinSensitivitySample":{"title":"New Insulin Sensitivity Factor (ISF) Sample","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/InsulinSensitivityQuantity"},"type":{"$ref":"#/components/schemas/InsulinSensitivitySampleType"},"metadata":{"$ref":"#/components/schemas/InsulinSensitivitySampleMetadata"}},"allOf":[{"$ref":"#/components/schemas/NewQuantitySample"}],"$id":"./components/schemas/NewInsulinSensitivitySample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewInsulinSensitivitySample","description":"Documentation"}},"NewInsulinToCarbohydratesRatioSample":{"title":"New Insulin To Carbohydrates Ratio Sample","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/InsulinToCarbohydratesRatioQuantity"},"type":{"$ref":"#/components/schemas/InsulinToCarbohydratesRatioSampleType"},"metadata":{"$ref":"#/components/schemas/InsulinToCarbohydratesRatioSampleMetadata"}},"allOf":[{"$ref":"#/components/schemas/NewQuantitySample"}],"$id":"./components/schemas/NewInsulinToCarbohydratesRatioSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewInsulinToCarbohydratesRatioSample","description":"Documentation"}},"NewBolusCalculationSample":{"title":"New Bolus Calculation Sample","description":"A new correlation sample that represents a bolus calculation.","type":"object","properties":{"type":{"$ref":"#/components/schemas/BolusCalculationSampleType"},"objects":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/ObjectId"},{"$ref":"#/components/schemas/NewBloodGlucoseSample"},{"$ref":"#/components/schemas/NewBloodGlucoseTargetSample"},{"$ref":"#/components/schemas/NewCarbohydratesRecommendationSample"},{"$ref":"#/components/schemas/NewCarbohydratesSample"},{"$ref":"#/components/schemas/NewInsulinDeliverySample"},{"$ref":"#/components/schemas/NewInsulinOnBoardSample"},{"$ref":"#/components/schemas/NewInsulinRecommendationSample"},{"$ref":"#/components/schemas/NewInsulinReductionSample"},{"$ref":"#/components/schemas/NewInsulinSensitivitySample"},{"$ref":"#/components/schemas/NewInsulinToCarbohydratesRatioSample"}]},"minItems":3,"maxItems":10,"uniqueItems":true}},"allOf":[{"$ref":"#/components/schemas/NewCorrelationSample"}],"$id":"./components/schemas/NewBolusCalculationSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewBolusCalculationSample","description":"Documentation"}},"NewDateOfBirthCharacteristic":{"title":"New Date Of Birth Characteristic","description":"A new characteristic representing the user's date of birth.","type":"object","properties":{"dateOfBirth":{"$ref":"#/components/schemas/DateOfBirth"},"type":{"$ref":"#/components/schemas/DateOfBirthCharacteristicType"}},"required":["dateOfBirth"],"allOf":[{"$ref":"#/components/schemas/NewCharacteristic"}],"$id":"./components/schemas/NewDateOfBirthCharacteristic","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewDateOfBirthCharacteristic","description":"Documentation"}},"NewDiabetesTypeCharacteristic":{"title":"New Diabetes Type Characteristic","description":"A characteristic representing the user's diabetes type.","type":"object","properties":{"diabetesType":{"$ref":"#/components/schemas/DiabetesType"},"type":{"$ref":"#/components/schemas/DiabetesTypeCharacteristicType"}},"required":["diabetesType"],"allOf":[{"$ref":"#/components/schemas/NewCharacteristic"}],"$id":"./components/schemas/NewDiabetesTypeCharacteristic","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewDiabetesTypeCharacteristic","description":"Documentation"}},"NewInterstitialGlucoseSample":{"title":"New Interstitial Glucose Sample","type":"object","properties":{"quantity":{"$ref":"#/components/schemas/GlucoseQuantity"},"type":{"$ref":"#/components/schemas/InterstitialGlucoseSampleType"},"metadata":{"$ref":"#/components/schemas/InterstitialGlucoseSampleMetadata"}},"allOf":[{"$ref":"#/components/schemas/NewQuantitySample"}],"$id":"./components/schemas/NewInterstitialGlucoseSample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewInterstitialGlucoseSample","description":"Documentation"}},"NewObjects":{"title":"New Objects","type":"object","oneOf":[{"$ref":"#/components/schemas/NewBiologicalSexCharacteristic"},{"$ref":"#/components/schemas/NewBloodGlucoseSample"},{"$ref":"#/components/schemas/NewBloodGlucoseTargetSample"},{"$ref":"#/components/schemas/NewBloodTypeCharacteristic"},{"$ref":"#/components/schemas/NewBolusCalculationSample"},{"$ref":"#/components/schemas/NewCarbohydratesRecommendationSample"},{"$ref":"#/components/schemas/NewCarbohydratesSample"},{"$ref":"#/components/schemas/NewDateOfBirthCharacteristic"},{"$ref":"#/components/schemas/NewDiabetesTypeCharacteristic"},{"$ref":"#/components/schemas/NewInsulinDeliverySample"},{"$ref":"#/components/schemas/NewInsulinOnBoardSample"},{"$ref":"#/components/schemas/NewInsulinRecommendationSample"},{"$ref":"#/components/schemas/NewInsulinReductionSample"},{"$ref":"#/components/schemas/NewInsulinSensitivitySample"},{"$ref":"#/components/schemas/NewInsulinToCarbohydratesRatioSample"},{"$ref":"#/components/schemas/NewInterstitialGlucoseSample"}],"$id":"./components/schemas/NewObjects","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/NewObjects","description":"Documentation"}},"QuantitySampleType":{"title":"Quantity Sample Type","type":"string","oneOf":[{"$ref":"#/components/schemas/BloodGlucoseSampleType"},{"$ref":"#/components/schemas/BloodGlucoseTargetSampleType"},{"$ref":"#/components/schemas/CarbohydratesRecommendationSampleType"},{"$ref":"#/components/schemas/CarbohydratesSampleType"},{"$ref":"#/components/schemas/InsulinDeliverySampleType"},{"$ref":"#/components/schemas/InsulinOnBoardSampleType"},{"$ref":"#/components/schemas/InsulinRecommendationSampleType"},{"$ref":"#/components/schemas/InsulinReductionSampleType"},{"$ref":"#/components/schemas/InsulinSensitivitySampleType"},{"$ref":"#/components/schemas/InsulinToCarbohydratesRatioSampleType"},{"$ref":"#/components/schemas/InterstitialGlucoseSampleType"}],"$id":"./components/schemas/QuantitySampleType","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/QuantitySampleType","description":"Documentation"}},"CompactQuantitySample":{"title":"Compact Quantity Sample","description":"A quantity sample stripped of all non-essential fields.","type":"object","properties":{"startDate":{"$ref":"#/components/schemas/SampleStartDate"},"endDate":{"$ref":"#/components/schemas/SampleEndDate"},"quantity":{"$ref":"#/components/schemas/Quantity"}},"required":["startDate","endDate","quantity"],"additionalProperties":false,"$id":"./components/schemas/CompactQuantitySample","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/CompactQuantitySample","description":"Documentation"}},"CompactQuantitySampleArray":{"title":"Compact Quantity Sample Array","description":"A list of compact quantity samples.","type":"array","items":{"$ref":"#/components/schemas/CompactQuantitySample"},"$id":"./components/schemas/CompactQuantitySampleArray","externalDocs":{"url":"https://developer.hedia.com/services/data/api/v1/components/schemas/CompactQuantitySampleArray","description":"Documentation"}}},"responses":{"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{},"application/problem+json":{}}},"BadRequest":{"description":"Bad Request","content":{"application/json":{},"application/problem+json":{}}},"Unauthorized":{"description":"Unauthorized","content":{"application/json":{},"application/problem+json":{}}},"Forbidden":{"description":"Forbidden","content":{"application/json":{},"application/problem+json":{}}},"UnsupportedMediaType":{"description":"Unsupported Media Type","content":{"application/json":{},"application/problem+json":{}}},"NotFound":{"description":"Not Found","content":{"application/json":{},"application/problem+json":{}}},"NoContent":{"description":"No Content"}},"parameters":{"UserIdPathParameter":{"name":"userId","description":"The unique identifier of the user.","in":"path","required":true,"schema":{"$ref":"#/components/schemas/UserId"}},"SkipQueryParameter":{"name":"skip","description":"The skip parameter is used to skip a number of results.","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Skip"}},"LimitQueryParameter":{"name":"limit","description":"The limit parameter is used to limit the number of results returned.","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},"OrderQueryParameter":{"name":"order","description":"The order parameter is used to select which results should come first.","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Order"}},"SortQueryParameter":{"name":"sort","description":"The sort parameter is used to specify the order in which results should be returned.","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Sort"}},"StartDateQueryParameter":{"name":"startDate","description":"The start date of the range to filter results. Only results created on or after this date will be returned.","in":"query","required":false,"schema":{"$ref":"#/components/schemas/StartDate"}},"EndDateQueryParameter":{"name":"endDate","description":"The end date of the range to filter results. Only results created on or before this date will be returned.","in":"query","required":false,"schema":{"$ref":"#/components/schemas/EndDate"}},"TypeQueryParameter":{"name":"type","description":"The type parameter is used to filter objects by type.","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Type"}},"SourcesQueryParameter":{"name":"sources","description":"The sources parameter is used to filter objects by source.","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SourcesArray"}},"ObjectIdPathParameter":{"name":"objectId","description":"The object's identifier.","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ObjectId"}},"QuantitySampleTypeQueryParameter":{"name":"type","description":"The type parameter is used to filter quantity samples by type.","in":"query","required":true,"schema":{"$ref":"#/components/schemas/QuantitySampleType"}}},"examples":{"ObjectsArray":{"summary":"List of Objects","value":[{"id":"f906f26b-6a0c-4c72-97f2-c9ad8701f730","userId":"70c09d76-e53c-470f-916a-ef33706382b4","type":"bloodGlucose","quantity":{"unit":"mg/dL","value":100},"startDate":"2024-01-29T13:15:38.098Z","endDate":"2024-01-29T13:15:38.098Z","metadata":{"bloodGlucoseMealTime":"postprandial","externalId":"EX123","timeZone":"Europe/Copenhagen","userEntered":false,"property1":true,"property2":123,"property3":"abc"},"device":{"id":"34de05f1-ecb3-4dea-ab16-81e1a584ebfb","firmwareVersion":"3.0.5","hardwareVersion":"6.1.0","manufacturer":"Novo Nordisk A/S","model":"NovoPen 6","name":"NovoPen","softwareVersion":"8.1.2"},"source":{"id":"f6c8e76c-d8a3-4339-879a-4a626edba805","name":"hda","version":"2.18.0"},"createdAt":"2024-01-29T13:15:40.390Z"},{"id":"d7a5b8b4-03a9-4f78-8685-3848199ec826","userId":"70c09d76-e53c-470f-916a-ef33706382b4","type":"bolusCalculation","objects":["83f05666-3668-451f-abfb-8d50f244367d","dce70c6e-6108-40e3-b9cd-3deaeae80bfb","f906f26b-6a0c-4c72-97f2-c9ad8701f730"],"startDate":"2024-01-29T13:15:39.412Z","endDate":"2024-01-29T13:15:39.412Z","device":{"name":"HDA"},"metadata":{"externalId":"EX124","timeZone":"Europe/Copenhagen"},"source":{"id":"f6c8e76c-d8a3-4339-879a-4a626edba805","name":"hda","version":"2.18.0"},"createdAt":"2024-01-29T13:15:40.390Z"},{"id":"ce1b534c-df77-455c-9bd6-6d4fe32600aa","userId":"70c09d76-e53c-470f-916a-ef33706382b4","type":"diabetesType","diabetesType":"type1","source":{"id":"f6c8e76c-d8a3-4339-879a-4a626edba805","name":"hda","version":"2.18.0"},"createdAt":"2024-01-29T13:15:40.390Z"}]},"NewBloodGlucoseSample":{"summary":"New Blood Glucose Sample","value":{"type":"bloodGlucose","quantity":{"unit":"mg/dL","value":100},"startDate":"2024-01-29T13:15:38.098Z","endDate":"2024-01-29T13:15:38.098Z","metadata":{"bloodGlucoseMealTime":"postprandial","externalId":"EX123","timeZone":"Europe/Copenhagen","userEntered":false,"property1":true,"property2":123,"property3":"abc"},"device":{"id":"34de05f1-ecb3-4dea-ab16-81e1a584ebfb","firmwareVersion":"3.0.5","hardwareVersion":"6.1.0","manufacturer":"Novo Nordisk A/S","model":"NovoPen 6","name":"NovoPen","softwareVersion":"8.1.2"}}},"NewBolusCalculationSample":{"summary":"New Bolus Calculation Sample","value":{"type":"bolusCalculation","objects":["83f05666-3668-451f-abfb-8d50f244367d","dce70c6e-6108-40e3-b9cd-3deaeae80bfb",{"type":"bloodGlucose","quantity":{"unit":"mg/dL","value":100},"startDate":"2024-01-29T13:15:38.098Z","endDate":"2024-01-29T13:15:38.098Z","metadata":{"bloodGlucoseMealTime":"postprandial","externalId":"EX123","timeZone":"Europe/Copenhagen","userEntered":false,"property1":true,"property2":123,"property3":"abc"},"device":{"id":"34de05f1-ecb3-4dea-ab16-81e1a584ebfb","firmwareVersion":"3.0.5","hardwareVersion":"6.1.0","manufacturer":"Novo Nordisk A/S","model":"NovoPen 6","name":"NovoPen","softwareVersion":"8.1.2"}},{"type":"insulinRecommendation","quantity":{"unit":"units","value":5},"startDate":"2024-01-29T13:21:38.098Z","endDate":"2024-01-29T13:21:38.098Z","metadata":{"insulinDeliveryReason":"bolus","externalId":"EX124","timeZone":"Europe/Copenhagen"}}],"startDate":"2024-01-29T13:21:39.412Z","endDate":"2024-01-29T13:21:39.412Z","device":{"name":"HDA"},"metadata":{"externalId":"EX125","timeZone":"Europe/Copenhagen"}}},"NewDiabetesTypeCharacteristic":{"summary":"New Diabetes Type Characteristic","value":{"type":"diabetesType","diabetesType":"type1"}},"BloodGlucoseSample":{"summary":"Blood Glucose Sample","value":{"id":"f906f26b-6a0c-4c72-97f2-c9ad8701f730","userId":"70c09d76-e53c-470f-916a-ef33706382b4","type":"bloodGlucose","quantity":{"unit":"mg/dL","value":100},"startDate":"2024-01-29T13:15:38.098Z","endDate":"2024-01-29T13:15:38.098Z","metadata":{"bloodGlucoseMealTime":"postprandial","externalId":"EX123","timeZone":"Europe/Copenhagen","userEntered":false,"property1":true,"property2":123,"property3":"abc"},"device":{"id":"34de05f1-ecb3-4dea-ab16-81e1a584ebfb","firmwareVersion":"3.0.5","hardwareVersion":"6.1.0","manufacturer":"Novo Nordisk A/S","model":"NovoPen 6","name":"NovoPen","softwareVersion":"8.1.2"},"source":{"id":"f6c8e76c-d8a3-4339-879a-4a626edba805","name":"hda","version":"2.18.0"},"createdAt":"2024-01-29T13:15:40.390Z"}},"BolusCalculationSample":{"summary":"Bolus Calculation Sample","value":{"id":"d7a5b8b4-03a9-4f78-8685-3848199ec826","userId":"70c09d76-e53c-470f-916a-ef33706382b4","type":"bolusCalculation","objects":["83f05666-3668-451f-abfb-8d50f244367d","dce70c6e-6108-40e3-b9cd-3deaeae80bfb","f906f26b-6a0c-4c72-97f2-c9ad8701f730","44fe5162-e079-4e29-9cd3-1f6d6fd2e848"],"startDate":"2024-01-29T13:15:39.412Z","endDate":"2024-01-29T13:15:39.412Z","device":{"name":"HDA"},"metadata":{"externalId":"EX124","timeZone":"Europe/Copenhagen"},"source":{"id":"f6c8e76c-d8a3-4339-879a-4a626edba805","name":"hda","version":"2.18.0"},"createdAt":"2024-01-29T13:15:40.390Z"}},"DiabetesTypeCharacteristic":{"summary":"Diabetes Type Characteristic","value":{"id":"ce1b534c-df77-455c-9bd6-6d4fe32600aa","userId":"70c09d76-e53c-470f-916a-ef33706382b4","type":"diabetesType","diabetesType":"type1","source":{"id":"f6c8e76c-d8a3-4339-879a-4a626edba805","name":"hda","version":"2.18.0"},"createdAt":"2024-01-29T13:15:40.390Z"}}}},"externalDocs":{"url":"https://developer.hedia.com/","description":"Documentation"}}