> ## 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 menstrual cycle tracking summary data for a specific user from their connected wearable provider.

<RequestExample>
  ```bash Shell theme={null}
  curl --request GET \
       --url {{BASE_URL}}/v2/summary/menstrual_cycle/{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.menstrual_cycle.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.menstrualCycle.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.menstrualcycle.requests.GetMenstrualCycleRequest;

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

  var data = client.menstrualCycle().get(
      "<user_id>",
      GetMenstrualCycleRequest.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.MenstrualCycle.Get(context.TODO(), &junction.GetMenstrualCycleRequest{
      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/menstrual_cycle/{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/menstrual_cycle/{user_id}:
    get:
      tags:
        - summary
      summary: Get User Menstrual Cycles
      operationId: get_user_menstrual_cycles_v2_summary_menstrual_cycle__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
            format: date
            description: Start date in YYYY-MM-DD
            title: Start Date
        - name: end_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            description: End date (inclusive) in YYYY-MM-DD
            title: End Date
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MenstrualCycleResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    MenstrualCycleResponse:
      properties:
        menstrual_cycle:
          items:
            $ref: '#/components/schemas/ClientFacingMenstrualCycle'
          type: array
          title: Menstrual Cycle
      type: object
      required:
        - menstrual_cycle
      title: MenstrualCycleResponse
    HTTPValidationError:
      properties:
        detail:
          title: Detail
      type: object
      title: HTTPValidationError
    ClientFacingMenstrualCycle:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        period_start:
          type: string
          format: date
          title: Period Start
        period_end:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Period End
        cycle_end:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Cycle End
        is_predicted:
          type: boolean
          title: Is Predicted
          default: false
        menstrual_flow:
          items:
            $ref: '#/components/schemas/MenstrualFlowEntry'
          type: array
          title: Menstrual Flow
        cervical_mucus:
          items:
            $ref: '#/components/schemas/CervicalMucusEntry'
          type: array
          title: Cervical Mucus
        intermenstrual_bleeding:
          items:
            $ref: '#/components/schemas/IntermenstrualBleedingEntry'
          type: array
          title: Intermenstrual Bleeding
        contraceptive:
          items:
            $ref: '#/components/schemas/ContraceptiveEntry'
          type: array
          title: Contraceptive
        detected_deviations:
          items:
            $ref: '#/components/schemas/DetectedDeviationEntry'
          type: array
          title: Detected Deviations
        ovulation_test:
          items:
            $ref: '#/components/schemas/OvulationTestEntry'
          type: array
          title: Ovulation Test
        home_pregnancy_test:
          items:
            $ref: '#/components/schemas/HomePregnancyTestEntry'
          type: array
          title: Home Pregnancy Test
        home_progesterone_test:
          items:
            $ref: '#/components/schemas/HomeProgesteroneTestEntry'
          type: array
          title: Home Progesterone Test
        sexual_activity:
          items:
            $ref: '#/components/schemas/SexualActivityEntry'
          type: array
          title: Sexual Activity
        basal_body_temperature:
          items:
            $ref: '#/components/schemas/BasalBodyTemperatureEntry'
          type: array
          title: Basal Body Temperature
        source_provider:
          anyOf:
            - $ref: '#/components/schemas/Providers'
            - $ref: '#/components/schemas/Labs'
          title: Source Provider
          description: ℹ️ This enum is non-exhaustive.
        source_type:
          type: string
          enum:
            - unknown
            - phone
            - watch
            - app
            - multiple_sources
            - fingerprick
            - cuff
            - manual_scan
            - automatic
            - insulin_pump
            - scale
            - chest_strap
            - ring
            - lab
            - exercise_machine
            - earphone
          title: Source Type
          description: ℹ️ This enum is non-exhaustive.
        source_app_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source App Id
        source_device_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Source Device Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        user_id:
          type: string
          format: uuid
          title: User Id
        source:
          $ref: '#/components/schemas/ClientFacingSource'
      type: object
      required:
        - id
        - period_start
        - source_provider
        - source_type
        - user_id
        - source
        - created_at
        - updated_at
      title: MenstrualCycle
      example:
        basal_body_temperature: []
        cervical_mucus: []
        contraceptive: []
        created_at: '2023-02-27T20:31:24+00:00'
        cycle_end: '2024-05-01'
        detected_deviations: []
        home_pregnancy_test: []
        home_progesterone_test: []
        id: e1274c3e-c035-4bd7-86aa-2eb15d6d0137
        intermenstrual_bleeding:
          - date: '2024-04-17'
        is_predicted: false
        menstrual_flow:
          - date: '2024-04-07'
            flow: light
          - date: '2024-04-10'
            flow: medium
          - date: '2024-04-11'
            flow: heavy
        ovulation_test: []
        period_end: '2024-04-11'
        period_start: '2024-04-07'
        sexual_activity:
          - date: '2024-04-13'
            protection_used: true
        source:
          app_id: com.apple.Health
          device_id: 550e8400-e29b-41d4-a716-446655440000
          provider: apple_health_kit
          type: app
        source_app_id: com.apple.Health
        source_provider: apple_health_kit
        source_type: app
        updated_at: '2023-02-28T01:22:38+00:00'
        user_id: cbd8b986-4225-4d36-8e2c-046ff2702769
    MenstrualFlowEntry:
      properties:
        date:
          type: string
          format: date
          title: Date
        flow:
          type: string
          enum:
            - unspecified
            - none
            - light
            - medium
            - heavy
          title: Flow
          description: ℹ️ This enum is non-exhaustive.
      type: object
      required:
        - date
        - flow
      title: MenstrualFlowEntry
    CervicalMucusEntry:
      properties:
        date:
          type: string
          format: date
          title: Date
        quality:
          type: string
          enum:
            - dry
            - sticky
            - creamy
            - watery
            - egg_white
          title: Quality
          description: ℹ️ This enum is non-exhaustive.
      type: object
      required:
        - date
        - quality
      title: CervicalMucusEntry
    IntermenstrualBleedingEntry:
      properties:
        date:
          type: string
          format: date
          title: Date
      type: object
      required:
        - date
      title: IntermenstrualBleedingEntry
    ContraceptiveEntry:
      properties:
        date:
          type: string
          format: date
          title: Date
        type:
          type: string
          enum:
            - unspecified
            - implant
            - injection
            - iud
            - intravaginal_ring
            - oral
            - patch
          title: Type
          description: ℹ️ This enum is non-exhaustive.
      type: object
      required:
        - date
        - type
      title: ContraceptiveEntry
    DetectedDeviationEntry:
      properties:
        date:
          type: string
          format: date
          title: Date
        deviation:
          type: string
          enum:
            - persistent_intermenstrual_bleeding
            - prolonged_menstrual_periods
            - irregular_menstrual_cycles
            - infrequent_menstrual_cycles
          title: Deviation
          description: ℹ️ This enum is non-exhaustive.
      type: object
      required:
        - date
        - deviation
      title: DetectedDeviationEntry
    OvulationTestEntry:
      properties:
        date:
          type: string
          format: date
          title: Date
        test_result:
          type: string
          enum:
            - negative
            - positive
            - luteinizing_hormone_surge
            - estrogen_surge
            - indeterminate
          title: Test Result
          description: ℹ️ This enum is non-exhaustive.
      type: object
      required:
        - date
        - test_result
      title: OvulationTestEntry
    HomePregnancyTestEntry:
      properties:
        date:
          type: string
          format: date
          title: Date
        test_result:
          type: string
          enum:
            - negative
            - positive
            - indeterminate
          title: Test Result
          description: ℹ️ This enum is non-exhaustive.
      type: object
      required:
        - date
        - test_result
      title: HomePregnancyTestEntry
    HomeProgesteroneTestEntry:
      properties:
        date:
          type: string
          format: date
          title: Date
        test_result:
          type: string
          enum:
            - negative
            - positive
            - indeterminate
          title: Test Result
          description: ℹ️ This enum is non-exhaustive.
      type: object
      required:
        - date
        - test_result
      title: HomeProgesteroneTestEntry
    SexualActivityEntry:
      properties:
        date:
          type: string
          format: date
          title: Date
        protection_used:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Protection Used
      type: object
      required:
        - date
      title: SexualActivityEntry
    BasalBodyTemperatureEntry:
      properties:
        date:
          type: string
          format: date
          title: Date
        value:
          type: number
          title: Value
      type: object
      required:
        - date
        - value
      title: BasalBodyTemperatureEntry
    Providers:
      type: string
      enum:
        - oura
        - fitbit
        - garmin
        - whoop
        - strava
        - renpho
        - peloton
        - wahoo
        - zwift
        - freestyle_libre
        - abbott_libreview
        - tandem_source
        - freestyle_libre_ble
        - eight_sleep
        - withings
        - apple_health_kit
        - manual
        - ihealth
        - google_fit
        - beurer_api
        - beurer_ble
        - omron
        - omron_ble
        - onetouch_ble
        - accuchek_ble
        - contour_ble
        - dexcom
        - dexcom_v3
        - hammerhead
        - my_fitness_pal
        - health_connect
        - samsung_health
        - polar
        - cronometer
        - kardia
        - whoop_v2
        - ultrahuman
        - my_fitness_pal_v2
        - map_my_fitness
        - runkeeper
      title: Providers
      description: ℹ️ This enum is non-exhaustive.
    Labs:
      type: string
      enum:
        - ayumetrix
        - spiriplex
        - ussl
        - quest
        - sonora_quest
        - labcorp
        - bioreference
        - us_biotek
        - manual
        - sanocardio
        - ihd
        - nexus
        - my_uti
        - crl
      title: Labs
      description: ℹ️ This enum is non-exhaustive.
    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

````