---
agentTools:
  projectIndex: https://curedao.readme.io/llms.txt
---

# Get units

Get a list of the available measurement units

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "CureDAO Unified Health API",
    "description": "A platform for participant-centered research and personal data exploration",
    "termsOfService": "https://quantimo.do/tos",
    "contact": {
      "name": "hello@curedao.org"
    },
    "license": {
      "name": "GNU General Public License v3 (GPL-3)",
      "url": "https://tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3)"
    },
    "version": "0.0.1"
  },
  "servers": [
    {
      "url": "https://app.quantimo.do/api"
    }
  ],
  "tags": [
    {
      "name": "units",
      "description": "Available units for measurements",
      "externalDocs": {
        "description": "See it in action",
        "url": "https://web.quantimo.do/#/app/measurement-search?accessToken=demo"
      }
    }
  ],
  "paths": {
    "/v3/units": {
      "get": {
        "tags": [
          "units"
        ],
        "summary": "Get units",
        "description": "Get a list of the available measurement units",
        "operationId": "getUnits",
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "description": "Array of units",
                  "items": {
                    "$ref": "#/components/schemas/Unit"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not Authenticated",
            "content": {}
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "curedao_oauth2": [
              "basic"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ConversionStep": {
        "required": [
          "operation",
          "value"
        ],
        "type": "object",
        "properties": {
          "operation": {
            "type": "string",
            "description": "ADD or MULTIPLY",
            "enum": [
              "ADD",
              "MULTIPLY"
            ]
          },
          "value": {
            "type": "number",
            "description": "This specifies the order of conversion steps starting with 0",
            "format": "double"
          }
        }
      },
      "Unit": {
        "required": [
          "abbreviatedName",
          "category",
          "conversionSteps",
          "maximumValue",
          "name",
          "unitCategory"
        ],
        "type": "object",
        "properties": {
          "abbreviatedName": {
            "type": "string",
            "description": "Unit abbreviation"
          },
          "advanced": {
            "type": "integer",
            "description": "Ex: 1"
          },
          "category": {
            "type": "string",
            "description": "Unit category",
            "enum": [
              "Distance",
              "Duration",
              "Energy",
              "Frequency",
              "Miscellany",
              "Pressure",
              "Proportion",
              "Rating",
              "Temperature",
              "Volume",
              "Weight",
              "Count"
            ]
          },
          "categoryId": {
            "type": "integer",
            "description": "Ex: 6"
          },
          "categoryName": {
            "type": "string",
            "description": "Ex: Miscellany"
          },
          "conversionSteps": {
            "type": "array",
            "description": "Conversion steps list",
            "items": {
              "$ref": "#/components/schemas/ConversionStep"
            }
          },
          "id": {
            "type": "integer",
            "description": "Ex: 29"
          },
          "manualTracking": {
            "type": "integer",
            "description": "Ex: 0"
          },
          "maximumAllowedValue": {
            "type": "number",
            "description": "The maximum allowed value for measurements. While you can record a value above this maximum, it will be excluded from the correlation analysis.",
            "format": "double"
          },
          "maximumValue": {
            "type": "integer",
            "description": "Ex: 4"
          },
          "minimumAllowedValue": {
            "type": "number",
            "description": "The minimum allowed value for measurements. While you can record a value below this minimum, it will be excluded from the correlation analysis.",
            "format": "double"
          },
          "minimumValue": {
            "type": "integer",
            "description": "Ex: 0"
          },
          "name": {
            "type": "string",
            "description": "Unit name"
          },
          "unitCategory": {
            "$ref": "#/components/schemas/UnitCategory"
          }
        }
      },
      "UnitCategory": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "id"
          },
          "name": {
            "type": "string",
            "description": "Category name"
          },
          "standardUnitAbbreviatedName": {
            "type": "string",
            "description": "Base unit for in which measurements are to be converted to and stored"
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "curedao_oauth2": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://app.quantimo.do/api/v1/oauth/authorize",
            "tokenUrl": "https://app.quantimo.do/api/v1/oauth/token",
            "scopes": {
              "basic": "Allows you to read user info (display name, email, etc)",
              "readmeasurements": "Allows one to read a user's measurements",
              "writemeasurements": "Allows you to write user measurements"
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 98,
      "1": 59,
      "2": 203,
      "3": 63,
      "4": 174,
      "5": 1,
      "6": 81,
      "7": 0,
      "8": 69,
      "9": 170,
      "10": 238,
      "11": 41
    }
  }
}
```