> ## 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 body summary data for a specific user, including weight, body fat, and BMI measurements.

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
       --url {{BASE_URL}}/v2/summary/body/{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.body.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.body.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.body.requests.GetBodyRequest;

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

  var data = client.body().get(
      "<user_id>",
      GetBodyRequest.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.Body.Get(context.TODO(), &junction.GetBodyRequest{
      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/body/{user_id}
openapi: 3.1.0
info:
  title: Junction API
  description: https://docs.junction.com/
  version: 0.4.495
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/body/{user_id}:
    get:
      tags:
        - summary
      summary: Get User Body
      description: Get Body summary for user_id
      operationId: get_user_body_v2_summary_body__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/ClientBodyResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ClientBodyResponse:
      properties:
        body:
          items:
            $ref: '#/components/schemas/ClientFacingBody'
          type: array
          title: Body
      type: object
      required:
        - body
      title: ClientBodyResponse
      example:
        body:
          - body_mass_index: 22.3
            bone_mass_percentage: 4.3
            calendar_date: '2023-02-27'
            created_at: '2023-02-27T20:31:24+00:00'
            date: '2023-02-27T12:31:24+00:00'
            fat: 30
            height: 183
            id: 8be1306e-01fc-46b1-b5d1-a9e39052db09
            lean_body_mass_kilogram: 40.1
            muscle_mass_percentage: 40.2
            source:
              device_id: 550e8400-e29b-41d4-a716-446655440000
              logo: https://logo_url.com
              name: Withings
              slug: withings
            updated_at: '2023-02-28T01:22:38+00:00'
            user_id: 1449752e-0d8a-40e0-9206-91ab099b2537
            visceral_fat_index: 4.5
            waist_circumference_centimeter: 86.36
            water_percentage: 55.4
            weight: 80
    HTTPValidationError:
      properties:
        detail:
          title: Detail
      type: object
      title: HTTPValidationError
    ClientFacingBody:
      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.
        weight:
          anyOf:
            - type: number
            - type: 'null'
          title: Weight
          description: Weight in kg::kg
        fat:
          anyOf:
            - type: number
            - type: 'null'
          title: Fat
          description: Total body fat percentage::perc
        water_percentage:
          anyOf:
            - type: number
            - type: 'null'
          title: Water Percentage
          description: Water percentage in the body::perc
        muscle_mass_percentage:
          anyOf:
            - type: number
            - type: 'null'
          title: Muscle Mass Percentage
          description: Muscle mass percentage in the body::perc
        visceral_fat_index:
          anyOf:
            - type: number
            - type: 'null'
          title: Visceral Fat Index
          description: Visceral fat index::scalar
        bone_mass_percentage:
          anyOf:
            - type: number
            - type: 'null'
          title: Bone Mass Percentage
          description: Bone mass percentage in the body::perc
        body_mass_index:
          anyOf:
            - type: number
            - type: 'null'
          title: Body Mass Index
        lean_body_mass_kilogram:
          anyOf:
            - type: number
            - type: 'null'
          title: Lean Body Mass Kilogram
        waist_circumference_centimeter:
          anyOf:
            - type: number
            - type: 'null'
          title: Waist Circumference Centimeter
        source:
          $ref: '#/components/schemas/ClientFacingSource'
        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: ClientFacingBody
      example:
        body_mass_index: 22.3
        bone_mass_percentage: 4.3
        calendar_date: '2023-02-27'
        created_at: '2023-02-27T20:31:24+00:00'
        date: '2023-02-27T12:31:24+00:00'
        fat: 30
        height: 183
        id: 8be1306e-01fc-46b1-b5d1-a9e39052db09
        lean_body_mass_kilogram: 40.1
        muscle_mass_percentage: 40.2
        source:
          device_id: 550e8400-e29b-41d4-a716-446655440000
          logo: https://logo_url.com
          name: Withings
          slug: withings
        updated_at: '2023-02-28T01:22:38+00:00'
        user_id: 1449752e-0d8a-40e0-9206-91ab099b2537
        visceral_fat_index: 4.5
        waist_circumference_centimeter: 86.36
        water_percentage: 55.4
        weight: 80
    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
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-vital-api-key
      description: Vital Team API Key

````