openapi: 3.0.3 info: title: Virtuagym Public API (v1) Billing API description: 'The Virtuagym Public API lets fitness businesses, health clubs, and partner integrations read and write club data programmatically - members, staff (employees), membership definitions and instances, member credits, invoices, visits (check-ins), events (classes) and their participants, and coaching workout assignments. This document models the current v1 club-scoped surface. Access model: Virtuagym''s authoritative reference documentation is access-gated - you request access by emailing api@virtuagym.com with your GitHub username, and you provision an API key and Club secret in the Virtuagym portal under System settings > Business info > Advanced. The endpoints, methods, and query parameters below are grounded in Virtuagym''s publicly mirrored API wiki and in live host probes; request/response bodies are modeled honestly and marked with additionalProperties where the full field set is not published. Treat schema shapes as a starting point and reconcile against the official reference once access is granted. Authentication: v1 endpoints authenticate with an `api_key` and a `club_secret`, both passed as query-string parameters, over HTTPS only. (Legacy v0 endpoints used HTTP Basic Auth and are deprecated; a separate OAuth 2.0 flow exists for end-user-context calls and is out of scope for the club-scoped v1 surface modeled here.)' version: '1.0' contact: name: Virtuagym API Team url: https://support.virtuagym.com/s/article/API-Link-To-Your-Website email: api@virtuagym.com license: name: Proprietary url: https://virtuagym.com servers: - url: https://api.virtuagym.com/api description: Virtuagym Public API security: - apiKeyAuth: [] clubSecretAuth: [] tags: - name: Billing description: Member credits and club invoices. paths: /v1/club/{club_id}/credit: parameters: - $ref: '#/components/parameters/ClubId' get: operationId: listMemberCredits tags: - Billing summary: List member credits description: Returns the credit balance / entries of a member. parameters: - name: member_id in: query required: false description: The member whose credits to return. schema: type: integer - $ref: '#/components/parameters/SyncFrom' responses: '200': description: A list of credit entries. content: application/json: schema: $ref: '#/components/schemas/GenericListResponse' '401': $ref: '#/components/responses/Unauthorized' put: operationId: assignMemberCredits tags: - Billing summary: Assign member credits description: Assigns or adds new credits to a member. requestBody: required: true content: application/json: schema: type: object additionalProperties: true responses: '200': description: The updated credit result. content: application/json: schema: $ref: '#/components/schemas/GenericResponse' '401': $ref: '#/components/responses/Unauthorized' /v1/club/{club_id}/invoices: parameters: - $ref: '#/components/parameters/ClubId' post: operationId: createInvoice tags: - Billing summary: Create an invoice description: Creates a new invoice resource for the club. requestBody: required: true content: application/json: schema: type: object additionalProperties: true responses: '200': description: The created invoice. content: application/json: schema: $ref: '#/components/schemas/GenericResponse' '401': $ref: '#/components/responses/Unauthorized' /v1/club/{club_id}/invoices/{invoice_id}: parameters: - $ref: '#/components/parameters/ClubId' - name: invoice_id in: path required: true description: The invoice ID. schema: type: string get: operationId: getInvoice tags: - Billing summary: Retrieve an invoice description: Returns the invoice resource that corresponds to `invoice_id`. responses: '200': description: The requested invoice. content: application/json: schema: $ref: '#/components/schemas/GenericResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' components: responses: NotFound: description: The requested resource was not found. content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Missing or invalid api_key / club_secret. content: application/json: schema: $ref: '#/components/schemas/Error' schemas: GenericResponse: type: object description: Standard Virtuagym envelope. The `result` object carries the resource; exact fields depend on the resource and are additive. properties: statusMessage: type: string statistics: $ref: '#/components/schemas/Statistics' result: type: object additionalProperties: true additionalProperties: true GenericListResponse: type: object description: Standard Virtuagym envelope wrapping an array of resources in `result`. properties: statusMessage: type: string statistics: $ref: '#/components/schemas/Statistics' result: type: array items: type: object additionalProperties: true additionalProperties: true Statistics: type: object description: Response metadata Virtuagym returns alongside result sets. properties: resultset_size: type: integer total_results: type: integer time_ms: type: integer additionalProperties: true Error: type: object properties: status: type: integer statusMessage: type: string result: type: object additionalProperties: true additionalProperties: true parameters: ClubId: name: club_id in: path required: true description: The Virtuagym club ID. schema: type: integer SyncFrom: name: sync_from in: query required: false description: Return only resources created or edited since this Unix timestamp in milliseconds. schema: type: integer format: int64 securitySchemes: apiKeyAuth: type: apiKey in: query name: api_key description: The club's API key, provisioned in the Virtuagym portal under System settings > Business info > Advanced. clubSecretAuth: type: apiKey in: query name: club_secret description: The club secret, provisioned alongside the API key in the Virtuagym portal. Required for all v1 endpoints.