openapi: 3.2.0 info: title: MMS API V2 Member Account Roles API description: 'RESTful API specification for integrating gym management systems with the EGYM platform. This OpenAPI document defines all available endpoints, request/response schemas, authentication requirements, and error codes. **Key Features:** - Member account and membership management - RFID assignment and management - Real-time gym visit tracking (check-in/check-out) - EGYM product booking (Smart Strength, EGYM+) - Trainer task creation and tracking - Webhook subscriptions for event notifications - Push notifications to EGYM mobile apps - Member migration from V1 API' termsOfService: https://egym.com/en/terms/ contact: name: MMS Connect Team url: https://egym.com/ email: connect@egym.com version: 2.0.0 servers: - url: https://mms.api.ed.ts.egym.coffee description: Test - url: https://mms.api.egym.com description: Prod security: - mms: [] tags: - name: Member Account Roles description: These operation are needed to assign and retrieve member account roles paths: /api/v2/accounts/{accountId}/roles: get: tags: - Member Account Roles summary: Retrieve an account roles description: Retrieve an account roles in the current gym for given accountId operationId: getRoles parameters: - name: accountId in: path required: true schema: type: string responses: '200': description: Ok content: application/json: schema: $ref: '#/components/schemas/GymRolesDTO' '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' post: tags: - Member Account Roles summary: Set an account roles description: Update an account roles using accountId. operationId: assignRoles parameters: - name: accountId in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/GymRolesDTO' required: true responses: '204': description: No Content '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: GymRolesDTO: type: object properties: trainer: type: boolean description: If trainer is true, assign trainer right for account, otherwise remove trainer rights. gymOwner: type: boolean description: If gymOwner is true, assign gymOwner right for account, otherwise remove gymOwner rights. ErrorDTO: type: object properties: timestamp: type: string format: date-time description: The timestamp of the request. path: type: string description: The path requested. requestId: type: string description: The request ID. example: de625cf1-1 status: type: integer format: int32 description: The http status code. 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 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: description: The rejected value. example: 3 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-tagGroups: - name: Member Account Management tags: - Member Account - Member Account Roles - Member RFIDs - Products booking - name: NFC management (Beta version) tags: - Member Account NFC - name: Member Migration tags: - Migrating members - name: Gym Visit Management tags: - Gym Visit - name: Trainer Task Management tags: - Trainer Task - name: Integration tags: - Webhooks - Push notifications