openapi: 3.2.0 info: title: DATA EXPORT Measurements API termsOfService: https://egym.com/en/terms/ contact: name: MMS Connect Team url: https://egym.com/ email: connect@egym.com version: Alpha preview description: These operations are needed to retrieve measurements with corresponding metrics. Additional permissions are required to access these endpoints. servers: - url: https://one-mms-service.ext-1.test.co.egym.coffee description: Test - url: https://mms.api.egym.com description: Prod security: - mms: [] tags: - name: Measurements description: These operations are needed to retrieve measurements with corresponding metrics. Additional permissions are required to access these endpoints. paths: /api/v2/accounts/{accountId}/measurements/strength: get: tags: - Measurements summary: Strength measurements description: Retrieve strength measurements using accountId. operationId: getStrengthMeasurements parameters: - name: accountId in: path required: true schema: type: string - name: fromTimestamp in: query required: true schema: type: string format: date-time - name: toTimestamp in: query required: true schema: type: string format: date-time responses: '200': description: Ok content: application/json: schema: type: array items: $ref: '#/components/schemas/StrengthMeasurementDTO' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorDTO' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorDTO' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorDTO' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorDTO' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorDTO' /api/v2/accounts/{accountId}/measurements/cardio: get: tags: - Measurements summary: Cardio measurements description: Retrieve cardio measurements using accountId. operationId: getCardioMeasurements parameters: - name: accountId in: path required: true schema: type: string - name: fromTimestamp in: query required: true schema: type: string format: date-time - name: toTimestamp in: query required: true schema: type: string format: date-time responses: '200': description: Ok content: application/json: schema: type: array items: $ref: '#/components/schemas/MeasurementDTO' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorDTO' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorDTO' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorDTO' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorDTO' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorDTO' /api/v2/accounts/{accountId}/measurements/body: get: tags: - Measurements summary: Body measurements description: Retrieve body measurements using accountId. operationId: getBodyMeasurement parameters: - name: accountId in: path required: true schema: type: string - name: fromTimestamp in: query required: true schema: type: string format: date-time - name: toTimestamp in: query required: true schema: type: string format: date-time responses: '200': description: Ok content: application/json: schema: type: array items: $ref: '#/components/schemas/BodyMeasurementDTO' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorDTO' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorDTO' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorDTO' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorDTO' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorDTO' components: schemas: ErrorDTO: type: object properties: timestamp: type: string description: The timestamp of the request. format: date-time path: type: string description: The path requested. requestId: type: string description: The request ID. example: de625cf1-1 status: type: integer description: The http status code. format: int32 error: type: string description: The error. errorCode: type: string description: The static error code. message: type: string description: The message to describe the error. fieldErrors: type: array description: The constraint violations. items: $ref: '#/components/schemas/FieldErrorDTO' metadata: type: object additionalProperties: type: string description: Additional information of the error context description: Additional information of the error context DatedValueWithProgressDTO: type: object properties: value: type: number description: Value of measurement format: double createdAt: type: string description: DateTime when measurement was conducted format: date-time FieldErrorDTO: type: object properties: name: type: string description: The field name. example: age message: type: string description: The error message. example: Must be greater than 10. rejectedValue: type: object description: The rejected value. example: 3 description: The constraint violations. Labels: type: object properties: low: type: string enum: - UNSPECIFIED - NORMAL - EXCELLENT - ELEVATED - LOW middle: type: string enum: - UNSPECIFIED - NORMAL - EXCELLENT - ELEVATED - LOW top: type: string enum: - UNSPECIFIED - NORMAL - EXCELLENT - ELEVATED - LOW InterpretationRegion: type: object properties: low: type: number format: double top: type: number format: double labels: $ref: '#/components/schemas/Labels' MetricDTO: type: object properties: type: type: string description: Type of metric example: BODY_FAT_PERCENTS value: type: number description: Value of metric format: double unit: type: string description: Unit of metric example: PERCENTS enum: - PERCENTS - CM - KG - KJ - LITER - CM2 - OTHER description: Metrics associated with this measurement BodyMeasurementDTO: type: object properties: createdAt: type: string description: Time at which measurement was created format: date-time source: type: string description: Source of the measurement example: MANUAL metrics: type: array description: Metrics associated with this measurement items: $ref: '#/components/schemas/MetricWithInterpretationDTO' equipmentType: type: string StrengthMeasurementDTO: type: object properties: createdAt: type: string format: date-time strength: $ref: '#/components/schemas/DatedValueWithProgressDTO' source: type: string bodyRegion: type: string enum: - ALL - UPPER - CORE - LOWER - UNSPECIFIED machineType: type: string MetricWithInterpretationDTO: type: object properties: type: type: string description: Type of metric example: BODY_FAT_PERCENTS value: type: number description: Value of metric format: double interpretation: $ref: '#/components/schemas/Interpretation' unit: type: string description: Unit of metric example: PERCENTS enum: - PERCENTS - CM - KG - KJ - LITER - CM2 - OTHER description: Metrics associated with this measurement MeasurementDTO: type: object properties: createdAt: type: string description: Time at which measurement was created format: date-time source: type: string description: Source of the measurement example: MANUAL metrics: type: array description: Metrics associated with this measurement items: $ref: '#/components/schemas/MetricDTO' equipmentType: type: string Interpretation: type: object properties: label: type: string enum: - UNSPECIFIED - NORMAL - EXCELLENT - ELEVATED - LOW region: $ref: '#/components/schemas/InterpretationRegion' description: Interpretation of metric securitySchemes: mms: type: apiKey description: Authentication is validated via an API key that is generated by EGYM for each gym location. This API key will not be identical with the access token used in the EGYM Gym API v1 name: x-api-key in: header x-stoplight: id: api