> ## Documentation Index
> Fetch the complete documentation index at: https://www.vitalog.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get goal progress

> Compare goals effective on a local date with qualified observed values. Unknown stays null. Nutrition uses limit utilization; water and exercise use target completion; weight uses an explicit baseline. Daily totals take precedence, gross calories are excluded, and elapsed time is never inferred as active minutes.



## OpenAPI

````yaml /openapi.json get /v1/days/{date}/goal-progress
openapi: 3.1.1
info:
  title: Vitalog
  version: 1.0.2
  description: >-
    Single-user structured observations with equivalent REST and MCP domain
    services. Environment AUTH_KEY or revocable personal Bearer keys with
    required name, permissions and explicit expiry (including Never); Primary
    key management requires AUTH_KEY; the UI uses separate, root-verified
    30-minute management sessions. MCP clients use OAuth authorization code with
    S256 PKCE, issued after root sign-in. Clients are resolved through HTTPS
    metadata, pre-registration or dynamic registration. OAuth tokens grant MCP
    access only.
servers:
  - url: https://vitalog-api.example.com
    description: Production REST and MCP API
  - url: http://localhost:3000
    description: Loopback development; production requires TLS ingress
security: []
paths:
  /v1/days/{date}/goal-progress:
    get:
      tags:
        - Goals
      summary: Get goal progress
      description: >-
        Compare goals effective on a local date with qualified observed values.
        Unknown stays null. Nutrition uses limit utilization; water and exercise
        use target completion; weight uses an explicit baseline. Daily totals
        take precedence, gross calories are excluded, and elapsed time is never
        inferred as active minutes.
      operationId: health_get_goal_progress
      parameters:
        - name: date
          in: path
          required: true
          schema:
            $schema: https://json-schema.org/draft/2020-12/schema
            type: string
            format: date
            pattern: >-
              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
      responses:
        '200':
          description: Successful domain response
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  catalog_version:
                    type: string
                    const: 1.0.4
                  date:
                    $ref: '#/components/schemas/Schema_c4e98bf7c67f___schema0'
                  timezone:
                    type: string
                    minLength: 1
                    maxLength: 100
                  progress:
                    maxItems: 200
                    type: array
                    items:
                      $ref: '#/components/schemas/Schema_c4e98bf7c67f___schema1'
                required:
                  - catalog_version
                  - date
                  - timezone
                  - progress
                additionalProperties: false
        '401':
          description: UNAUTHORIZED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: FORBIDDEN
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: TIMEOUT
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            VERSION_CONFLICT, IDEMPOTENCY_CONFLICT, DAILY_TOTAL_EXISTS,
            CATALOG_VERSION_MISMATCH
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: LIMIT_EXCEEDED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: VALIDATION_ERROR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: RATE_LIMITED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: INTERNAL_ERROR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: UNAVAILABLE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - staticKey: []
        - apiKey: []
        - browserSession: []
components:
  schemas:
    Schema_c4e98bf7c67f___schema0:
      type: string
      format: date
      pattern: >-
        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
    Schema_c4e98bf7c67f___schema1:
      type: object
      properties:
        goal:
          type: object
          properties:
            id:
              type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            metric:
              type: string
              enum:
                - measurement:weight
                - nutrient:energy_kcal
                - nutrient:protein_g
                - nutrient:carbohydrate_g
                - nutrient:fat_g
                - nutrient:fiber_g
                - hydration:water_ml
                - activity:active_energy_kcal
                - activity:exercise_minutes
            version:
              type: integer
              exclusiveMinimum: 0
              maximum: 2147483647
            period:
              type: string
              enum:
                - daily
                - ongoing
            direction:
              type: string
              enum:
                - maximum
                - minimum
                - target
            target:
              $ref: '#/components/schemas/Schema_c4e98bf7c67f___schema2'
            unit:
              type: string
              minLength: 1
              maxLength: 20
            baseline:
              anyOf:
                - $ref: '#/components/schemas/Schema_c4e98bf7c67f___schema2'
                - type: 'null'
            status:
              type: string
              enum:
                - active
                - archived
            effective_on:
              $ref: '#/components/schemas/Schema_c4e98bf7c67f___schema0'
            created_at:
              $ref: '#/components/schemas/Schema_c4e98bf7c67f___schema3'
            updated_at:
              $ref: '#/components/schemas/Schema_c4e98bf7c67f___schema3'
          required:
            - id
            - metric
            - version
            - period
            - direction
            - target
            - unit
            - baseline
            - status
            - effective_on
            - created_at
            - updated_at
          additionalProperties: false
        actual:
          $ref: '#/components/schemas/Schema_c4e98bf7c67f___schema4'
        observed_on:
          anyOf:
            - $ref: '#/components/schemas/Schema_c4e98bf7c67f___schema0'
            - type: 'null'
        source_ids:
          maxItems: 1000
          type: array
          items:
            $ref: '#/components/schemas/Schema_c4e98bf7c67f___schema5'
        basis:
          type: string
          minLength: 1
          maxLength: 100
        coverage:
          type: string
          enum:
            - reported_daily_total
            - partial
            - observation
            - unknown
        status:
          type: string
          enum:
            - unknown
            - in_progress
            - met
            - over_limit
            - within_limit
            - below_limit
        ratio:
          $ref: '#/components/schemas/Schema_c4e98bf7c67f___schema4'
        progress_percent:
          anyOf:
            - type: number
              minimum: 0
              maximum: 100
            - type: 'null'
        remaining:
          $ref: '#/components/schemas/Schema_c4e98bf7c67f___schema4'
        over_by:
          $ref: '#/components/schemas/Schema_c4e98bf7c67f___schema4'
        warnings:
          maxItems: 100
          type: array
          items:
            $ref: '#/components/schemas/Schema_c4e98bf7c67f___schema6'
      required:
        - goal
        - actual
        - observed_on
        - source_ids
        - basis
        - coverage
        - status
        - ratio
        - progress_percent
        - remaining
        - over_by
        - warnings
      additionalProperties: false
    Error:
      type: object
      additionalProperties: false
      required:
        - code
        - message
        - catalog_version
        - issues
      properties:
        code:
          type: string
          enum:
            - VALIDATION_ERROR
            - NOT_FOUND
            - VERSION_CONFLICT
            - IDEMPOTENCY_CONFLICT
            - DAILY_TOTAL_EXISTS
            - CATALOG_VERSION_MISMATCH
            - LIMIT_EXCEEDED
            - UNAUTHORIZED
            - FORBIDDEN
            - RATE_LIMITED
            - UNAVAILABLE
            - TIMEOUT
            - INTERNAL_ERROR
        message:
          type: string
        catalog_version:
          type: string
        issues:
          type: array
          items:
            type: object
            properties:
              path:
                type: string
              reason:
                type: string
              message:
                type: string
              suggested_keys:
                type: array
                items:
                  type: string
              discovery:
                type: object
        existing_id:
          type: string
        current_version:
          type: integer
        current_catalog_version:
          type: string
    Schema_c4e98bf7c67f___schema2:
      type: number
      exclusiveMinimum: 0
      maximum: 1000000000000
    Schema_c4e98bf7c67f___schema3:
      type: string
      format: date-time
      pattern: >-
        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
    Schema_c4e98bf7c67f___schema4:
      anyOf:
        - anyOf:
            - type: number
            - type: string
              minLength: 1
              maxLength: 10000
        - type: 'null'
    Schema_c4e98bf7c67f___schema5:
      type: string
      format: uuid
      pattern: >-
        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
    Schema_c4e98bf7c67f___schema6:
      type: string
      minLength: 1
      maxLength: 200
  securitySchemes:
    staticKey:
      type: http
      scheme: bearer
      description: >-
        Environment AUTH_KEY. Full ledger access and primary API-key
        administration. Not OAuth or JWT.
    apiKey:
      type: http
      scheme: bearer
      description: >-
        Generated opaque vlk_ key with a required name, explicit read/edit
        permissions, optional administrative inspection and chosen expiry
        (including Never). Enforces the same ceiling on REST and MCP; cannot
        administer credentials or account settings. Not OAuth or JWT.
    browserSession:
      type: http
      scheme: bearer
      description: >-
        Opaque vls_ browser token, valid for 30 days unless revoked. Read-only
        REST access. The UI stores it in a host-only HttpOnly SameSite=Lax
        cookie; it never reaches browser JavaScript. Key administration and MCP
        reject this token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.