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

# Summary

> Retrieve processed activity summary data for a specific user, including steps, calories, and distance metrics.

<RequestExample>
  ```bash Shell theme={null}
  curl --request GET \
       --url {{BASE_URL}}/v2/summary/activity/{user_id} \
       --header 'Accept: application/json' \
       --header 'x-vital-api-key: <API_KEY>'
  ```

  ```python Python theme={null}
  from junction import Junction
  from junction.environment import JunctionEnvironment

  client = Junction(
      api_key="YOUR_API_KEY",
      environment=JunctionEnvironment.SANDBOX,
  )

  data = client.activity.get(
      "<user_id>",
      start_date="2022-05-01",
      end_date="2022-06-01",
  )
  ```

  ```typescript TypeScript theme={null}
  import { JunctionClient, JunctionEnvironment } from "@junction-api/sdk";

  const client = new JunctionClient({
      apiKey: "YOUR_API_KEY",
      environment: JunctionEnvironment.Sandbox,
  });

  const data = await client.activity.get({
      userId: "<user_id>",
      startDate: "2022-05-01",
      endDate: "2022-06-01",
  });
  ```

  ```java Java theme={null}
  import com.junction.api.Junction;
  import com.junction.api.core.Environment;
  import com.junction.api.resources.activity.requests.GetActivityRequest;

  Junction client = Junction.builder()
      .apiKey("YOUR_API_KEY")
      .environment(Environment.SANDBOX)
      .build();

  var data = client.activity().get(
      "<user_id>",
      GetActivityRequest.builder()
          .startDate("2022-05-01")
          .endDate("2022-06-01")
          .build()
  );
  ```

  ```go Go theme={null}
  import (
      "context"

      junction "github.com/junction-api/junction-go"
      "github.com/junction-api/junction-go/client"
      "github.com/junction-api/junction-go/option"
  )

  c := client.NewClient(
      option.WithApiKey("YOUR_API_KEY"),
      option.WithBaseURL(junction.Environments.Sandbox),
  )

  endDate := "2022-06-01"
  response, err := c.Activity.Get(context.TODO(), &junction.GetActivityRequest{
      UserId:    "<user_id>",
      StartDate: "2022-05-01",
      EndDate:   &endDate,
  })
  if err != nil {
      return err
  }
  fmt.Printf("Received data %s\n", response)
  ```
</RequestExample>


## OpenAPI

````yaml GET /v2/summary/activity/{user_id}
openapi: 3.1.0
info:
  title: Junction API
  description: https://docs.junction.com/
  version: 0.4.483
servers:
  - url: https://api.us.junction.com
    x-fern-server-name: Production
  - url: https://api.eu.junction.com
    x-fern-server-name: ProductionEU
  - url: https://api.sandbox.us.junction.com
    x-fern-server-name: Sandbox
  - url: https://api.sandbox.eu.junction.com
    x-fern-server-name: SandboxEU
security:
  - apiKeyAuth: []
paths:
  /v2/summary/activity/{user_id}:
    get:
      tags:
        - summary
      summary: Get User Activity
      description: Get activity summary for user_id
      operationId: get_user_activity_v2_summary_activity__user_id__get
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: >-
              User id returned by vital create user id request. This id should
              be stored in your database against the user and used for all
              interactions with the vital api.
        - name: provider
          in: query
          required: false
          schema:
            type: string
            description: Provider oura/strava etc
            default: ''
            title: Provider
          description: Provider oura/strava etc
        - name: start_date
          in: query
          required: true
          schema:
            type: string
            description: >-
              Date from in YYYY-MM-DD or ISO formatted date time. If a date is
              provided without a time, the time will be set to 00:00:00
            title: Start Date
          description: >-
            Date from in YYYY-MM-DD or ISO formatted date time. If a date is
            provided without a time, the time will be set to 00:00:00
        - name: end_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Date to YYYY-MM-DD or ISO formatted date time. If a date is
              provided without a time, the time will be set to 23:59:59
            title: End Date
          description: >-
            Date to YYYY-MM-DD or ISO formatted date time. If a date is provided
            without a time, the time will be set to 23:59:59
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientActivityResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ClientActivityResponse:
      properties:
        activity:
          items:
            $ref: '#/components/schemas/ClientFacingActivity'
          type: array
          title: Activity
      type: object
      required:
        - activity
      title: Daily Activity
      example:
        activity:
          - calendar_date: '2023-03-22'
            calories_active: 2000
            calories_total: 100
            created_at: '2023-02-27T20:31:24+00:00'
            daily_movement: 200
            date: '2023-03-22T00:00:00+00:00'
            floors_climbed: 10
            heart_rate:
              avg_bpm: 80
              avg_walking_bpm: 70
              max_bpm: 100
              min_bpm: 60
              resting_bpm: 60
            high: 6000
            id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
            low: 6400
            medium: 6400
            source:
              device_id: 550e8400-e29b-41d4-a716-446655440000
              logo: https://logo_url.com
              name: Oura
              slug: oura
            steps: 10000
            time_zone: Europe/London
            timezone_offset: 3600
            updated_at: '2023-02-28T01:22:38+00:00'
            user_id: 1449752e-0d8a-40e0-9206-91ab099b2537
    HTTPValidationError:
      properties:
        detail:
          title: Detail
      type: object
      title: HTTPValidationError
    ClientFacingActivity:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        user_id:
          type: string
          format: uuid
          title: User Id
          description: >-
            User id returned by vital create user request. This id should be
            stored in your database against the user and used for all
            interactions with the vital api.
        date:
          type: string
          format: date-time
          title: Date
          description: >-
            Date of the specified record, formatted as ISO8601 datetime string
            in UTC 00:00. Deprecated in favour of calendar_date.
          deprecated: true
        calendar_date:
          type: string
          format: date
          title: Calendar Date
          description: Date of the summary in the YYYY-mm-dd format.
        calories_total:
          anyOf:
            - type: number
            - type: 'null'
          title: Calories Total
          description: >-
            Total energy consumption during the day including Basal Metabolic
            Rate in kilocalories::kilocalories
        calories_active:
          anyOf:
            - type: number
            - type: 'null'
          title: Calories Active
          description: >-
            Energy consumption caused by the physical activity of the day in
            kilocalories::kilocalories
        steps:
          anyOf:
            - type: integer
            - type: 'null'
          title: Steps
          description: Total number of steps registered during the day::steps
        daily_movement:
          anyOf:
            - type: number
            - type: 'null'
          title: Daily Movement
          description: >-
            Deprecated. Daily physical activity as equal meters i.e. amount of
            walking needed to get the same amount of activity::meters
          deprecated: true
        distance:
          anyOf:
            - type: number
            - type: 'null'
          title: Distance
          description: Distance traveled during activities throughout the day::meters
        low:
          anyOf:
            - type: number
            - type: 'null'
          title: Low
          description: >-
            Number of minutes during the day with low intensity activity (e.g.
            household work)::minutes
        medium:
          anyOf:
            - type: number
            - type: 'null'
          title: Medium
          description: >-
            Number of minutes during the day with medium intensity activity
            (e.g. walking)::minutes
        high:
          anyOf:
            - type: number
            - type: 'null'
          title: High
          description: >-
            Number of minutes during the day with high intensity activity (e.g.
            running)::minutes
        source:
          $ref: '#/components/schemas/ClientFacingSource'
          description: Source the data has come from.
        floors_climbed:
          anyOf:
            - type: integer
            - type: 'null'
          title: Floors Climbed
          description: Number of floors climbed by the user::count
        time_zone:
          anyOf:
            - type: string
            - type: 'null'
          title: Time Zone
          description: 'The IANA time zone identifier. Example: ''Europe/London''.'
        timezone_offset:
          anyOf:
            - type: integer
            - type: 'null'
          title: Timezone Offset
          description: >-
            Timezone offset from UTC as seconds. For example, EEST (Eastern
            European Summer Time, +3h) is 10800. PST (Pacific Standard Time,
            -8h) is -28800::seconds
        heart_rate:
          anyOf:
            - $ref: '#/components/schemas/ClientFacingHeartRate'
            - type: 'null'
          description: Heart rate daily summary.
        wheelchair_use:
          anyOf:
            - type: boolean
              const: true
            - type: 'null'
          title: Wheelchair Use
        wheelchair_push:
          anyOf:
            - type: integer
            - type: 'null'
          title: Wheelchair Push
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - user_id
        - date
        - calendar_date
        - source
        - created_at
        - updated_at
      title: Daily Activity
      example:
        calendar_date: '2023-03-22'
        calories_active: 2000
        calories_total: 100
        created_at: '2023-02-27T20:31:24+00:00'
        daily_movement: 200
        date: '2023-03-22T00:00:00+00:00'
        floors_climbed: 10
        heart_rate:
          avg_bpm: 80
          avg_walking_bpm: 70
          max_bpm: 100
          min_bpm: 60
          resting_bpm: 60
        high: 6000
        id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        low: 6400
        medium: 6400
        source:
          device_id: 550e8400-e29b-41d4-a716-446655440000
          logo: https://logo_url.com
          name: Oura
          slug: oura
        steps: 10000
        time_zone: Europe/London
        timezone_offset: 3600
        updated_at: '2023-02-28T01:22:38+00:00'
        user_id: 1449752e-0d8a-40e0-9206-91ab099b2537
    ClientFacingSource:
      properties:
        provider:
          type: string
          title: Provider
          description: Provider slug. e.g., `oura`, `fitbit`, `garmin`.
        type:
          type: string
          title: Type
          description: >-
            The type of the data source (app or device) by which the summary or
            the timeseries data were recorded. This defaults to `unknown` when
            Vital cannot extract or infer that information
          default: unknown
        app_id:
          anyOf:
            - type: string
            - type: 'null'
          title: App Id
          description: >-
            The identifier of the app which recorded this summary. This is only
            applicable to multi-source providers like Apple Health and Android
            Health Connect.
        device_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Device Id
          description: The identifier of the device which recorded this summary.
        sport:
          anyOf:
            - type: string
            - type: 'null'
          title: Sport
          description: >

            For workout stream timeseries, this is the standard sport slug of
            the workout with which the timeseries data are associated.


            For the `distance` timeseries, this is `wheelchair_pushing` if the
            user is a wheelchair user, or `null` otherwise.


            For all summary types and non-workout timeseries, this is always
            `null`.
        workout_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Workout Id
          description: >

            For workout stream timeseries, this is the workout ID with which the
            timeseries data are associated.


            For all other types, this is always `null`.
        name:
          type: string
          title: Name
          description: Deprecated. Subject to removal after 1 Jan 2024.
          default: ''
          deprecated: true
        slug:
          type: string
          title: Slug
          description: >-
            Deprecated. Use `provider` instead. Subject to removal after 1 Jan
            2024.
          default: ''
          deprecated: true
        logo:
          type: string
          title: Logo
          description: Deprecated. Subject to removal after 1 Jan 2024.
          default: ''
          deprecated: true
      type: object
      required:
        - provider
      title: Source
      description: |-
        Source summarizes where a sample or a summary is sourced from.
        At minimum, the source provider is always included.
      example:
        provider: oura
        type: ring
    ClientFacingHeartRate:
      properties:
        avg_bpm:
          anyOf:
            - type: number
            - type: 'null'
          title: Avg Bpm
          description: Average heart rate::bpm
        min_bpm:
          anyOf:
            - type: number
            - type: 'null'
          title: Min Bpm
          description: Minimum heart rate::bpm
        max_bpm:
          anyOf:
            - type: number
            - type: 'null'
          title: Max Bpm
          description: Maximum heart rate::bpm
        resting_bpm:
          anyOf:
            - type: number
            - type: 'null'
          title: Resting Bpm
          description: Resting heart rate::bpm
        avg_walking_bpm:
          anyOf:
            - type: number
            - type: 'null'
          title: Avg Walking Bpm
      type: object
      title: Heart Rate
      example:
        avg_bpm: 80
        avg_walking_bpm: 70
        max_bpm: 100
        min_bpm: 60
        resting_bpm: 60
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-vital-api-key
      description: Vital Team API Key

````