{
    "swagger": "2.0",
    "info": {
        "title": "Fitbit Web API Explorer",
        "description": "Fitbit provides a Web API for accessing data from Fitbit activity trackers, Aria scale, and manually entered logs. Anyone can develop an application to access and modify a Fitbit user's data on their behalf, so long as it complies with Fitbit Platform Terms of Service. These Swagger UI docs do not currently support making Fitbit API requests directly. In order to make a request, construct a request for the appropriate endpoint using this documentation, and then add an Authorization header to each request with an access token obtained using the steps outlined here: https://dev.fitbit.com/build/reference/web-api/developer-guide/authorization/.",
        "version": "1",
        "termsOfService": "https://dev.fitbit.com/legal/platform-terms-of-service/",
        "contact": {
            "name": "Web API Support",
            "url": "https://dev.fitbit.com/build/reference/web-api/help/"
        }
    },
    "host": "api.fitbit.com",
    "tags": [
        {
            "name": "Active Zone Minutes Intraday Time Series",
            "description": "The Active Zone Minutes (AZM) Intraday Time Series endpoints retrieve the user's heart-pumping activity for a specific date or 24 hour period. Intraday support can extend the detail-level response to include 1min, 5min and 15min for Active Zone Minutes.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/intraday/"
            }
        },
        {
            "name": "Active Zone Minutes Time Series",
            "description": "The Active Zone Minutes (AZM) Time Series endpoints are used for querying the user's heart-pumping activity throughout the day. ",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/active-zone-minutes-timeseries/"
            }
        },
        {
            "name": "Activity",
            "description": "The Activity endpoints are used to query and/or modify a Fitbit user's daily activity data. ",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/activity/"
            }
        },
        {
            "name": "Activity Intraday Time Series",
            "description": "The Activity Intraday Time Series endpoints retrieve the data for a given resource on a specific date or 24 hour period.  Intraday support can extend the detail-level response to include 1min, 5min and 15min for the activity.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/intraday/"
            }
        },
        {
            "name": "Activity Time Series",
            "description": "The Activity Time Series endpoints are used to query a Fitbit user's activity data over a period of time, either by specifying a date and time period, or a date range.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/activity-timeseries/"
            }
        },
        {
            "name": "Authorization",
            "description": "The Authorization endpoints allow an application to onboard Fitbit users who want to share their data with the specified application. The application can initiate the consent flow for new users, obtain the access token and refresh tokens, validate the tokens, and revoke consent to the user.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/authorization/"
            }
        },
        {
            "name": "Body",
            "description": "The Body endpoints are used for querying and modifying the user's body fat and weight data.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/body/"
            }
        },
        {
            "name": "Body Time Series",
            "description": "The Body Time Series endpoints are used for querying body fat and weight data over a period of time either by specifying a date and time period, or a date range.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/body-timeseries/"
            }
        },
        {
            "name": "Breathing Rate",
            "description": "Breathing Rate or Respiratory Rate is a measurement of your average breaths per minute at night.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/breathing-rate/"
            }
        },
        {
            "name": "Breathing Rate Intraday",
            "description": "The Breathing Rate Intraday endpoint returns the  average breathing rate throughout the day and categories your breathing rate by sleep stage.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/intraday/"
            }
        },
        {
            "name": "Cardio Fitness Score (VO2 Max)",
            "description": "The Cardio Fitness Score (also known as VO2 Max) endpoints are used for querying the maximum or optimum rate at which the user’s heart, lungs, and muscles can effectively use oxygen during exercise.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/cardio-fitness-score/"
            }
        },
       {
            "name": "Devices",
            "description": "The Devices endpoints displays information about the devices paired to a user's account.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/devices/"
            }
        },
        {
            "name": "Electrocardiogram",
            "description": "The Electrocardiogram (also known as ECG) endpoint is used for querying the user's on-device ECG readings.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/electrocardiogram/"
            }
        },
        {
            "name": "Friends",
            "description": "The Friends endpoints display information about the specified user's friends and the friend's leaderboard.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/friends/"
            }
        },
        {
            "name": "Heart Rate Intraday Time Series",
            "description": "The Heart Rate Intraday Time Series retrieves the heart rate data on a specific date or 24 hour period. Intraday support can extend the detail-level response to include 1sec, 1min, 5min or 15min for Heart Rate.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/intraday/"
            }
        },
        {
            "name": "Heart Rate Time Series",
            "description": "The Heart Rate Time Series endpoints are used for querying the user's heart rate data.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/heartrate-timeseries/"
            }
        },
        {
            "name": "Heart Rate Variability",
            "description": "The Heart Rate Variability (HRV) endpoints are used for querying the user’s heart rate variability data.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/heartrate-variability/"
            }
        },
        {
            "name": "Heart Rate Variability Intraday",
            "description": "The Heart Rate Variability Intraday endpoint returns the HRV rate at various times and returns Root Mean Square of Successive Differences (rmssd), Low Frequency (LF), High Frequency (HF), and Coverage data for a given measurement.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/intraday/"
            }
        },
        {
          "name": "Irregular Rhythm Notifications",
          "description": "The Irregular Rhythm Notifications (also known as IRN) endpoints are used for querying the user's engagement with the IRN feature and the alerts received. The IRN API is for research use or investigational use only, and is not intended for clinical or diagnostic purposes.",
          "externalDocs": {
              "description": "Full documentation",
              "url": "https://dev.fitbit.com/build/reference/web-api/irregular-rhythm-notifications/"
          }
        },
        {
            "name": "Nutrition",
            "description": "The Nutrition endpoints are used for querying and modifying the food and water data.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/nutrition/"
            }
        },
        {
            "name": "Nutrition Time Series",
            "description": "The Nutrition Time Series endpoints are used for querying food- and water-related data over a period of time either by specifying a date and time period, or a date range.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/nutrition-timeseries/"
            }
        },
        {
            "name": "Sleep",
            "description": "The Sleep endpoints are used for querying and modifying the user’s general sleep data.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/sleep/"
            }
        },
        {
            "name": "SpO2",
            "description": "SpO2 (Oxygen Saturation) is a measurement of your blood oxygen level. ",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/spo2/"
            }
        },
        {
            "name": "SpO2 Intraday",
            "description": "The SpO2 Intraday endpoints return the SpO2 values calculated on a 5-minute exponentially-moving average.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/intraday/"
            }
        },
        {
            "name": "Subscriptions",
            "description": "The Subscription endpoints allow an application to request notifications to user's specific data collection.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/subscription/"
            }
        },
        {
            "name": "Temperature",
            "description": "The Temperature endpoints are used for querying either the core temperature data logged manually by the user, or the skin temperature recorded by the device while the user is asleep.",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/temperature/"
            }
        },
        {
            "name": "User",
            "description": "The User endpoints display information about the user's profile information, the regional locale & language settings, and their badges collected",
            "externalDocs": {
                "description": "Full documentation",
                "url": "https://dev.fitbit.com/build/reference/web-api/user/"
            }
        }
    ],
    "schemes": [
        "https"
    ],
    "paths": {
        "/oauth2/token": {
            "post": {
                "tags": [
                    "Authorization"
                ],
                "summary": "Get OAuth 2 access token",
                "description": "Retrieves an OAuth 2 access token.",
                "operationId": "oauthToken",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "Authorization",
                        "in": "header",
                        "description": "The Authorization header must be set to 'Basic' followed by a space, then the Base64 encoded string of your application's client id and secret concatenated with a colon. For example, 'Basic Y2xpZW50X2lkOmNsaWVudCBzZWNyZXQ='. The Base64 encoded string, 'Y2xpZW50X2lkOmNsaWVudCBzZWNyZXQ=', is decoded as 'client_id:client secret'.",
                        "type": "string"
                    },
                    {
                        "name": "code",
                        "in": "query",
                        "description": "Authorization code received in the redirect as URI parameter. Required if using the Authorization Code flow.",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "client_id",
                        "in": "query",
                        "description": "This is your Fitbit API application id from your settings on dev.fitbit.com.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "expires_in",
                        "in": "query",
                        "description": "Specify the desired access token lifetime. Defaults to 28800 for 8 hours. The other valid value is 3600 for 1 hour.",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "grant_type",
                        "in": "query",
                        "description": "Authorization grant type. Valid values are 'authorization_code' and 'refresh_token'.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "redirect_uri",
                        "in": "query",
                        "description": "Uri to which the access token will be sent if the request is successful. Required if specified in the redirect to the authorization page. Must be exact match.",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "refresh_token",
                        "in": "query",
                        "description": "Refresh token issued by Fitbit. Required if 'grant_type' is 'refresh_token'.",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "state",
                        "in": "query",
                        "description": "Required if specified in the redirect uri of the authorization page. Must be an exact match.",
                        "required": false,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                    },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satisfied."
                    },
                    "401": {
                        "description": "Authentication was unsuccessful due to invalid client credentials."
                    },
                    "409": {
                        "description": "Request conflict due to multiple clients attempting to refresh the same access token."
                    }
                }
            }
        },
        "/1.1/oauth2/introspect": {
            "post": {
                "tags": [
                    "Authorization"
                ],
                "summary": "Retrieve the active state of an OAuth 2.0 token",
                "description": "Retrieves the active state of an OAuth 2.0 token. It follows https://tools.ietf.org/html/rfc7662.",
                "operationId": "introspect",
                "consumes": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "token",
                        "in": "formData",
                        "description": "OAuth 2.0 token to retrieve the state of",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                    },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satisfied."
                    },
                    "401": {
                        "description": "Authentication was unsuccessful due to invalid client credentials."
                    },
                    "409": {
                        "description": "Request conflict due to multiple clients"
                    }
                },
                "security": [
                    {
                        "oauth2": []
                    }
                ]
            }
        },
        "/oauth2/revoke": {
            "post": {
                "tags": [
                    "Authorization"
                ],
                "summary": "Revokes consent of the access token or refresh token",
                "description": "Revokes consent of the access token or refresh token",
                "operationId": "revoke",
                "consumes": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "token",
                        "in": "formData",
                        "description": "The access token or refresh token to be revoked",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                    },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satisfied."
                    }
                },
                "security": [
                    {
                        "oauth2": []
                    }
                ]
            }
        },
        "/1/user/-/activities/active-zone-minutes/date/{date}/1d/{detail-level}.json": {
            "get": {
                "tags": [
                    "Active Zone Minutes Intraday Time Series"
                ],
                "summary": "Get AZM Intraday by Date",
                "description": "Returns the active zone minutes intraday data for a 24 hour period by specifying a date and/or time range.",
                "operationId": "getAZMByDateIntraday",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format yyyy-MM-dd or today",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "detail-level",
                        "in": "path",
                        "description": "The detail for which data will be returned. **Supported:** 1min | 5min | 15min",
                        "required": true,
                        "type": "string",
                        "enum": [
                            "1min",
                            "5min",
                            "15min"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "403": {
                        "description": "The API client is not authorized by Fitbit to access the resource requested."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/activities/active-zone-minutes/date/{date}/1d/{detail-level}/time/{start-time}/{end-time}.json": {
            "get": {
                "tags": [
                    "Active Zone Minutes Intraday Time Series"
                ],
                "summary": "Get AZM Intraday by Date",
                "description": "Returns the active zone minutes intraday data for a 24 hour period by specifying a date and/or time range.",
                "operationId": "getAZMByDateTimeSeriesIntraday",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format yyyy-MM-dd or today",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "detail-level",
                        "in": "path",
                        "description": "The detail for which data will be returned. **Supported:** 1min | 5min | 15min",
                        "required": true,
                        "type": "string",
                        "enum": [
                            "1min",
                            "5min",
                            "15min"
                        ]
                    },
                    {
                        "name": "start-time",
                        "in": "path",
                        "description": "The start of the period in the format HH:mm.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "end-time",
                        "in": "path",
                        "description": "The end of the period in the format HH:mm.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "403": {
                        "description": "The API client is not authorized by Fitbit to access the resource requested."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/activities/active-zone-minutes/date/{start-date}/{end-date}/{detail-level}.json": {
            "get": {
                "tags": [
                    "Active Zone Minutes Intraday Time Series"
                ],
                "summary": "Get AZM Intraday by Interval",
                "description": "Returns the active zone minutes intraday data for a 24 hour period by specifying a date range and/or time range.",
                "operationId": "getAZMByIntervalIntraday",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "start-date",
                        "in": "path",
                        "description": "The date in the format yyyy-MM-dd or today",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "end-date",
                        "in": "path",
                        "description": "The date in the format yyyy-MM-dd or today",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "detail-level",
                        "in": "path",
                        "description": "The detail for which data will be returned. **Support:** 1min | 5min | 15min",
                        "required": true,
                        "type": "string",
                        "enum": [
                            "1min",
                            "5min",
                            "15min"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "403": {
                        "description": "The API client is not authorized by Fitbit to access the resource requested."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/activities/active-zone-minutes/date/{start-date}/{end-date}/time/{start-time}/{end-time}.json": {
            "get": {
                "tags": [
                    "Active Zone Minutes Intraday Time Series"
                ],
                "summary": "Get AZM Intraday by Interval",
                "description": "Returns the active zone minutes intraday data for a 24 hour period by specifying a date range and/or time range.",
                "operationId": "getAZMByIntervalTimeSeriesIntraday",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "start-date",
                        "in": "path",
                        "description": "The date in the format yyyy-MM-dd or today",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "end-date",
                        "in": "path",
                        "description": "The date in the format yyyy-MM-dd or today",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "detail-level",
                        "in": "path",
                        "description": "The detail for which data will be returned. **Support:** 1min | 5min | 15min",
                        "required": true,
                        "type": "string",
                        "enum": [
                            "1min",
                            "5min",
                            "15min"
                        ]
                    },
                    {
                        "name": "start-time",
                        "in": "path",
                        "description": "The start of the period in the format HH:mm.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "end-time",
                        "in": "path",
                        "description": "The end of the period in the format HH:mm.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "403": {
                        "description": "The API client is not authorized by Fitbit to access the resource requested."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/activities/active-zone-minutes/date/{date}/{period}.json": {
            "get": {
                "tags": [
                    "Active Zone Minutes Time Series"
                ],
                "summary": "Get AZM Time Series by Date",
                "description": "Returns the daily summary values over a period of time by specifying a date and time period.",
                "operationId": "getAZMTimeSeriesByDate",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format yyyy-MM-dd or today",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "period",
                        "in": "path",
                        "description": "The range for which data will be returned. **Supported:** 1d | 7d | 30d | 1w | 1m | 3m | 6m | 1y",
                        "required": true,
                        "type": "string",
                        "enum": [
                            "1d",
                            "7d",
                            "30d",
                            "1w",
                            "1m",
                            "3m",
                            "6m",
                            "1y"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "403": {
                        "description": "The API client is not authorized by Fitbit to access the resource requested."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/activities/active-zone-minutes/date/{start-date}/{end-date}.json": {
            "get": {
                "tags": [
                    "Active Zone Minutes Time Series"
                ],
                "summary": "Get AZM Time Series by Interval",
                "description": "Returns the daily summary values over an interval by specifying a date range.",
                "operationId": "getAZMTimeSeriesByInterval",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "start-date",
                        "in": "path",
                        "description": "The date in the format yyyy-MM-dd or today",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "end-date",
                        "in": "path",
                        "description": "The date in the format yyyy-MM-dd or today",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "403": {
                        "description": "The API client is not authorized by Fitbit to access the resource requested."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/activities/date/{date}.json": {
            "get": {
                "tags": [
                    "Activity"
                ],
                "summary": "Get Activity Summary by Date ",
                "description": "Retrieves a summary and list of a user's activities and activity log entries for a given day.",
                "operationId": "getActivitiesByDate",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format yyyy-MM-dd",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/activities/{resource-path}/date/{base-date}/{end-date}.json": {
            "get": {
                "tags": [
                    "Activity Time Series"
                ],
                "summary": "Get Activity Resource by Date Range",
                "description": "Returns activities time series data in the specified range for a given resource.",
                "operationId": "getActivitiesResourceByDateRange",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "resource-path",
                        "in": "path",
                        "description": "The resource-path; see options in the Resource Path Options section in the full documentation.",
                        "required": true,
                        "type": "string",
                        "enum": [
                          "calories",
                          "caloriesBMR",
                          "steps",
                          "distance",
                          "floors",
                          "elevation",
                          "minutesSedentary",
                          "minutesLightlyActive",
                          "minutesFairlyActive",
                          "minutesVeryActive",
                          "activityCalories"
                        ],
                        "default": "steps"
                    },
                    {
                        "name": "base-date",
                        "in": "path",
                        "description": "The range start date in the format yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "end-date",
                        "in": "path",
                        "description": "The end date of the range.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/activities/tracker/{resource-path}/date/{base-date}/{end-date}.json": {
            "get": {
                "tags": [
                    "Activity Time Series"
                ],
                "summary": "Get Activity Tracker Resource by Date Range Time Series",
                "description": "Returns time series data in the specified range for a given resource.",
                "operationId": "getActivitiesTrackerResourceByDateRange",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "resource-path",
                        "in": "path",
                        "description": "The resource-path; see options in the Resource Path Options section in the full documentation.",
                        "required": true,
                        "type": "string",
                        "enum": [
                          "calories",
                          "caloriesBMR",
                          "steps",
                          "distance",
                          "floors",
                          "elevation",
                          "minutesSedentary",
                          "minutesLightlyActive",
                          "minutesFairlyActive",
                          "minutesVeryActive",
                          "activityCalories"
                        ],
                        "default": "steps"
                    },
                    {
                        "name": "base-date",
                        "in": "path",
                        "description": "The range start date in the format yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "end-date",
                        "in": "path",
                        "description": "The end date of the range.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },

        "/1/user/-/activities/{resource-path}/date/{date}/{period}.json": {
            "get": {
                "tags": [
                    "Activity Time Series"
                ],
                "summary": "Get Activity Time Series",
                "description": "Returns time series data in the specified range for a given resource in the format requested using units in the unit system that corresponds to the Accept-Language header provided.",
                "operationId": "getActivitiesResourceByDatePeriod",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],

                "parameters": [
                    {
                      "name": "resource-path",
                      "in": "path",
                      "description": "The resource-path; see options in the Resource Path Options section in the full documentation.",
                      "required": true,
                      "type": "string",
                      "enum": [
                        "calories",
                        "caloriesBMR",
                        "steps",
                        "distance",
                        "floors",
                        "elevation",
                        "minutesSedentary",
                        "minutesLightlyActive",
                        "minutesFairlyActive",
                        "minutesVeryActive",
                        "activityCalories"
                      ],
                      "default": "steps"
                    },
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The end date of the period specified in the format yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "period",
                        "in": "path",
                        "description": "The range for which data will be returned. Options are 1d, 7d, 30d, 1w, 1m, 3m, 6m, 1y, or max.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },

        "/1/user/-/activities/tracker/{resource-path}/date/{date}/{period}.json": {
            "get": {
                "tags": [
                    "Activity Time Series"
                ],
                "summary": "Get Activity Time Series",
                "description": "Returns time series data in the specified range for a given resource in the format requested using units in the unit system that corresponds to the Accept-Language header provided.",
                "operationId": "getActivitiesTrackerResourceByDatePeriod",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],

                "parameters": [
                    {
                      "name": "resource-path",
                      "in": "path",
                      "description": "The resource-path; see options in the Resource Path Options section in the full documentation.",
                      "required": true,
                      "type": "string",
                      "enum": [
                        "calories",
                        "caloriesBMR",
                        "steps",
                        "distance",
                        "floors",
                        "elevation",
                        "minutesSedentary",
                        "minutesLightlyActive",
                        "minutesFairlyActive",
                        "minutesVeryActive",
                        "activityCalories"
                      ],
                      "default": "steps"
                    },
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The end date of the period specified in the format yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "period",
                        "in": "path",
                        "description": "The range for which data will be returned. Options are 1d, 7d, 30d, 1w, 1m, 3m, 6m, 1y, or max.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },

        "/1/user/-/activities/{resource-path}/date/{base-date}/{end-date}/{detail-level}.json": {
            "get": {
                "tags": [
                    "Activity Intraday Time Series"
                ],
                "summary": "Get Activity Intraday Time Series",
                "description": "Returns the Activity Intraday Time Series for a given resource in the format requested.",
                "operationId": "getActivitiesResourceByDateRangeIntraday",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                    "name": "resource-path",
                    "in": "path",
                    "description": "The resource-path; see options in the Resource Path Options section in the full documentation.",
                    "required": true,
                    "type": "string",
                    "enum": [
                      "calories",
                      "steps",
                      "distance",
                      "floors",
                      "elevation"
                      ],
                      "default": "steps"
                    },
                    {
                        "name": "base-date",
                        "in": "path",
                        "description": "The date in the format yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "end-date",
                        "in": "path",
                        "description": "The date in the format yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "detail-level",
                        "in": "path",
                        "description": "Number of data points to include. Either 1min or 15min. Optional.",
                        "required": true,
                        "type": "string",
                        "default": "1min"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },

        "/1/user/-/activities/{resource-path}/date/{date}/1d/{detail-level}.json": {
            "get": {
                "tags": [
                    "Activity Intraday Time Series"
                ],
                "summary": "Get Intraday Time Series",
                "description": "Returns the Intraday Time Series for a given resource in the format requested.",
                "operationId": "getActivitiesResourceByDateIntraday",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                      "name": "resource-path",
                      "in": "path",
                      "description": "The resource-path; see options in the Resource Path Options section in the full documentation.",
                      "required": true,
                      "type": "string",
                      "enum": [
                        "calories",
                        "steps",
                        "distance",
                        "floors",
                        "elevation"
                      ],
                        "default": "steps"
                    },
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "detail-level",
                        "in": "path",
                        "description": "Number of data points to include. Either 1min or 15min. Optional.",
                        "required": true,
                        "type": "string",
                        "default": "1min"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },

        "/1/user/-/activities/{resource-path}/date/{date}/{end-date}/{detail-level}/time/{start-time}/{end-time}.json": {
            "get": {
                "tags": [
                    "Activity Intraday Time Series"
                ],
                "summary": "Get Activity Intraday Time Series",
                "description": "Returns the Intraday Time Series for a given resource in the format requested.",
                "operationId": "getActivitiesResourceByDateRangeTimeSeriesIntraday",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                      "name": "resource-path",
                      "in": "path",
                      "description": "The resource-path; see options in the Resource Path Options section in the full documentation.",
                      "required": true,
                      "type": "string",
                      "enum": [
                        "calories",
                        "steps",
                        "distance",
                        "floors",
                        "elevation"
                      ],
                      "default": "steps"
                    },
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "end-date",
                        "in": "path",
                        "description": "The date in the format yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "detail-level",
                        "in": "path",
                        "description": "Number of data points to include. Either 1min or 15min.",
                        "required": true,
                        "type": "string",
                        "default": "1min"
                    },
                    {
                        "name": "start-time",
                        "in": "path",
                        "description": "The start of the period in the format HH:mm.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "end-time",
                        "in": "path",
                        "description": "The end of the period in the format HH:mm.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },

        "/1/user/-/activities/{resource-path}/date/{date}/1d/{detail-level}/time/{start-time}/{end-time}.json": {
            "get": {
                "tags": [
                    "Activity Intraday Time Series"
                ],
                "summary": "Get Intraday Time Series",
                "description": "Returns the Intraday Time Series for a given resource in the format requested.",
                "operationId": "getActivitiesResourceByDateTimeSeriesIntraday",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                      "name": "resource-path",
                      "in": "path",
                      "description": "The resource-path; see options in the Resource Path Options section in the full documentation.",
                      "required": true,
                      "type": "string",
                      "enum": [
                        "calories",
                        "steps",
                        "distance",
                        "floors",
                        "elevation"
                      ],
                      "default": "steps"
                    },
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "detail-level",
                        "in": "path",
                        "description": "Number of data points to include. Either 1min or 15min.",
                        "required": true,
                        "type": "string",
                        "default": "1min"
                    },
                    {
                        "name": "start-time",
                        "in": "path",
                        "description": "The start of the period in the format HH:mm.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "end-time",
                        "in": "path",
                        "description": "The end of the period in the format HH:mm.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/activities.json": {
            "post": {
                "tags": [
                    "Activity"
                ],
                "summary": "Log Activity",
                "description": "The Log Activity endpoint creates log entry for an activity or user's private custom activity using units in the unit system which corresponds to the Accept-Language header provided (or using optional custom distanceUnit) and get a response in the format requested.",
                "operationId": "addActivitiesLog",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "activityId",
                        "in": "query",
                        "description": "The ID of the activity, directory activity or intensity level activity.",
                        "required": true,
                        "type": "integer"
                    },
                    {
                        "name": "activityName",
                        "in": "query",
                        "description": "Custom activity name. Either activityId or activityName must be provided.",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "manualCalories",
                        "in": "query",
                        "description": "Calories burned that are manaully specified. Required with activityName must be provided.",
                        "required": true,
                        "type": "integer"
                    },
                    {
                        "name": "startTime",
                        "in": "query",
                        "description": "Activity start time. Hours and minutes in the format HH:mm:ss.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "durationMillis",
                        "in": "query",
                        "description": "Duration in milliseconds.",
                        "required": true,
                        "type": "integer"
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "description": "Log entry date in the format yyyy-MM-dd.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "distance",
                        "in": "query",
                        "description": "Distance is required for logging directory activity in the format X.XX and in the selected distanceUnit.",
                        "required": true,
                        "type": "integer"
                    },
                    {
                        "name": "distanceUnit",
                        "in": "query",
                        "description": "Distance measurement unit. Steps units are available only for Walking (activityId=90013) and Running (activityId=90009) directory activities and their intensity levels.",
                        "required": false,
                        "type": "integer"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            },
            "get": {
            "tags": [
                "Activity"
                    ],
            "summary": "Get Lifetime Stats",
            "description": "Updates a user's daily activity goals and returns a response using units in the unit system which corresponds to the Accept-Language header provided.",
            "operationId": "getActivitiesLog",
            "produces": [
                "application/x-www-form-urlencoded"
                        ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                          },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                          },
                      "401": {
                          "description": "The request requires user authentication."
                            },
                      "409": {
                          "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                            }
                          },
                            "security": [
                                {
                                    "oauth2": [
                                        "activity",
                                        "heartrate",
                                        "location",
                                        "nutrition",
                                        "profile",
                                        "settings",
                                        "sleep",
                                        "social",
                                        "weight"
                                    ]
                                }
                            ]
                        }
                    },

        "/1/user/-/activities/{activity-log-id}.json": {
            "delete": {
                "tags": [
                    "Activity"
                ],
                "summary": "Delete Activity Log",
                "description": "Deletes a user's activity log entry with the given ID.",
                "operationId": "deleteActivitiesLog",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "activity-log-id",
                        "in": "path",
                        "description": "The id of the activity log entry.",
                        "required": true,
                        "type": "integer"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content.  The request was successful."
                        },
                    "400": {
                        "description": "Bad Request.  The request likely contained bad syntax."
                        },
                    "401": {
                        "description": "Unauthorized.  The request requires user authentication."
                        }
                },
                "security": [
                    {
                        "oauth2": [
                           "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/activities/list.json": {
            "get": {
                "tags": [
                    "Activity"
                ],
                "summary": "Get Activity Log List",
                "description": "Retreives a list of user's activity log entries before or after a given day with offset and limit using units in the unit system which corresponds to the Accept-Language header provided.",
                "operationId": "getActivitiesLogList",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "beforeDate",
                        "in": "query",
                        "description": "The date in the format yyyy-MM-ddTHH:mm:ss. Only yyyy-MM-dd is required. Either beforeDate or afterDate should be specified.",
                        "required": false,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "afterDate",
                        "in": "query",
                        "description": "The date in the format yyyy-MM-ddTHH:mm:ss.",
                        "required": false,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "The sort order of entries by date asc (ascending) or desc (descending).",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "description": "The offset number of entries.",
                        "required": true,
                        "type": "integer",
                        "default": "0"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "The maximum number of entries returned (maximum;100).",
                        "required": true,
                        "type": "integer"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/activities/{log-id}.tcx": {
            "get": {
                "tags": [
                    "Activity"
                ],
                "summary": "Get Activity TCX",
                "description": "Retreives the details of a user's location and heart rate data during a logged exercise activity.",
                "operationId": "getActivitiesTCX",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "log-id",
                        "in": "path",
                        "description": "The activity's log ID.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "includePartialTCX",
                        "in": "query",
                        "description": "Include TCX points regardless of GPS data being present",
                        "required": false,
                        "type": "boolean"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "403": {
                        "description": "The request was a valid request, but the server is refusing to respond to it."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
         "/1/activities.json": {
            "get": {
                "tags": [
                    "Activity"
                ],
                "summary": "Browse Activity Types",
                "description": "Retreives a tree of all valid Fitbit public activities from the activities catelog as well as private custom activities the user created in the format requested.",
                "operationId": "getActivitiesTypes",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },

        "/1/activities/{activity-id}.json": {
            "get": {
                "tags": [
                    "Activity"
                ],
                "summary": "Get Activity Type",
                "description": "Returns the detail of a specific activity in the Fitbit activities database in the format requested. If activity has levels, it also returns a list of activity level details.",
                "operationId": "getActivitiesTypeDetail",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "activity-id",
                        "in": "path",
                        "description": "The activity ID.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },

        "/1/user/-/activities/frequent.json": {
            "get": {
                "tags": [
                    "Activity"
                ],
                "summary": "Get Frequent Activities",
                "description": "Retreives a list of a user's frequent activities in the format requested using units in the unit system which corresponds to the Accept-Language header provided.",
                "operationId": "getFrequentActivities",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },

        "/1/user/-/activities/recent.json": {
            "get": {
                "tags": [
                    "Activity"
                ],
                "summary": "Get Recent Activity Types",
                "description": "Retreives a list of a user's recent activities types logged with some details of the last activity log of that type using units in the unit system which corresponds to the Accept-Language header provided.",
                "operationId": "getRecentActivities",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                           "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },

        "/1/user/-/activities/favorite.json": {
            "get": {
                "tags": [
                    "Activity"
                ],
                "summary": "Get Favorite Activities",
                "description": "Returns a list of a user's favorite activities.",
                "operationId": "getFavoriteActivities",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },

        "/1/user/-/activities/favorite/{activity-id}.json": {
            "delete": {
                "tags": [
                    "Activity"
                ],
                "summary": "Delete Favorite Activity",
                "description": "Removes the activity with the given ID from a user's list of favorite activities.",
                "operationId": "deleteFavoriteActivities",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "activity-id",
                        "in": "path",
                        "description": "The ID of the activity to be removed.",
                        "required": true,
                        "type": "string"
                    }
                ],

                "responses": {
                    "204": {
                        "description": "No Content.  The request was successful."
                        },
                    "400": {
                        "description": "Bad Request.  The request likely contained bad syntax."
                        },
                    "401": {
                        "description": "Unauthorized.  The request requires user authentication."
                        }
                },
                "security": [
                    {
                        "oauth2": [
                           "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]

            },
             "post": {
                "tags": [
                    "Activity"
                ],
                "summary": "Add Favorite Activity",
                "description": "Adds the activity with the given ID to user's list of favorite activities.",
                "operationId": "addFavoriteActivities",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "activity-id",
                        "in": "path",
                        "description": "The encoded ID of the activity.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "201": {
                        "description": "The request fulfilled and new resource being created."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
              }
        },


        "/1/user/-/activities/goals/{period}.json": {
            "get": {
                "tags": [
                    "Activity"
                ],
                "summary": "Get Activity Goals",
                "description": "Retreives a user's current daily or weekly activity goals using measurement units as defined in the unit system, which corresponds to the Accept-Language header provided.",
                "operationId": "getActivitiesGoals",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "period",
                        "in": "path",
                        "description": "daily or weekly.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            },

            "post": {
                "tags": [
                    "Activity"
                ],
                "summary": "Update Activity Goals",
                "description": "Updates a user's daily or weekly activity goals and returns a response using units in the unit system which corresponds to the Accept-Language header provided.",
                "operationId": "addUpdateActivitiesGoals",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "period",
                        "in": "path",
                        "description": "daily or weekly.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "goal type",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "value",
                        "in": "query",
                        "description": "goal value",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },

        "/1/user/-/body/log/fat/date/{date}.json": {
            "get": {
                "tags": [
                    "Body"
                ],
                "summary": "Get Body Fat Logs",
                "description": "Retreives a list of all user's body fat log entries for a given day in the format requested.",
                "operationId": "getBodyFatByDate",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format yyyy-MM-dd.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },

        "/1/user/-/body/log/fat/date/{date}/{period}.json": {
            "get": {
                "tags": [
                    "Body"
                ],
                "summary": "Get Body Fat Logs",
                "description": "Retreives a list of all user's body fat log entries for a given day in the format requested.",
                "operationId": "getBodyFatByDatePeriod",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format yyyy-MM-dd.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "period",
                        "in": "path",
                        "description": "The range for which data will be returned. Options are 1d, 7d, 30d, 1w, 1m, 3m, 6m, 1y, or max.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                           "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },

        "/1/user/-/body/log/fat/date/{base-date}/{end-date}.json": {
            "get": {
                "tags": [
                    "Body"
                ],
                "summary": "Get Body Fat Logs",
                "description": "Retreives a list of all user's body fat log entries for a given day in the format requested.",
                "operationId": "getBodyFatByDateRange",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "base-date",
                        "in": "path",
                        "description": "The range start date in the format yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "end-date",
                        "in": "path",
                        "description": "The end date of the range.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
         "/1/user/-/body/log/fat.json": {
            "post": {
                "tags": [
                    "Body"
                ],
                "summary": "Log Body Fat",
                "description": "Creates a log entry for body fat and returns a response in the format requested.",
                "operationId": "addBodyFatLog",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "fat",
                        "in": "query",
                        "description": "Body fat in the format of X.XX in the unit system that corresponds to the Accept-Language header provided.",
                        "required": true,
                        "type": "integer"
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "description": "Log entry date in the format yyyy-MM-dd.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "time",
                        "in": "query",
                        "description": "Time of the measurement in hours and minutes in the format HH:mm:ss that is set to the last second of the day if not provided.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "201": {
                        "description": "The request has been fulfilled and resulted in a new resouce being created."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/body/log/fat/{body-fat-log-id}.json": {
            "delete": {
                "tags": [
                    "Body"
                ],
                "summary": "Delete Body Fat Log",
                "description": "Deletes a user's body fat log entry with the given ID.",
                "operationId": "deleteBodyFatLog",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "body-fat-log-id",
                        "in": "path",
                        "description": "The ID of the body fat log entry.",
                        "required": true,
                        "type": "integer"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content.  The request was successful."
                        },
                    "400": {
                        "description": "Bad Request.  The request likely contained bad syntax."
                        },
                    "401": {
                        "description": "Unauthorized.  The request requires user authentication."
                        }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/body/log/{goal-type}/goal.json": {
            "get": {
                "tags": [
                    "Body"
                ],
                "summary": "Get Body Goals",
                "description": "Retreives a user's current body fat percentage or weight goal using units in the unit systems that corresponds to the Accept-Language header providedin the format requested.",
                "operationId": "getBodyGoals",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "goal-type",
                        "in": "path",
                        "description": "weight or fat.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/body/log/fat/goal.json": {
            "post": {
                "tags": [
                    "Body"
                ],
                "summary": "Update Body Fat Goal",
                "description": "Updates user's fat percentage goal.",
                "operationId": "UpdateBodyFatGoal",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "fat",
                        "in": "query",
                        "description": "Target body fat percentage; in the format X.XX.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "201": {
                        "description": "The request has been fulfilled and resulted in a new resouce being created."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/body/log/weight/goal.json": {
            "post": {
                "tags": [
                    "Body"
                ],
                "summary": "Update Weight Goal",
                "description": "Updates user's fat percentage goal.",
                "operationId": "updateWeightGoal",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "startDate",
                        "in": "query",
                        "description": "Weight goal start date; in the format yyyy-MM-dd.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "startWeight",
                        "in": "query",
                        "description": "Weight goal start weight; in the format X.XX, in the unit systems that corresponds to the Accept-Language header provided.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "weight",
                        "in": "query",
                        "description": "Weight goal target weight; in the format X.XX, in the unit systems that corresponds to the Accept-Language header provided; required if user doesn't have an existing weight goal.",
                        "required": false,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "201": {
                        "description": "The request has been fulfilled and resulted in a new resouce being created."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "profile",
                            "heartrate",
                            "location"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/body/log/weight/date/{date}.json": {
            "get": {
                "tags": [
                    "Body"
                ],
                "summary": "Get Weight Logs",
                "description": "Retreives a list of all user's body weight log entries for a given day using units in the unit systems which corresponds to the Accept-Language header provided.",
                "operationId": "getWeightByDate",
                "produces": [
                    "application/json"
                ],
                 "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format yyyy-MM-dd.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/body/log/weight/date/{date}/{period}.json": {
            "get": {
                "tags": [
                    "Body"
                ],
                "summary": "Get Body Fat Logs",
                "description": "Retreives a list of all user's body weight log entries for a given day in the format requested.",
                "operationId": "getWeightByDatePeriod",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format yyyy-MM-dd.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "period",
                        "in": "path",
                        "description": "The range for which data will be returned. Options are 1d, 7d, 30d, 1w, 1m, 3m, 6m, 1y, or max.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                           "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },

        "/1/user/-/body/log/weight/date/{base-date}/{end-date}.json": {
            "get": {
                "tags": [
                    "Body"
                ],
                "summary": "Get Body Fat Logs",
                "description": "Retreives a list of all user's body fat log entries for a given day in the format requested.",
                "operationId": "getWeightByDateRange",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "base-date",
                        "in": "path",
                        "description": "The range start date in the format yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "end-date",
                        "in": "path",
                        "description": "The end date of the range.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },

        "/1/user/-/body/log/weight.json": {
            "post": {
                "tags": [
                    "Body"
                ],
                "summary": "Log Weight",
                "description": "Creates log entry for a body weight using units in the unit systems that corresponds to the Accept-Language header provided and gets a response in the format requested.",
                "operationId": "addWeightLog",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "weight",
                        "in": "query",
                        "description": "Weight in the format of X.XX.",
                        "required": true,
                        "type": "integer"
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "description": "Log entry date in the format yyyy-MM-dd.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "time",
                        "in": "query",
                        "description": "Time of the measurement; hours and minutes in the format of HH:mm:ss, which is set to the last second of the day if not provided.",
                        "required": false,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "201": {
                        "description": "The request has been fulfilled and resulted in a new resouce being created."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/body/log/weight/{body-weight-log-id}.json": {
            "delete": {
                "tags": [
                    "Body"
                ],
                "summary": "Delete Weight Log",
                "description": "Deletes a user's body weight log entrywith the given ID.",
                "operationId": "deleteWeightLog",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "body-weight-log-id",
                        "in": "path",
                        "description": "The ID of the body weight log entry.",
                        "required": true,
                        "type": "integer"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content.  The request was successful."
                        },
                    "400": {
                        "description": "Bad Request.  The request likely contained bad syntax."
                        },
                    "401": {
                        "description": "Unauthorized.  The request requires user authentication."
                        }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/body/{resource-path}/date/{date}/{period}.json": {
            "get": {
                "tags": [
                    "Body Time Series"
                ],
                "summary": "Get Body Time Series",
                "description": "Returns time series data in the specified range for a given resource in the format requested using units in the unit system that corresponds to the Accept-Language header provided.",
                "operationId": "getBodyResourceByDatePeriod",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "resource-path",
                        "in": "path",
                        "description": "The resource path, which incudes the bmi, fat, or weight options.",
                        "required": true,
                        "type": "string",
                        "enum": [
                          "bmi",
                          "fat",
                          "weight"
                          ],
                          "default": "weight"
                    },
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The range start date in the format yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "period",
                        "in": "path",
                        "description": "The range for which data will be returned. Options are 1d, 7d, 30d, 1w, 1m, 3m, 6m, 1y, or max.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/body/{resource-path}/date/{base-date}/{end-date}.json": {
            "get": {
                "tags": [
                    "Body Time Series"
                ],
                "summary": "Get Body Time Series",
                "description": "Returns time series data in the specified range for a given resource in the format requested using units in the unit system that corresponds to the Accept-Language header provided.",
                "operationId": "getBodyResourceByDateRange",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "resource-path",
                        "in": "path",
                        "description": "The resource path, which incudes the bmi, fat, or weight options.",
                        "required": true,
                        "type": "string",
                        "enum": [
                          "bmi",
                          "fat",
                          "weight"
                          ],
                          "default": "weight"
                    },
                    {
                        "name": "base-date",
                        "in": "path",
                        "description": "The range start date in the format yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "end-date",
                        "in": "path",
                        "description": "The end date of the range.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/br/date/{date}.json": {
            "get": {
                "tags": [
                    "Breathing Rate"
                ],
                "summary": "Get Breathing Rate Summary by Date",
                "description": "This endpoint returns average breathing rate data for a single date. Breathing Rate data applies specifically to a user’s “main sleep,” which is the longest single period of time during which they were asleep on a given date.",
                "operationId": "getBreathingRateSummaryByDate",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                           "respiratory_rate"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/br/date/{startDate}/{endDate}.json": {
            "get": {
                "tags": [
                    "Breathing Rate"
                ],
                "summary": "Get Breathing Rate Summary by Interval",
                "description": "This endpoint returns average breathing rate data for a date range. Breathing Rate data applies specifically to a user’s “main sleep,” which is the longest single period of time during which they were asleep on a given date.",
                "operationId": "getBreathingRateSummaryByInterval",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "startDate",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "endDate",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                           "respiratory_rate"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/br/date/{date}/all.json": {
            "get": {
                "tags": [
                    "Breathing Rate Intraday"
                ],
                "summary": "Get Breathing Rate Intraday by Date",
                "description": "This endpoint returns intraday breathing rate data for a single date. It measures the average breathing rate throughout the day and categories your breathing rate by sleep stage. Sleep stages vary between light sleep, deep sleep, REM sleep, and full sleep.",
                "operationId": "getBreathingRateIntradayByDate",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                           "respiratory_rate"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/br/date/{startDate}/{endDate}/all.json": {
            "get": {
                "tags": [
                    "Breathing Rate Intraday"
                ],
                "summary": "Get Breathing Rate Intraday by Interval",
                "description": "This endpoint returns intraday breathing rate data for a date range. It measures the average breathing rate throughout the day and categories your breathing rate by sleep stage. Sleep stages vary between light sleep, deep sleep, REM sleep, and full sleep.",
                "operationId": "getBreathingRateIntradayByInterval",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "startDate",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "endDate",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                           "respiratory_rate"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/cardioscore/date/{date}.json": {
            "get": {
                "tags": [
                    "Cardio Fitness Score (VO2 Max)"
                ],
                "summary": "Get VO2 Max Summary by Date",
                "description": "This endpoint returns the Cardio Fitness Score (VO2 Max) data for a single date. VO2 Max values will be shown as a range if no run data is available or a single numeric value if the user uses a GPS for runs.",
                "operationId": "getVo2MaxSummaryByDate",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                           "cardio_fitness"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/cardioscore/date/{startDate}/{endDate}.json": {
            "get": {
                "tags": [
                    "Cardio Fitness Score (VO2 Max)"
                ],
                "summary": "Get VO2 Max Summary by Interval",
                "description": "This endpoint returns the Cardio Fitness Score (VO2 Max) data for a date range. VO2 Max values will be shown as a range if no run data is available or a single numeric value if the user uses a GPS for runs.",
                "operationId": "getVo2MaxSummaryByInterval",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "startDate",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "endDate",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                           "cardio_fitness"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/devices.json": {
            "get": {
                "tags": [
                    "Devices"
                ],
                "summary": "Get Devices",
                "description": "Returns a list of the Fitbit devices connected to a user's account.",
                "operationId": "getDevices",
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                           "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/devices/tracker/{tracker-id}/alarms.json": {
            "get": {
                "tags": [
                    "Devices"
                ],
                "summary": "Get Alarms",
                "description": "Returns alarms for a device",
                "operationId": "getAlarms",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "tracker-id",
                        "in": "path",
                        "description": "The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint.",
                        "required": true,
                        "type": "integer"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
        },
            "post": {
                "tags": [
                    "Devices"
                ],
                "summary": "Add Alarm",
                "description": "Adds the alarm settings to a given ID for a given device.",
                "operationId": "addAlarms",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "tracker-id",
                        "in": "path",
                        "description": "The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint.",
                        "required": true,
                        "type": "integer"
                    },
                    {
                        "name": "time",
                        "in": "query",
                        "description": "Time of day that the alarm vibrates with a UTC timezone offset, e.g. 07:15-08:00.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "enabled",
                        "in": "query",
                        "description": "true or false. If false, alarm does not vibrate until enabled is set to true.",
                        "required": true,
                        "type": "boolean"
                    },
                    {
                        "name": "recurring",
                        "in": "query",
                        "description": "true or false. If false, the alarm is a single event.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "weekDays",
                        "in": "query",
                        "description": "Comma separated list of days of the week on which the alarm vibrates, e.g. MONDAY, TUESDAY.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "201": {
                        "description": "The request has been fulfilled and resulted in a new resouce being created."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },

        "/1/user/-/devices/tracker/{tracker-id}/alarms/{alarm-id}.json": {
            "post": {
                "tags": [
                    "Devices"
                ],
                "summary": "Update Alarm",
                "description": "Updates the alarm entry with a given ID for a given device. It also gets a response in the format requested.",
                "operationId": "updateAlarms",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "tracker-id",
                        "in": "path",
                        "description": "The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint.",
                        "required": true,
                        "type": "integer"
                    },
                    {
                        "name": "alarm-id",
                        "in": "path",
                        "description": "The ID of the alarm to be updated. The alarm-id value is found in the response of the Get Activity endpoint.",
                        "required": true,
                        "type": "integer"
                    },
                    {
                        "name": "time",
                        "in": "query",
                        "description": "Time of day that the alarm vibrates with a UTC timezone offset, e.g. 07:15-08:00.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "enabled",
                        "in": "query",
                        "description": "true or false. If false, the alarm does not vibrate until enabled is set to true.",
                        "required": true,
                        "type": "boolean"
                    },
                    {
                        "name": "recurring",
                        "in": "query",
                        "description": "true or false. If false, the alarm is a single event.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "weekDays",
                        "in": "query",
                        "description": "Comma seperated list of days of the week on which the alarm vibrates, e.g. MONDAY, TUESDAY.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "snoozeLength",
                        "in": "query",
                        "description": "Minutes between alarms.",
                        "required": true,
                        "type": "integer"
                    },
                    {
                        "name": "snoozeCount",
                        "in": "query",
                        "description": "Maximum snooze count.",
                        "required": true,
                        "type": "integer"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "201": {
                        "description": "The request has been fulfilled and resulted in a new resouce being created."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Devices"
                ],
                "summary": "Delete Alarm",
                "description": "Deletes the user's device alarm entry with the given ID for a given device.",
                "operationId": "deleteAlarms",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "tracker-id",
                        "in": "path",
                        "description": "The ID of the tracker whose alarms is managed. The tracker-id value is found via the Get Devices endpoint.",
                        "required": true,
                        "type": "integer"
                    },
                    {
                        "name": "alarm-id",
                        "in": "path",
                        "description": "The ID of the alarm to be updated. The alarm-id value is found via the Get Alarms endpoint.",
                        "required": true,
                        "type": "integer"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content.  The request was successful."
                        },
                    "400": {
                        "description": "Bad Request.  The request likely contained bad syntax."
                        },
                    "401": {
                        "description": "Unauthorized.  The request requires user authentication."
                        }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/ecg/list.json": {
            "get": {
                "tags": [
                    "Electrocardiogram"
                ],
                "summary": "Get ECG Log List",
                "description": "This endpoint is used for querying the user's on-device ECG readings.",
                "operationId": "getEcgLogList",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "beforeDate",
                        "in": "query",
                        "description": "The date in the format yyyy-MM-ddTHH:mm:ss. Only yyyy-MM-dd is required. Either beforeDate or afterDate should be specified.",
                        "required": false,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "afterDate",
                        "in": "query",
                        "description": "The date in the format yyyy-MM-ddTHH:mm:ss.",
                        "required": false,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "The sort order of entries by date asc (ascending) or desc (descending).",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "description": "The offset number of entries.",
                        "required": true,
                        "type": "integer",
                        "default": "0"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "The maximum number of entries returned (maximum;10).",
                        "required": true,
                        "type": "integer"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        }
                },
                "security": [
                    {
                        "oauth2": [
                            "electrocardiogram"
                        ]
                    }
                ]
            }
        },
        "/1.1/user/-/friends.json": {
            "get": {
                "tags": [
                    "Friends"
                ],
                "summary": "Get Friends",
                "description": "Returns data of a user's friends in the format requested using units in the unit system which corresponds to the Accept-Language header provided.",
                "operationId": "getFriends",
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                    },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The user's privacy settings prevent you from seeing their friends."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "social"
                        ]
                    }
                ]
            }
        },
        "/1.1/user/-/leaderboard/friends.json": {
            "get": {
                "tags": [
                    "Friends"
                ],
                "summary": "Get Friends Leaderboard",
                "description": "Returns data of a user's friends in the format requested using units in the unit system which corresponds to the Accept-Language header provided.",
                "operationId": "getFriendsLeaderboard",
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                    },
                    "401": {
                        "description": "The request requires user authentication."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "social"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/activities/heart/date/{date}/{period}.json": {
            "get": {
                "tags": [
                    "Heart Rate Time Series"
                ],
                "summary": "Get Heart Rate Time Series",
                "description": "Returns the time series data in the specified range for a given resource in the format requested using units in the unit systems that corresponds to the Accept-Language header provided.",
                "operationId": "getHeartByDatePeriod",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The end date of the period specified in the format yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "period",
                        "in": "path",
                        "description": "The range of which data will be returned. Options are 1d, 7d, 30d, 1w, and 1m.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                    },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/activities/heart/date/{base-date}/{end-date}.json": {
            "get": {
                "tags": [
                    "Heart Rate Time Series"
                ],
                "summary": "Get Heart Rate Time Series",
                "description": "Returns the time series data in the specified range for a given resource in the format requested using units in the unit systems that corresponds to the Accept-Language header provided.",
                "operationId": "getHeartByDateRange",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "base-date",
                        "in": "path",
                        "description": "The range start date in  the format yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "end-date",
                        "in": "path",
                        "description": "The end date of the range.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                    },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/activities/heart/date/{date}/{end-date}/{detail-level}.json": {
            "get": {
                "tags": [
                    "Heart Rate Intraday Time Series"
                ],
                "summary": "Get Heart Rate Intraday Time Series",
                "description": "Returns the intraday time series for a given resource in the format requested. If your application has the appropriate access, your calls to a time series endpoint for a specific day (by using start and end dates on the same day or a period of 1d), the response will include extended intraday values with a one-minute detail level for that day. Unlike other time series calls that allow fetching data of other users, intraday data is available only for and to the authorized user.",
                "operationId": "getHeartByDateRangeIntraday",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "end-date",
                        "in": "path",
                        "description": "The end date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "detail-level",
                        "in": "path",
                        "description": "The number of data points to include either 1sec, 1min, 5min or 15min.",
                        "required": true,
                        "type": "string",
                        "default": "1min"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                    },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/activities/heart/date/{date}/{end-date}/{detail-level}/time/{start-time}/{end-time}.json": {
            "get": {
                "tags": [
                    "Heart Rate Intraday Time Series"
                ],
                "summary": "Get Heart Rate Intraday Time Series",
                "description": "Returns the intraday time series for a given resource in the format requested. If your application has the appropriate access, your calls to a time series endpoint for a specific day (by using start and end dates on the same day or a period of 1d), the response will include extended intraday values with a one-minute detail level for that day. Unlike other time series calls that allow fetching data of other users, intraday data is available only for and to the authorized user.",
                "operationId": "getHeartByDateRangeTimestampIntraday",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "end-date",
                        "in": "path",
                        "description": "The end date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "detail-level",
                        "in": "path",
                        "description": "The number of data points to include either 1sec, 1min, 5min or 15min.",
                        "required": true,
                        "type": "string",
                        "default": "1min"
                    },
                    {
                        "name": "start-time",
                        "in": "path",
                        "description": "The start of the period in the format of HH:mm.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "end-time",
                        "in": "path",
                        "description": "The end time of the period in the format of HH:mm.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                    },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },

        "/1/user/-/activities/heart/date/{date}/1d/{detail-level}.json": {
            "get": {
                "tags": [
                    "Heart Rate Intraday Time Series"
                ],
                "summary": "Get Heart Rate Intraday Time Series",
                "description": "Returns the intraday time series for a given resource in the format requested. If your application has the appropriate access, your calls to a time series endpoint for a specific day (by using start and end dates on the same day or a period of 1d), the response will include extended intraday values with a one-minute detail level for that day. Unlike other time series calls that allow fetching data of other users, intraday data is available only for and to the authorized user.",
                "operationId": "getHeartByDateIntraday",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "detail-level",
                        "in": "path",
                        "description": "The number of data points to include either 1sec, 1min, 5min or 15min.",
                        "required": true,
                        "type": "string",
                        "default": "1min"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },

        "/1/user/-/activities/heart/date/{date}/1d/{detail-level}/time/{start-time}/{end-time}.json": {
            "get": {
                "tags": [
                    "Heart Rate Intraday Time Series"
                ],
                "summary": "Get Heart Rate Intraday Time Series",
                "description": "Returns the intraday time series for a given resource in the format requested. If your application has the appropriate access, your calls to a time series endpoint for a specific day (by using start and end dates on the same day or a period of 1d), the response will include extended intraday values with a one-minute detail level for that day. Unlike other time series calls that allow fetching data of other users, intraday data is available only for and to the authorized user.",
                "operationId": "getHeartByDateTimestampIntraday",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "detail-level",
                        "in": "path",
                        "description": "The number of data points to include either 1sec, 1min, 5min or 15min.",
                        "required": true,
                        "type": "string",
                        "default": "1min"
                    },
                    {
                        "name": "start-time",
                        "in": "path",
                        "description": "The start of the period in the format of HH:mm.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "end-time",
                        "in": "path",
                        "description": "The end time of the period in the format of HH:mm.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                           "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/hrv/date/{date}.json": {
            "get": {
                "tags": [
                    "Heart Rate Variability"
                ],
                "summary": "Get HRV Summary by Date",
                "description": "This endpoint returns the Heart Rate Variability (HRV) data for a single date. HRV data applies specifically to a user’s “main sleep,” which is the longest single period of time asleep on a given date.",
                "operationId": "getHrvSummaryDate",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                           "heartrate"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/hrv/date/{startDate}/{endDate}.json": {
            "get": {
                "tags": [
                    "Heart Rate Variability"
                ],
                "summary": "Get HRV Summary by Interval",
                "description": "This endpoint returns the Heart Rate Variability (HRV) data for a date range. HRV data applies specifically to a user’s “main sleep,” which is the longest single period of time asleep on a given date.",
                "operationId": "getHrvSummaryInterval",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "startDate",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "endDate",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                           "heartrate"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/hrv/date/{date}/all.json": {
            "get": {
                "tags": [
                    "Heart Rate Variability Intraday"
                ],
                "summary": "Get HRV Intraday by Date",
                "description": "This endpoint returns the Heart Rate Variability (HRV) intraday data for a single date. HRV data applies specifically to a user’s “main sleep,” which is the longest single period of time asleep on a given date.",
                "operationId": "getHrvIntradayByDate",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                           "heartrate"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/hrv/date/{startDate}/{endDate}/all.json": {
            "get": {
                "tags": [
                    "Heart Rate Variability Intraday"
                ],
                "summary": "Get HRV Intraday by Interval",
                "description": "This endpoint returns the Heart Rate Variability (HRV) intraday data for a single date. HRV data applies specifically to a user’s “main sleep,” which is the longest single period of time asleep on a given date.",
                "operationId": "getHrvIntradayByInterval",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "startDate",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "endDate",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                           "heartrate"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/irn/alerts/list.json": {
            "get": {
                "tags": [
                    "Irregular Rhythm Notifications"
                ],
                "summary": "Get IRN Alerts List",
                "description": "This endpoint returns a paginated list of Irregular Rhythm Notifications (IRN) alerts, as well as all of the alert tachograms. This endpoint will only return alerts that the user has read in the Fitbit app already, as that is meant as the primary entrypoint for viewing notifications.",
                "operationId": "getIrnAlertsList",
                "produces": [
                    "application/x-www-form-urlencoded"
                ],
                "parameters": [
                    {
                        "name": "beforeDate",
                        "in": "query",
                        "description": "The date in the format yyyy-MM-ddTHH:mm:ss. Only yyyy-MM-dd is required. Either beforeDate or afterDate should be specified.",
                        "required": false,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "afterDate",
                        "in": "query",
                        "description": "The date in the format yyyy-MM-ddTHH:mm:ss. Only yyyy-MM-dd is required. Either beforeDate or afterDate should be specified.",
                        "required": false,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "The sort order of entries by date. Use asc (ascending) when using afterDate. Use desc (descending) when using beforeDate.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "description": "The offset number of entries.",
                        "required": true,
                        "type": "integer",
                        "default": "0"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "The maximum number of entries returned (maximum;10).",
                        "required": true,
                        "type": "integer"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        }
                },
                "security": [
                    {
                        "oauth2": [
                            "irregular_rhythm_notifications"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/irn/profile.json": {
            "get": {
                "tags": [
                    "Irregular Rhythm Notifications"
                ],
                "summary": "Get IRN Profile",
                "description": "This endpoint returns the user state for Irregular Rhythm Notifications (IRN). The user state contains most information about the user’s current engagement with the feature, including onboarding progress and algorithm processing state.",
                "operationId": "getIrnProfile",
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "irregular_rhythm_notifications"
                        ]
                    }
                ]
            }
        },
        "/1/foods/locales.json": {
            "get": {
                "tags": [
                    "Nutrition"
                ],
                "summary": "Get Food Locales",
                "description": "Returns the food locales that the user may choose to search, log, and create food in.",
                "operationId": "getFoodsLocales",
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "nutrition"
                        ]
                    }
                ]
            }
          },
          "/1/user/-/foods/log/goal.json": {
              "get": {
                  "tags": [
                    "Nutrition"
                  ],
                  "summary": "Get Food Goals",
                  "description": "Returns a user's current daily calorie consumption goal and/or foodPlan value in the format requested.",
                  "operationId": "getFoodsGoal",
                  "produces": [
                      "application/json"
                  ],
                  "responses": {
                      "200": {
                          "description": "A successful request."
                          },
                      "400": {
                          "description": "The request had bad syntax or was inherently impossible to be satified."
                          },
                      "401": {
                          "description": "The request requires user authentication."
                          },
                      "403": {
                          "description": "The server understood the request, but is refusing to fulfill it."
                      }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]
              },

              "post": {
                  "tags": [
                    "Nutrition"
                  ],
                  "summary": "Update Food Goal",
                  "description": "Updates a user's daily calories consumption goal or food plan and returns a response in the format requested.",
                  "operationId": "addUpdateFoodsGoal",
                  "produces": [
                      "application/json"
                  ],
                  "parameters": [
                      {
                          "name": "calories",
                          "in": "query",
                          "description": "Manual calorie consumption goal in either calories or intensity must be provided.",
                          "required": true,
                          "type": "integer"
                      },
                      {
                          "name": "intensity",
                          "in": "query",
                          "description": "Food plan intensity (MAINTENANCE, EASIER, MEDIUM, KINDAHARD, or HARDER). Either calories or intensity must be provided.",
                          "required": false,
                          "type": "string"
                      },
                      {
                          "name": "personalized",
                          "in": "query",
                          "description": "Food plan type; true or false.",
                          "required": false,
                          "type": "string"
                      }
                  ],
                  "responses": {
                      "201": {
                          "description": "The request has been fulfilled and resulted in a new resource being created."
                       },
                      "400": {
                          "description": "The request had bad syntax or was inherently impossible to be satified."
                          },
                      "401": {
                          "description": "The request requires user authentication."
                          },
                      "403": {
                          "description": "The server understood the request, but is refusing to fulfill it."
                      }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]
              }
          },


          "/1/user/-/foods/log/date/{date}.json": {
              "get": {
                  "tags": [
                    "Nutrition"
                  ],
                  "summary": "Get Food Logs",
                  "description": "Retreives a summary and list of a user's food log entries for a given day in the format requested.",
                  "operationId": "getFoodsByDate",
                  "produces": [
                      "application/json"
                  ],
                  "parameters": [
                      {
                          "name": "date",
                          "in": "path",
                          "description": "The date of records to be returned. In the format yyyy-MM-dd.",
                          "required": true,
                          "type": "string",
                          "format": "date"
                      }
                  ],
                  "responses": {
                      "200": {
                          "description": "A successful request."
                          },
                      "400": {
                          "description": "The request had bad syntax or was inherently impossible to be satified."
                          },
                      "401": {
                          "description": "The request requires user authentication."
                          },
                      "403": {
                          "description": "The server understood the request, but is refusing to fulfill it."
                      }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]
              }
          },
          "/1/user/-/foods/log/water/date/{date}.json": {
              "get": {
                  "tags": [
                      "Nutrition"
                  ],
                  "summary": "Get Water Logs",
                  "description": "Retreives a summary and list of a user's water log entries for a given day in the requested using units in the unit system that corresponds to the Accept-Language header provided.",
                  "operationId": "getWaterByDate",
                  "produces": [
                      "application/json"
                  ],
                  "parameters": [
                      {
                          "name": "date",
                          "in": "path",
                          "description": "The date of records to be returned. In the format yyyy-MM-dd.",
                          "required": true,
                          "type": "string",
                          "format": "date"
                      }
                  ],
                  "responses": {
                      "200": {
                          "description": "A successful request."
                          },
                      "400": {
                          "description": "The request had bad syntax or was inherently impossible to be satified."
                          },
                      "401": {
                          "description": "The request requires user authentication."
                          },
                      "403": {
                          "description": "The server understood the request, but is refusing to fulfill it."
                      }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]
              }
          },

          "/1/user/-/foods/log/water/goal.json": {
              "get": {
                  "tags": [
                      "Nutrition"
                  ],
                  "summary": "Get Water Goal",
                  "description": "Retreives a summary and list of a user's water goal entries for a given day in the requested using units in the unit system that corresponds to the Accept-Language header provided.",
                  "operationId": "getWaterGoal",
                  "produces": [
                      "application/json"
                  ],
                  "responses": {
                      "200": {
                          "description": "A successful request."
                      }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]
              },
              "post": {
                  "tags": [
                      "Nutrition"
                  ],
                  "summary": "Update Water Goal",
                  "description": "Updates a user's daily calories consumption goal or food plan and returns a response in the format requested.",
                  "operationId": "addUpdateWaterGoal",
                  "produces": [
                      "application/json"
                  ],
                  "parameters": [
                      {
                          "name": "target",
                          "in": "query",
                          "description": "The target water goal in the format X.X is set in unit based on locale.",
                          "required": true,
                          "type": "integer"
                      }
                  ],
                  "responses": {
                      "201": {
                          "description": "The request has been fulfilled and resulted in a new resource being created."
                       },
                      "400": {
                          "description": "The request had bad syntax or was inherently impossible to be satified."
                          },
                      "401": {
                          "description": "The request requires user authentication."
                          },
                      "403": {
                          "description": "The server understood the request, but is refusing to fulfill it."
                      }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]
              }
          },

          "/1/user/-/foods/log/{resource-path}/date/{base-date}/{end-date}.json": {
              "get": {
                  "tags": [
                      "Nutrition Time Series"
                  ],
                  "summary": "Get Food or Water Time Series",
                  "description": "Updates a user's daily activity goals and returns a response using units in the unit system which corresponds to the Accept-Language header provided.",
                  "operationId": "getFoodsByDateRange",
                  "produces": [
                      "application/json"
                  ],
                  "parameters": [
                      {
                          "name": "resource-path",
                          "in": "path",
                          "description": "The resouce path. See options in the Resouce Path Options section in the full documentation.",
                          "required": true,
                          "type": "string",
                          "enum": [
                            "caloriesIn",
                            "water"
                            ],
                            "default": "caloriesIn"
                      },
                      {
                          "name": "base-date",
                          "in": "path",
                          "description": "The range start date in the format yyyy-MM-dd or today.",
                          "required": true,
                          "type": "string",
                          "format": "date"
                      },
                      {
                          "name": "end-date",
                          "in": "path",
                          "description": "The end date of the range.",
                          "required": true,
                          "type": "string",
                          "format": "date"
                      }
                  ],
                  "responses": {
                      "200": {
                          "description": "A successful request."
                       },
                      "400": {
                          "description": "The request had bad syntax or was inherently impossible to be satified."
                          },
                      "401": {
                          "description": "The request requires user authentication."
                          },
                      "403": {
                          "description": "The server understood the request, but is refusing to fulfill it."
                      }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]
              }
          },

          "/1/user/-/foods/log/{resource-path}/date/{date}/{period}.json": {
              "get": {
                  "tags": [
                      "Nutrition Time Series"
                  ],
                  "summary": "Get Food or Water Time Series",
                  "description": "Updates a user's daily activity goals and returns a response using units in the unit system which corresponds to the Accept-Language header provided.",
                  "operationId": "getFoodsResourceByDatePeriod",
                  "produces": [
                      "application/json"
                  ],
                  "parameters": [
                      {
                          "name": "resource-path",
                          "in": "path",
                          "description": "The resouce path. See options in the Resouce Path Options section in the full documentation.",
                          "required": true,
                          "type": "string",
                          "enum": [
                            "caloriesIn",
                            "water"
                            ],
                            "default": "caloriesIn"
                      },
                      {
                          "name": "date",
                          "in": "path",
                          "description": "The end date of the period specified in the format yyyy-MM-dd or today.",
                          "required": true,
                          "type": "string",
                          "format": "date"
                      },
                      {
                          "name": "period",
                          "in": "path",
                          "description": "The range for which data will be returned. Options are 1d, 7d, 30d, 1w, 3m, 6m, 1y, or max.",
                          "required": true,
                          "type": "string"
                      }
                  ],
                  "responses": {
                      "200": {
                          "description": "A successful request."
                          },
                      "400": {
                          "description": "The request had bad syntax or was inherently impossible to be satified."
                          },
                      "401": {
                          "description": "The request requires user authentication."
                          },
                      "403": {
                          "description": "The server understood the request, but is refusing to fulfill it."
                      }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]
              }
          },

          "/1/user/-/foods/log.json": {
              "post": {
                  "tags": [
                      "Nutrition"
                  ],
                  "summary": "Log Food",
                  "description": "Creates food log entries for users with or without foodId value.",
                  "operationId": "addFoodsLog",
                  "produces": [
                      "application/json"
                  ],
                  "parameters": [
                      {
                          "name": "foodId",
                          "in": "query",
                          "description": "The ID of the food to be logged. Either foodId or foodName must be provided.",
                          "required": true,
                          "type": "string"
                      },
                      {
                          "name": "foodName",
                          "in": "query",
                          "description": "Food entry name. Either foodId or foodName must be provided.",
                          "required": false,
                          "type": "string"
                      },
                      {
                          "name": "mealTypeId",
                          "in": "query",
                          "description": "Meal types. 1=Breakfast; 2=Morning Snack; 3=Lunch; 4=Afternoon Snack; 5=Dinner; 7=Anytime.",
                          "required": true,
                          "type": "string"
                      },
                      {
                          "name": "unitId",
                          "in": "query",
                          "description": "The ID of units used. Typically retrieved via a previous call to Get Food Logs, Search Foods, or Get Food Units.",
                          "required": true,
                          "type": "string"
                      },
                      {
                          "name": "amount",
                          "in": "query",
                          "description": "The amount consumed in the format X.XX in the specified unitId.",
                          "required": true,
                          "type": "string"
                      },
                      {
                          "name": "date",
                          "in": "query",
                          "description": "Log entry date in the format yyyy-MM-dd.",
                          "required": true,
                          "type": "string",
                          "format": "date"
                      },
                      {
                          "name": "favorite",
                          "in": "query",
                          "description": "The `true` value will add the food to the user's favorites after creating the log entry; while the `false` value will not. Valid only with foodId value.",
                          "required": false,
                          "type": "boolean"
                      },
                      {
                          "name": "brandName",
                          "in": "query",
                          "description": "Brand name of food. Valid only with foodName parameters.",
                          "required": false,
                          "type": "string"
                      },
                      {
                          "name": "calories",
                          "in": "query",
                          "description": "Calories for this serving size. This is allowed with foodName parameter (default to zero); otherwise it is ignored.",
                          "required": false,
                          "type": "integer"
                      }
                  ],
                  "responses": {
                      "201": {
                          "description": "The request has been fulfilled and resulted in a new resource being created."
                       },
                      "400": {
                          "description": "The request had bad syntax or was inherently impossible to be satified."
                          },
                      "401": {
                          "description": "The request requires user authentication."
                          },
                      "403": {
                          "description": "The server understood the request, but is refusing to fulfill it."
                      }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]
              }
          },
           "/1/user/-/foods/log/{food-log-id}.json": {
              "delete": {
                  "tags": [
                      "Nutrition"
                  ],
                  "summary": "Delete Food Log",
                  "description": "Deletes a user's food log entry with the given ID.",
                  "operationId": "deleteFoodsLog",
                  "produces": [
                      "application/json"
                  ],
                  "parameters": [
                      {
                          "name": "food-log-id",
                          "in": "path",
                          "description": "The ID of the food log entry to be deleted.",
                          "required": true,
                          "type": "string"
                      }
                  ],
                  "responses": {
                    "204": {
                        "description": "No Content.  The request was successful."
                        },
                    "400": {
                        "description": "Bad Request.  The request likely contained bad syntax."
                        },
                    "401": {
                        "description": "Unauthorized.  The request requires user authentication."
                        }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]
              },
               "post": {
                   "tags": [
                       "Nutrition"
                   ],
                   "summary": "Edit Food Log",
                   "description": "The Edit Food Log endpoint changes the quantity or calories consumed for a user's food log entry with the given Food Log ID.",
                   "operationId": "editFoodsLog",
                   "produces": [
                       "application/json"
                   ],
                   "parameters": [
                       {
                           "name": "food-log-id",
                           "in": "path",
                           "description": "The ID of the food log entry to be edited.",
                           "required": true,
                           "type": "string"
                       },
                       {
                           "name": "mealTypeId",
                           "in": "query",
                           "description": "Meal types. 1=Breakfast; 2=Morning Snack; 3=Lunch; 4=Afternoon Snack; 5=Dinner; 7=Anytime.",
                           "required": true,
                           "type": "string"
                       },
                       {
                           "name": "unitId",
                           "in": "query",
                           "description": "The ID of units used. Typically retrieved via a previous call to Get Food Logs, Search Foods, or Get Food Units.",
                           "required": true,
                           "type": "string"
                       },
                       {
                           "name": "amount",
                           "in": "query",
                           "description": "The amount consumed in the format X.XX in the specified unitId.",
                           "required": true,
                           "type": "string"
                       },
                       {
                           "name": "calories",
                           "in": "query",
                           "description": "Calories for this serving size. This is allowed with foodName parameter (default to zero); otherwise it is ignored.",
                           "required": false,
                           "type": "integer"
                       }
                   ],
                   "responses": {
                       "200": {
                           "description": "Successful request."
                       },
                       "400": {
                           "description": "The request had bad syntax or was inherently impossible to be satified."
                       },
                       "401": {
                           "description": "The request requires user authentication."
                       },
                       "403": {
                           "description": "The server understood the request, but is refusing to fulfill it."
                       }
                   },
                   "security": [
                       {
                           "oauth2": [
                            "nutrition"
                           ]
                       }
                   ]
               }
          },
          "/1/user/-/foods/log/water.json": {
              "post": {
                  "tags": [
                      "Nutrition"
                  ],
                  "summary": "Log Water",
                  "description": "Creates a log entry for water using units in the unit systems that corresponds to the Accept-Language header provided.",
                  "operationId": "addWaterLog",
                  "produces": [
                      "application/json"
                  ],
                  "parameters": [
                      {
                          "name": "date",
                          "in": "query",
                          "description": "The date of records to be returned in the format yyyy-MM-dd.",
                          "required": true,
                          "type": "string",
                          "format": "date"
                      },
                      {
                          "name": "amount",
                          "in": "query",
                          "description": "The amount consumption in the format X.XX and in the specified waterUnit or in the unit system that corresponds to the Accept-Language header provided.",
                          "required": true,
                          "type": "integer"
                      },
                      {
                          "name": "unit",
                          "in": "query",
                          "description": "Water measurement unit; `ml`, `fl oz`, or `cup`.",
                          "required": false,
                          "type": "string"
                      }
                  ],
                  "responses": {
                      "201": {
                          "description": "The request has been fulfilled and resulted in a new resource being created."
                       },
                      "400": {
                          "description": "The request had bad syntax or was inherently impossible to be satified."
                          },
                      "401": {
                          "description": "The request requires user authentication."
                          },
                      "403": {
                          "description": "The server understood the request, but is refusing to fulfill it."
                      }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]
              }
          },
          "/1/user/-/foods/log/water/{water-log-id}.json": {
              "delete": {
                  "tags": [
                      "Nutrition"
                  ],
                  "summary": "Delete Water Log",
                  "description": "Deletes a user's water log entry with the given ID.",
                  "operationId": "deleteWaterLog",
                  "produces": [
                      "application/json"
                  ],
                  "parameters": [
                      {
                          "name": "water-log-id",
                          "in": "path",
                          "description": "The ID of the waterUnit log entry to be deleted.",
                          "required": true,
                          "type": "string"
                      }
                  ],
                  "responses": {
                    "204": {
                        "description": "No Content.  The request was successful."
                        },
                    "400": {
                        "description": "Bad Request.  The request likely contained bad syntax."
                        },
                    "401": {
                        "description": "Unauthorized.  The request requires user authentication."
                        }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }

                  ]
              },
              "post": {
                  "tags": [
                      "Nutrition"
                  ],
                  "summary": "Update Water Log",
                  "description": "Updates a user's water log entry with the given ID.",
                  "operationId": "updateWaterLog",
                  "produces": [
                      "application/json"
                  ],
                  "parameters": [
                      {
                          "name": "water-log-id",
                          "in": "path",
                          "description": "The ID of the waterUnit log entry to be deleted.",
                          "required": true,
                          "type": "string"
                      },
                      {
                          "name": "amount",
                          "in": "query",
                          "description": "Amount consumed; in the format X.X and in the specified waterUnit or in the unit system that corresponds to the Accept-Language header provided.",
                          "required": true,
                          "type": "string"
                      },
                      {
                          "name": "unit",
                          "in": "query",
                          "description": "Water measurement unit. 'ml', 'fl oz', or 'cup'.",
                          "required": false,
                          "type": "string"
                      }
                  ],
                  "responses": {
                      "200": {
                          "description": "Successful request."
                          },
                      "400": {
                          "description": "The request had bad syntax or was inherently impossible to be satified."
                          },
                      "401": {
                          "description": "The request requires user authentication."
                          },
                      "403": {
                          "description": "The server understood the request, but is refusing to fulfill it."
                      }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }

                  ]
              }
          },
          "/1/user/-/foods/log/favorite.json": {
              "get": {
                  "tags": [
                      "Nutrition"
                  ],
                  "summary": "Get Favorite Foods",
                  "description": "Returns a list of a user's favorite foods in the format requested. A favorite food in the list provides a quick way to log the food via the Log Food endpoint.",
                  "operationId": "getFavoriteFoods",
                  "produces": [
                      "application/json"
                  ],
                  "responses": {
                      "200": {
                          "description": "Successful request."
                          },
                      "400": {
                          "description": "The request had bad syntax or was inherently impossible to be satified."
                          },
                      "401": {
                          "description": "The request requires user authentication."
                          },
                      "403": {
                          "description": "The server understood the request, but is refusing to fulfill it."
                      }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]
              }
          },

          "/1/user/-/foods/log/frequent.json": {
              "get": {
                  "tags": [
                      "Nutrition"
                  ],
                  "summary": "Get Frequent Foods",
                  "description": "Returns a list of a user's frequent foods in the format requested. A frequent food in the list provides a quick way to log the food via the Log Food endpoint.",
                  "operationId": "getFrequentFoods",
                  "produces": [
                      "application/json"
                  ],
                  "responses": {
                      "200": {
                          "description": "Successful request."
                          },
                      "400": {
                          "description": "The request had bad syntax or was inherently impossible to be satified."
                          },
                      "401": {
                          "description": "The request requires user authentication."
                          },
                      "403": {
                          "description": "The server understood the request, but is refusing to fulfill it."
                      }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]
              }
            },

          "/1/user/-/foods/log/favorite/{food-id}.json": {
              "post": {
                  "tags": [
                      "Nutrition"
                  ],
                  "summary": "Add Favorite Food",
                  "description": "Updates a user's daily activity goals and returns a response using units in the unit system which corresponds to the Accept-Language header provided.",
                  "operationId": "addFavoriteFood",
                  "produces": [
                      "application/json"
                  ],
                  "parameters": [
                      {
                          "name": "food-id",
                          "in": "path",
                          "description": "The ID of the food to be added to user's favorites.",
                          "required": true,
                          "type": "string"
                      }
                  ],
                  "responses": {
                       "200": {
                          "description": "Successful request."
                          },
                      "400": {
                          "description": "The request had bad syntax or was inherently impossible to be satified."
                          },
                      "401": {
                          "description": "The request requires user authentication."
                          },
                      "403": {
                          "description": "The server understood the request, but is refusing to fulfill it."
                          }
                      },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]

          },


              "delete": {
                  "tags": [
                      "Nutrition"
                  ],
                  "summary": "Delete Favorite Food",
                  "description": "Deletes a food with the given ID to the user's list of favorite foods.",
                  "operationId": "deleteFavoriteFood",
                  "produces": [
                      "application/json"
                  ],
                  "parameters": [
                      {
                          "name": "food-id",
                          "in": "path",
                          "description": "The ID of the food to be deleted from user's favorites.",
                          "required": true,
                          "type": "string"
                      }
                  ],
                  "responses": {
                    "204": {
                        "description": "No Content.  The request was successful."
                        },
                    "400": {
                        "description": "Bad Request.  The request likely contained bad syntax."
                        },
                    "401": {
                        "description": "Unauthorized.  The request requires user authentication."
                        }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]
              }
          },

          "/1/user/-/meals.json": {
              "get": {
                  "tags": [
                      "Nutrition"
                  ],
                  "summary": "Get Meals",
                  "description": "Returns a list of meals created by user in the user's food log in the format requested. User creates and manages meals on the Food Log tab on the website.",
                  "operationId": "getMeals",
                  "produces": [
                      "application/json"
                  ],
                  "responses": {
                      "200": {
                          "description": "Successful request."
                          },
                      "400": {
                          "description": "The request had bad syntax or was inherently impossible to be satified."
                          },
                      "401": {
                          "description": "The request requires user authentication."
                          },
                      "403": {
                          "description": "The server understood the request, but is refusing to fulfill it."
                      }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]
              },
              "post": {
                  "tags": [
                      "Nutrition"
                  ],
                  "summary": "Create Meal",
                  "description": "Creates a meal with the given food contained in the post body.",
                  "operationId": "addMeal",
                  "consumes": ["application/json"],
                  "produces": [
                      "application/json"
                  ],
                  "parameters": [
                      {
                          "in": "body",
                          "name": "meal",
                          "description": "Meal to create",
                          "required": true,
                          "schema": {
                            "$ref": "#/definitions/Meal"
                          }
                      }
                  ],
                  "responses": {
                      "200": {
                          "description": "Successful request."
                          },
                      "400": {
                          "description": "The request had bad syntax or was inherently impossible to be satified."
                          },
                      "401": {
                          "description": "The request requires user authentication."
                          },
                      "403": {
                          "description": "The server understood the request, but is refusing to fulfill it."
                      }
                  },
                  "security": [
                      {
                          "oauth2": [
                              "nutrition"
                          ]
                      }
                  ]
              }
          },

          "/1/user/-/meals/{meal-id}.json":{
            "post": {
                "tags": [
                    "Nutrition"
                ],
                "summary": "Update Meal",
                "description": "Replaces an existing meal with the contents of the request. The response contains the updated meal.",
                "operationId": "updateMeal",
                "consumes": ["application/json"],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "in": "body",
                        "name": "meal",
                        "description": "Meal to create",
                        "required": true,
                        "schema": {
                          "$ref": "#/definitions/Meal"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                        },
                    "400": {
                        "description": "The request had bad syntax or was inherently impossible to be satified."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                        },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "nutrition"
                        ]
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Nutrition"
                ],
                "summary": "Delete Meal",
                "description": "Deletes a user's meal with the given meal id.",
                "operationId": "deleteMeal",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "meal-id",
                        "in": "path",
                        "description": "Id of the meal to delete.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content.  The request was successful."
                        },
                    "400": {
                        "description": "Bad Request.  The request likely contained bad syntax."
                        },
                    "401": {
                        "description": "Unauthorized.  The request requires user authentication."
                        }
                },
                "security": [
                    {
                        "oauth2": [
                            "nutrition"
                        ]
                    }
                ]
            }
          },

          "/1/user/-/foods/log/recent.json": {
              "get": {
                  "tags": [
                      "Nutrition"
                  ],
                  "summary": "Get Recent Foods",
                  "description": "Returns a list of a user's frequent foods in the format requested. A frequent food in the list provides a quick way to log the food via the Log Food endpoint.",
                  "operationId": "getRecentFoods",
                  "produces": [
                      "application/json"
                  ],
                  "responses": {
                      "200": {
                          "description": "Successful request."
                          },
                      "400": {
                          "description": "The request had bad syntax or was inherently impossible to be satified."
                          },
                      "401": {
                          "description": "The request requires user authentication."
                          },
                      "403": {
                          "description": "The server understood the request, but is refusing to fulfill it."
                      }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]
              }
          },

          "/1/user/-/foods.json": {
              "post": {
                  "tags": [
                      "Nutrition"
                  ],
                  "summary": "Create Food",
                  "description": "Creates a new private food for a user and returns a response in the format requested. The created food is found via the Search Foods call.",
                  "operationId": "addFoods",
                  "produces": [
                      "application/json"
                  ],
                  "parameters": [
                      {
                          "name": "name",
                          "in": "query",
                          "description": "The food name.",
                          "required": true,
                          "type": "string"
                      },
                      {
                          "name": "defaultFoodMeasurementUnitId",
                          "in": "query",
                          "description": "The ID of the default measurement unit. Full list of units can be retrieved via the Get Food Units endpoint.",
                          "required": true,
                          "type": "string"
                      },
                      {
                          "name": "defaultServingSize",
                          "in": "query",
                          "description": "The size of the default serving. Nutrition values should be provided for this serving size.",
                          "required": true,
                          "type": "string"
                      },
                      {
                          "name": "calories",
                          "in": "query",
                          "description": "The calories in the default serving size.",
                          "required": true,
                          "type": "string"
                      },
                      {
                          "name": "formType",
                          "in": "query",
                          "description": "Form type; LIQUID or DRY.",
                          "required": false,
                          "type": "string"
                      },
                      {
                          "name": "description",
                          "in": "query",
                          "description": "The description of the food.",
                          "required": false,
                          "type": "string"
                      }
                  ],
                  "responses": {
                      "201": {
                          "description": "The request has been fulfilled and resulted in a new resource being created."
                          },
                      "400": {
                          "description": "The request had bad syntax or was inherently impossible to be satified."
                          },
                      "401": {
                          "description": "The request requires user authentication."
                          },
                      "403": {
                          "description": "The server understood the request, but is refusing to fulfill it."
                      }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]
              }
          },

          "/1/user/-/foods/{food-id}.json": {
              "delete": {
                  "tags": [
                      "Nutrition"
                  ],
                  "summary": "Delete Custom Food",
                  "description": "Deletes custom food for a user and returns a response in the format requested.",
                  "operationId": "deleteFoods",
                  "produces": [
                      "application/json"
                  ],
                  "parameters": [
                      {
                          "name": "food-id",
                          "in": "path",
                          "description": "The ID of the food to be deleted.",
                          "required": true,
                          "type": "string"
                      }
                  ],
                  "responses": {
                    "204": {
                        "description": "No Content.  The request was successful."
                        },
                    "400": {
                        "description": "Bad Request.  The request likely contained bad syntax."
                        },
                    "401": {
                        "description": "Unauthorized.  The request requires user authentication."
                        }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]
              }
          },

          "/1/foods/{food-id}.json": {
              "get": {
                  "tags": [
                      "Nutrition"
                  ],
                  "summary": "Get Food",
                  "description": "Returns the details of a specific food in the Fitbit food databases or a private food that an authorized user has entered in the format requested.",
                  "operationId": "getFoodsInfo",
                  "produces": [
                      "application/json"
                  ],
                  "parameters": [
                      {
                          "name": "food-id",
                          "in": "path",
                          "description": "The ID of the food.",
                          "required": true,
                          "type": "string"
                      }
                  ],
                  "responses": {
                      "200": {
                          "description": "Successful request."
                       },
                      "400": {
                          "description": "The request had bad syntax or was inherently impossible to be satified."
                          },
                      "401": {
                          "description": "The request requires user authentication."
                          },
                      "403": {
                          "description": "The server understood the request, but is refusing to fulfill it."
                      }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]
              }
          },

          "/1/foods/units.json": {
              "get": {
                  "tags": [
                      "Nutrition"
                  ],
                  "summary": "Get Food Units",
                  "description": "Returns a list of all valid Fitbit food units in the format requested.",
                  "operationId": "getFoodsUnits",
                  "produces": [
                      "application/json"
                  ],
                  "responses": {
                      "200": {
                          "description": "Successful request."
                       },
                      "400": {
                          "description": "The request had bad syntax or was inherently impossible to be satified."
                          },
                      "401": {
                          "description": "The request requires user authentication."
                          },
                      "403": {
                          "description": "The server understood the request, but is refusing to fulfill it."
                      }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]
              }
          },

          "/1/foods/search.json": {
              "get": {
                  "tags": [
                      "Nutrition"
                  ],
                  "summary": "Search Foods",
                  "description": "Returns a list of public foods from the Fitbit food database and private food the user created in the format requested.",
                  "operationId": "getFoodsList",
                  "produces": [
                      "application/json"
                  ],
                  "parameters": [
                      {
                          "name": "query",
                          "in": "query",
                          "description": "The URL-encoded search query.",
                          "required": true,
                          "type": "string"
                      }
                  ],
                  "responses": {
                      "200": {
                          "description": "A successful request."
                          },
                      "400": {
                          "description": "The request had bad syntax or was inherently impossible to be satified."
                          },
                      "401": {
                          "description": "The request requires user authentication."
                          },
                      "403": {
                          "description": "The server understood the request, but is refusing to fulfill it."
                      }
                  },
                  "security": [
                      {
                          "oauth2": [
                            "nutrition"
                          ]
                      }
                  ]
              }
          },
          "/1.2/user/-/sleep/{log-id}.json": {
            "delete": {
                "tags": [
                    "Sleep"
                ],
                "summary": "Delete Sleep Log",
                "description": "Deletes a user's sleep log entry with the given ID.",
                "operationId": "deleteSleep",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "log-id",
                        "in": "path",
                        "description": "The ID of the sleep log to be deleted.",
                        "required": true,
                        "type": "string"
                    }

                ],
                "responses": {
                    "204": {
                        "description": "No Content.  The request was successful."
                        },
                    "400": {
                        "description": "Bad Request.  The request likely contained bad syntax."
                        },
                    "401": {
                        "description": "Unauthorized.  The request requires user authentication."
                        }
                },
                "security": [
                    {
                        "oauth2": [
                           "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1.2/user/-/sleep/date/{date}.json": {
            "get": {
                "tags": [
                    "Sleep"
                ],
                "summary": "Get Sleep Log",
                "description": "The Get Sleep Logs by Date endpoint returns a summary and list of a user's sleep log entries (including naps) as well as detailed sleep entry data for a given day.",
                "operationId": "getSleepByDate",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date of records to be returned. In the format yyyy-MM-dd.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }

                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1.2/user/-/sleep/date/{base-date}/{end-date}.json": {
            "get": {
                "tags": [
                    "Sleep"
                ],
                "summary": "Get Sleep Logs by Date Range",
                "description": "The Get Sleep Logs by Date Range endpoint returns a list of a user's sleep log entries (including naps) as well as detailed sleep entry data for a given date range (inclusive of start and end dates).",
                "operationId": "getSleepByDateRange",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "base-date",
                        "in": "path",
                        "description": "The date of records to be returned. In the format yyyy-MM-dd.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "end-date",
                        "in": "path",
                        "description": "The date of records to be returned. In the format yyyy-MM-dd.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }

                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1.2/user/-/sleep/list.json": {
            "get": {
                "tags": [
                    "Sleep"
                ],
                "summary": "Get Sleep Logs List",
                "description": "The Get Sleep Logs List endpoint returns a list of a user's sleep logs (including naps) before or after a given day with offset, limit, and sort order.",
                "operationId": "getSleepList",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "beforeDate",
                        "in": "query",
                        "description": "The date in the format yyyy-MM-ddTHH:mm:ss. Only yyyy-MM-dd is required. Either beforeDate or afterDate should be specified.",
                        "required": false,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "afterDate",
                        "in": "query",
                        "description": "The date in the format yyyy-MM-ddTHH:mm:ss.",
                        "required": false,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "The sort order of entries by date asc (ascending) or desc (descending).",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "description": "The offset number of entries.",
                        "required": true,
                        "type": "integer",
                        "default": "0"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "The maximum number of entries returned (maximum;100).",
                        "required": true,
                        "type": "integer"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },

        "/1.2/user/-/sleep/goal.json": {
            "get": {
                "tags": [
                    "Sleep"
                ],
                "summary": "Get Sleep Goal",
                "description": "Returns the user's sleep goal.",
                "operationId": "getSleepGoal",
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            },
            "post": {
                "tags": [
                    "Sleep"
                ],
                "summary": "Update Sleep Goal",
                "description": "Create or update the user's sleep goal and get a response in the JSON format.",
                "operationId": "updateSleepGoal",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "minDuration",
                        "in": "query",
                        "description": "Duration of sleep goal.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1.2/user/-/sleep.json": {
            "post": {
                "tags": [
                    "Sleep"
                ],
                "summary": "Log Sleep",
                "description": "Creates a log entry for a sleep event and returns a response in the format requested.",
                "operationId": "addSleep",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "startTime",
                        "in": "query",
                        "description": "Start time includes hours and minutes in the format HH:mm.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "duration",
                        "in": "query",
                        "description": "Duration in milliseconds.",
                        "required": true,
                        "type": "integer"
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "description": "Log entry in the format yyyy-MM-dd.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }

                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/spo2/date/{date}.json": {
            "get": {
                "tags": [
                    "SpO2"
                ],
                "summary": "Get SpO2 Summary by Date",
                "description": "This endpoint returns the SpO2 summary data for a single date. SpO2 applies specifically to a user’s “main sleep”, which is the longest single period of time asleep on a given date.",
                "operationId": "getSpO2SummaryByDate",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                           "oxygen_saturation"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/spo2/date/{startDate}/{endDate}.json": {
            "get": {
                "tags": [
                    "SpO2"
                ],
                "summary": "Get SpO2 Summary by Interval",
                "description": "This endpoint returns the SpO2 summary data for a date range. SpO2 applies specifically to a user’s “main sleep”, which is the longest single period of time asleep on a given date.",
                "operationId": "getSpO2SummaryByInterval",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "startDate",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "endDate",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                           "oxygen_saturation"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/spo2/date/{date}/all.json": {
            "get": {
                "tags": [
                    "SpO2 Intraday"
                ],
                "summary": "Get SpO2 Intraday by Date",
                "description": "This endpoint returns the SpO2 intraday data for a single date. SpO2 applies specifically to a user’s “main sleep”, which is the longest single period of time asleep on a given date.",
                "operationId": "getSpO2IntradayByDate",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                           "oxygen_saturation"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/spo2/date/{startDate}/{endDate}/all.json": {
            "get": {
                "tags": [
                    "SpO2 Intraday"
                ],
                "summary": "Get SpO2 Intraday by Interval",
                "description": "This endpoint returns the SpO2 intraday data for a specified date range. SpO2 applies specifically to a user’s “main sleep”, which is the longest single period of time asleep on a given date.",
                "operationId": "getSpO2IntradayByInterval",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "startDate",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "endDate",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                           "oxygen_saturation"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/{collection-path}/apiSubscriptions.json": {
            "get": {
                "tags": [
                    "Subscriptions"
                ],
                "summary": "Get a List of Subscriptions",
                "description": "Retreives a list of a user's subscriptions for your application in the format requested. You can either fetch subscriptions for a specific collection or the entire list of subscriptions for the user. For best practice, make sure that your application maintains this list on your side and use this endpoint only to periodically ensure data consistency.",
                "operationId": "getSubscriptionsList",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "collection-path",
                        "in": "path",
                        "description": "This is the resource of the collection to receive notifications from (foods, activities, sleep, or body). If not present, subscription will be created for all collections. If you have both all and specific collection subscriptions, you will get duplicate notifications on that collections' updates. Each subscriber can have only one subscription for a specific user's collection.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Returned if the given user is already subscribed to the stream."
                        },
                    "201": {
                        "description": "Returned if a new subscription was created in response to your request."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/{collection-path}/apiSubscriptions/{subscription-id}.json": {
            "post": {
                "tags": [
                    "Subscriptions"
                ],
                "summary": "Add a Subscription",
                "description": "Adds a subscription in your application so that users can get notifications and return a response in the format requested. The subscription-id value provides a way to associate an update with a particular user stream in your application.",
                "operationId": "addSubscriptions",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "collection-path",
                        "in": "path",
                        "description": "This is the resource of the collection to receive notifications from (foods, activities, sleep, or body). If not present, subscription will be created for all collections. If you have both all and specific collection subscriptions, you will get duplicate notifications on that collections' updates. Each subscriber can have only one subscription for a specific user's collection.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "subscription-id",
                        "in": "path",
                        "description": "This is the unique ID of the subscription created by the API client application. Each ID must be unique across the entire set of subscribers and collections. The Fitbit servers will pass this ID back along with any notifications about the user indicated by the user parameter in the URL path.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Returned if the given user is already subscribed to the stream."
                        },
                    "201": {
                        "description": "Returned if a new subscription was created in response to your request."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Subscriptions"
                ],
                "summary": "Delete a Subscription",
                "description": "Deletes a subscription for a user..",
                "operationId": "deleteSubscriptions",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "collection-path",
                        "in": "path",
                        "description": "This is the resource of the collection to receive notifications from (foods, activities, sleep, or body). If not present, subscription will be created for all collections. If you have both all and specific collection subscriptions, you will get duplicate notifications on that collections' updates. Each subscriber can have only one subscription for a specific user's collection.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "subscription-id",
                        "in": "path",
                        "description": "This is the resource of the collection to receive notifications from (foods, activities, sleep, or body). If not present, subscription will be created for all collections. If you have both all and specific collection subscriptions, you will get duplicate notifications on that collections' updates. Each subscriber can have only one subscription for a specific user's collection.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content.  The request was successful."
                        },
                    "400": {
                        "description": "Bad Request.  The request likely contained bad syntax."
                        },
                    "401": {
                        "description": "Unauthorized.  The request requires user authentication."
                        }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/temp/core/date/{date}.json": {
            "get": {
                "tags": [
                    "Temperature"
                ],
                "summary": "Get Temperature (Core) Summary by Date",
                "description": "Returns the Temperature (Core) data for a single date. Temperature (Core) data applies specifically to data logged manually by the user throughout the day.",
                "operationId": "getTempCoreSummaryByDate",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "temperature"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/temp/core/date/{startDate}/{endDate}.json": {
            "get": {
                "tags": [
                    "Temperature"
                ],
                "summary": "Get Temperature (Core) Summary by Interval",
                "description": "Returns Temperature (Core) data for a date range. Temperature (Core) data applies specifically to data logged manually by the user throughout the day and the maximum date range cannot exceed 30 days.",
                "operationId": "getTempCoreSummaryByInterval",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "startDate",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "endDate",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "temperature"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/temp/skin/date/{date}.json": {
            "get": {
                "tags": [
                    "Temperature"
                ],
                "summary": "Get Temperature (Skin) Summary by Date",
                "description": "Returns the Temperature (Skin) data for a single date. Temperature (Skin) data applies specifically to a user’s “main sleep”, which is the longest single period of time asleep on a given date.",
                "operationId": "getTempSkinSummaryDate",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "temperature"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/temp/skin/date/{startDate}/{endDate}.json": {
            "get": {
                "tags": [
                    "Temperature"
                ],
                "summary": "Get Temperature (Skin) Summary by Interval",
                "description": "Returns Temperature (Skin) data for a date range. It only returns a value for dates on which the Fitbit device was able to record Temperature (skin) data and the maximum date range cannot exceed 30 days.",
                "operationId": "getTempSkinSummaryByInterval",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "startDate",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "endDate",
                        "in": "path",
                        "description": "The date in the format of yyyy-MM-dd or today.",
                        "required": true,
                        "type": "string",
                        "format": "date"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful request."
                     },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "403": {
                        "description": "The server understood the request, but is refusing to fulfill it."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "temperature"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/badges.json": {
            "get": {
                "tags": [
                    "User"
                ],
                "summary": "Get Badges",
                "description": "Retrieves the user's badges in the format requested. Response includes all badges for the user as seen on the Fitbit website badge locker (both activity and weight related.) The endpoint returns weight and distance badges based on the user's unit profile preference as on the website.",
                "operationId": "getBadges",
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "201": {
                        "description": "Returned if a new subscription was created in response to your request."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "weight"
                        ]
                    }
                ]
            }
        },
        "/1/user/-/profile.json": {
            "get": {
                "tags": [
                    "User"
                ],
                "summary": "Get Profile",
                "description": "Returns a user's profile. The authenticated owner receives all values. However, the authenticated user's access to other users' data is subject to those users' privacy settings. Numerical values are returned in the unit system specified in the Accept-Language header.",
                "operationId": "getProfile",
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "201": {
                        "description": "Returned if a new subscription was created in response to your request."
                        },
                    "401": {
                        "description": "The request requires user authentication."
                    },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                            "location",
                            "profile",
                            "weight"
                        ]
                    }
                ]
            }
        },
            "post": {
                "tags": [
                    "User"
                ],
                "summary": "Update Profile",
                "description": "Updates a user's profile using a form.",
                "operationId": "updateProfile",
                "consumes": [
                    "multipart/form-data"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "gender",
                        "in": "formData",
                        "description": "The sex of the user; (MALE/FEMALE/NA).",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "birthday",
                        "in": "formData",
                        "description": "The date of birth in the format of yyyy-MM-dd.",
                        "required": false,
                        "type": "string",
                        "format": "date"
                    },
                    {
                        "name": "height",
                        "in": "formData",
                        "description": "The height in the format X.XX in the unit system that corresponds to the Accept-Language header provided.",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "aboutMe",
                        "in": "formData",
                        "description": "This is a short description of user.",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "fullname",
                        "in": "formData",
                        "description": "The fullname of the user.",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "country",
                        "in": "formData",
                        "description": "The country of the user's residence. This is a two-character code.",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "state",
                        "in": "formData",
                        "description": "The US state of the user's residence. This is a two-character code if the country was or is set to US.",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "city",
                        "in": "formData",
                        "description": "The US city of the user's residence.",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "strideLengthWalking",
                        "in": "formData",
                        "description": "Walking stride length in the format X.XX, where it is in the unit system that corresponds to the Accept-Language header provided.",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "strideLengthRunning",
                        "in": "formData",
                        "description": "Running stride length in the format X.XX, where it is in the unit system that corresponds to the Accept-Language header provided.",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "weightUnit",
                        "in": "formData",
                        "description": "Default weight unit on website (which doesn't affect API); one of (en_US, en_GB, 'any' for METRIC).",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "heightUnit",
                        "in": "formData",
                        "description": "Default height/distance unit on website (which doesn't affect API); one of (en_US, en_GB, 'any' for METRIC).",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "waterUnit",
                        "in": "formData",
                        "description": "Default water unit on website (which doesn't affect API); one of (en_US, en_GB, 'any' for METRIC).",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "glucoseUnit",
                        "in": "formData",
                        "description": "Default glucose unit on website (which doesn't affect API); one of (en_US, en_GB, 'any' for METRIC).",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "timezone",
                        "in": "formData",
                        "description": "The timezone in the format 'America/Los_Angeles'.",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "foodsLocale",
                        "in": "formData",
                        "description": "The food database locale in the format of xx.XX.",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "locale",
                        "in": "formData",
                        "description": "The locale of the website (country/language); one of the locales, currently – (en_US, fr_FR, de_DE, es_ES, en_GB, en_AU, en_NZ, ja_JP).",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "localeLang",
                        "in": "formData",
                        "description": "The Language in the format 'xx'. You should specify either locale or both - localeLang and localeCountry (locale is higher priority).",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "localeCountry",
                        "in": "formData",
                        "description": "The Country in the format 'xx'. You should specify either locale or both - localeLang and localeCountry (locale is higher priority).",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "startDayOfWeek",
                        "in": "formData",
                        "description": "The Start day of the week, meaning what day the week should start on. Either Sunday or Monday.",
                        "required": false,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A successful request."
                        },
                    "201": {
                        "description": "Returned if a new subscription was created in response to your request."
                        },
                    "409": {
                        "description": "Returned if the given user is already subscribed to this stream using a different subscription ID, OR if the given subscription ID is already used to identify a subscription to a different stream."
                    }
                },
                "security": [
                    {
                        "oauth2": [
                           "activity",
                            "heartrate",
                            "location",
                            "nutrition",
                            "profile",
                            "settings",
                            "sleep",
                            "social",
                            "temperature",
                            "weight"
                        ]
                    }
                ]
            }

    },
    "securityDefinitions": {
        "oauth2": {
            "type": "oauth2",
            "authorizationUrl": "https://www.fitbit.com/oauth2/authorize",
            "flow": "implicit",
            "scopes": {
                "activity": "Activity data and exercise log related features, such as steps, distance, calories burned, and active minutes",
                "cardio_fitness": "Maximum or optimum rate at which the user’s heart, lungs, and muscles can effectively use oxygen during exercise",
                "electrocardiogram": "A users on-device ECG readings",
                "heartrate": "Continuous heart rate & HRV data and related analysis",
                "irregular_rhythm_notifications": "Includes the users engagement and list of irregular rhythm notification alerts.",
                "location": "GPS and other location data",
                "nutrition": "Calorie consumption and nutrition related features, such as food/water logging, goals, and plans",
                "oxygen_saturation": "SpO2 (Oxygen Saturation) is a measurement of your blood oxygen level",
                "profile": "Basic user information",
                "respiratory_rate": "Respiratory Rate is a measurement of your breaths at night.",
                "settings": "User account and device settings, such as alarms",
                "sleep": "Sleep logs and related sleep analysis",
                "social": "Friend-related features, such as friend list and leaderboard",
                "temperature": "Core and skin temperature data",
                "weight": "Weight and related information, such as body mass index, body fat percentage, and goals"
            }
        }
    },
    "definitions": {
        "Meal": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string",
                    "example": "Breakfast"
                },
                "description": {
                    "type": "string",
                    "example": "I eat every morning"
                },
                "mealFoods": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/FoodItem"
                    }
                }

            }
        },
        "FoodItem": {
            "type": "object",
            "properties": {
                "foodId": {
                    "type": "integer",
                    "example": 82782
                },
                "amount": {
                    "type": "integer",
                    "example": 8
                },
                "unitId": {
                    "type": "integer",
                    "example": 128
                }
            }
        }
    },
    "externalDocs": {
        "description": "Full documentation",
        "url": "https://dev.fitbit.com/build/reference/web-api/"
    }
}
