openapi: 3.1.0
info:
  title: Clubfit Software API (BETA)
  description: >
    This API documentation provides technical information about integrating to
    Clubfit Software.


    **PLEASE NOTE**


    Clubfit utilises OAuth2 for authentication and the `x-api-key` header for
    authorisation. Both need to be used in the API calls.


    We will provide you with your temporary credentials along with an API key
    per club. Please reach out to support if you do not have these.


    There are 2 API access plans currently available:


    **Basic Plan $20 per club per month (ex GST)** - 1,000,000 requests per
    month


    **Advanced Plan $50 per club per month (ex GST)** - 5,000,000 requests per
    month
  version: '1.0'
  termsOfService: https://clubfitsoftware.com.au/terms-and-conditions/
  contact:
    email: support@clubfitsoftware.com.au
    url: https://www.clubfitsoftware.com.au
servers:
  - url: https://api.clubfit.net.au/v1
security:
  - OAuth2: []
    ApiKeyAuth: []
paths:
  /token:
    post:
      tags:
        - Authentication
      summary: Token
      description: >-
        Retrieve an access token. Authenticate with HTTP Basic using the
        credentials supplied by Clubfit; the client sends `Authorization: Basic
        <base64(username:password)>`. The returned token is used as the bearer
        token on all subsequent calls.
      operationId: authenticationToken
      security:
        - BasicAuth: []
      responses:
        '200':
          description: >-
            The response will contain the access token you will need to access
            the subsequent API calls.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /members:
    get:
      tags:
        - Members
      summary: Information
      description: Retrieve member details including contact and membership information.
      operationId: memberData
      parameters:
        - name: fromdate
          description: Filter members by their membership start date.
          in: query
          schema:
            type: string
            description: >-
              ISO 8601 date and time with no UTC offset, e.g.
              2024-08-24T14:30:00. Clients must not send an offset or trailing
              Z.
            pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
            example: '2024-08-24T00:00:00'
        - name: updatedate
          description: Filter members by their last update date.
          in: query
          schema:
            type: string
            description: >-
              ISO 8601 date and time with no UTC offset, e.g.
              2024-08-24T14:30:00. Clients must not send an offset or trailing
              Z.
            pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
            example: '2024-08-24T00:00:00'
        - $ref: '#/components/parameters/StatusFilter'
        - $ref: '#/components/parameters/Offset'
        - $ref: '#/components/parameters/Limit500'
      responses:
        '200':
          description: search results matching criteria
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MembersResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /members/attendance/visits:
    get:
      summary: Visits
      description: >-
        Get member visits from a particular date. This does not include Creche,
        PT or Class visits.
      operationId: getMemberVisits
      parameters:
        - name: fromdate
          description: Filter members by visit date and time.
          in: query
          schema:
            type: string
            description: >-
              ISO 8601 date and time with no UTC offset, e.g.
              2024-08-24T14:30:00. Clients must not send an offset or trailing
              Z.
            pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
            example: '2024-08-24T00:00:00'
        - $ref: '#/components/parameters/StatusFilter'
        - $ref: '#/components/parameters/Offset'
        - $ref: '#/components/parameters/Limit500'
      tags:
        - Members
      responses:
        '200':
          description: Member visits matching criteria
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MembersVisitResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /members/payment/history:
    get:
      summary: Payment history
      description: Retrieve member payment history transaction information.
      operationId: getMemberPaymentHistory
      parameters:
        - name: fromdate
          description: Filter payment history transactions by payment date and time.
          in: query
          schema:
            type: string
            description: >-
              ISO 8601 date and time with no UTC offset, e.g.
              2024-08-24T14:30:00. Clients must not send an offset or trailing
              Z.
            pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
            example: '2024-08-24T00:00:00'
        - $ref: '#/components/parameters/Offset'
        - $ref: '#/components/parameters/Limit500'
      tags:
        - Members
      responses:
        '200':
          description: Member payment history transactions matching criteria
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MembersPaymentHistoryResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /members/pos/transactions:
    get:
      summary: POS transactions
      description: >-
        Retrieve member POS transactions information including staff member,
        line items and payments made.
      operationId: getMemberPOSTransactions
      parameters:
        - name: fromdate
          description: Filter pos transactions by transaction date and time.
          in: query
          schema:
            type: string
            description: >-
              ISO 8601 date and time with no UTC offset, e.g.
              2024-08-24T14:30:00. Clients must not send an offset or trailing
              Z.
            pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
            example: '2024-08-24T00:00:00'
        - $ref: '#/components/parameters/Offset'
        - $ref: '#/components/parameters/Limit500'
      tags:
        - Members
      responses:
        '200':
          description: Member POS transactions matching criteria
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MembersPOSTransactionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /prospects:
    get:
      tags:
        - Prospects
      summary: Information
      description: Retrieve prospect details including contact and trial information.
      operationId: prospectData
      parameters:
        - name: fromdate
          description: Filter prospects by their last status update date and time.
          in: query
          schema:
            type: string
            description: >-
              ISO 8601 date and time with no UTC offset, e.g.
              2024-08-24T14:30:00. Clients must not send an offset or trailing
              Z.
            pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
            example: '2024-08-24T00:00:00'
        - $ref: '#/components/parameters/ProspectStatusFilter'
        - $ref: '#/components/parameters/Offset'
        - $ref: '#/components/parameters/Limit500'
      responses:
        '200':
          description: search results matching criteria
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProspectResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /financial/disbursements:
    get:
      summary: Gym disbursements
      description: Disbursement payments made to your club
      operationId: getFinancialDisbursements
      parameters:
        - name: fromdate
          description: Filter disbursements by payment date and time.
          in: query
          schema:
            type: string
            description: >-
              ISO 8601 date and time with no UTC offset, e.g.
              2024-08-24T14:30:00. Clients must not send an offset or trailing
              Z.
            pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
            example: '2024-08-24T00:00:00'
        - $ref: '#/components/parameters/Offset'
        - $ref: '#/components/parameters/Limit500'
      tags:
        - Financial
      responses:
        '200':
          description: Disbursements matching criteria
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DisbursementResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /financial/debtcollection:
    get:
      summary: Debt collection
      description: Member details sent to debt collection
      operationId: getFinancialDebtCollection
      parameters:
        - name: fromdate
          description: Filter by date sent to debt collection.
          in: query
          schema:
            type: string
            description: >-
              ISO 8601 date and time with no UTC offset, e.g.
              2024-08-24T14:30:00. Clients must not send an offset or trailing
              Z.
            pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
            example: '2024-08-24T00:00:00'
        - $ref: '#/components/parameters/Offset'
        - $ref: '#/components/parameters/Limit500'
      tags:
        - Financial
      responses:
        '200':
          description: Debt collection records matching criteria
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DebtCollectionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    OAuthResponse:
      type: object
      properties:
        AccessToken:
          type: string
          description: JWT access token
          example: jashjgfafgdsljlfjsadjfsjflijsdlfdsxkzlcmlzxkcm
        ExpiresIn:
          type: integer
          description: Number of seconds the access token is valid for
          example: 3600
          format: int32
        TokenType:
          type: string
          description: Bearer
          example: Bearer
    MembersResponse:
      type: object
      properties:
        href:
          type: string
          description: Current API URL
          example: https://api.clubfit.net.au/v1/members
        next:
          type: string
          description: Next API URL to retrieve the next page
          example: https://api.clubfit.net.au/v1/members?limit=500&offset=500
        data:
          type: array
          items:
            $ref: '#/components/schemas/Member'
    ProspectResponse:
      type: object
      properties:
        href:
          type: string
          description: Current API URL
          example: https://api.clubfit.net.au/v1/prospects
        next:
          type: string
          description: Next API URL to retrieve the next page
          example: https://api.clubfit.net.au/v1/prospects?limit=500&offset=500
        data:
          type: array
          items:
            $ref: '#/components/schemas/Prospect'
    DebtCollectionResponse:
      type: object
      properties:
        href:
          type: string
          description: Current API URL
          example: https://api.clubfit.net.au/v1/financial/debtcollection
        next:
          type: string
          description: Next API URL to retrieve the next page
          example: >-
            https://api.clubfit.net.au/v1/financial/debtcollection?limit=500&offset=500
        data:
          type: array
          items:
            $ref: '#/components/schemas/DebtCollection'
    DebtCollection:
      type: object
      properties:
        Amount:
          type: number
          description: Amount sent to debt collection for retrieval
          example: 11.95
        DebtCollectionDate:
          type: string
          description: >-
            ISO 8601 date and time with no UTC offset, e.g. 2024-08-24T14:30:00.
            Clients must not send an offset or trailing Z.
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
          example: '2000-01-02T00:00:00'
        MemberNumber:
          type: string
          example: G123
        FirstName:
          type: string
          example: John
        LastName:
          type: string
          example: Doe
        Email:
          type: string
          format: email
          example: john@doe.com
        Mobile:
          type: string
          example: '0420000000'
        Address:
          type: string
          example: 123 my street,Sunnybank,QLD,4176
    MembersPOSTransactionResponse:
      type: object
      properties:
        href:
          type: string
          description: Current API URL
          example: https://api.clubfit.net.au/v1/members/pos/transactions
        next:
          type: string
          description: Next API URL to retrieve the next page
          example: >-
            https://api.clubfit.net.au/v1/members/pos/transactions?limit=500&offset=500
        data:
          type: array
          items:
            $ref: '#/components/schemas/MemberPOSTransaction'
    MembersPaymentHistoryResponse:
      type: object
      properties:
        href:
          type: string
          description: Current API URL
          example: https://api.clubfit.net.au/v1/members/payment/history
        next:
          type: string
          description: Next API URL to retrieve the next page
          example: >-
            https://api.clubfit.net.au/v1/members/payment/history?limit=500&offset=500
        data:
          type: array
          items:
            $ref: '#/components/schemas/MemberPaymentHistory'
    MemberPaymentHistory:
      type: object
      properties:
        Id:
          type: integer
          description: Payment history Id
          example: 1234
          format: int64
        Number:
          type: string
          description: Member number
          example: '1234'
        PaymentDate:
          type: string
          description: >-
            ISO 8601 date and time with no UTC offset, e.g. 2024-08-24T14:30:00.
            Clients must not send an offset or trailing Z.
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
          example: '2000-01-01T04:02:00'
        PaymentType:
          type: string
          description: DD = Direct Debit, CC = Credit Card
          example: DD
        Response:
          type: string
          example: 00 Transaction Approved
        PaymentDescription:
          type: string
          example: MEMBER_OVERDUE_ONLINE
        PaymentForReference:
          $ref: '#/components/schemas/IdName'
        FeeBreakdown:
          type: array
          items:
            $ref: '#/components/schemas/FeeBreakdown'
        Refund:
          type: object
          properties:
            IsRefunded:
              type: boolean
              description: true if the line item has been refunded
              example: true
            RefundedPaymentId:
              type: integer
              example: 123
              format: int64
    MemberPOSTransaction:
      type: object
      properties:
        PosTransactionId:
          type: integer
          example: 1234
          format: int64
        TransactionDate:
          type: string
          description: >-
            ISO 8601 date and time with no UTC offset, e.g. 2024-08-24T14:30:00.
            Clients must not send an offset or trailing Z.
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
          example: '2000-01-01T04:02:00'
        TransactionType:
          type: string
          example: Sale
        TotalExTax:
          type: number
          description: POS transaction total excluding TAX
          example: 1234
        TotalIncTax:
          type: number
          description: POS transaction total including TAX
          example: 1234
        Till:
          type: string
          example: Reception
        Items:
          type: array
          items:
            $ref: '#/components/schemas/POSTransactionItem'
    FeeBreakdown:
      type: object
      properties:
        AccessCardFee:
          type: number
          example: 0
        AddOnAmount:
          type: number
          example: 0
        Adjustment:
          type: number
          example: 0
        ArrearsFee:
          type: number
          example: 0
        CancellationLateFee:
          type: number
          example: 0
        CardSurchargeFee:
          type: number
          example: 0
        ClassNoShowFee:
          type: number
          example: 0
        CrecheClassNoShowFee:
          type: number
          example: 0
        DishonourFee:
          type: number
          example: 0
        JoiningFee:
          type: number
          example: 0
        MaintenanceFee:
          type: number
          example: 0
        PosTransaction:
          type: number
          example: 0
        Prorata:
          type: number
          example: 0
        PtNoShowFee:
          type: number
          example: 0
        RegPaymentFee:
          type: number
          example: 0
        SetupFee:
          type: number
          example: 0
        SubscriptionFee:
          type: number
          example: 0
        SuspensionFee:
          type: number
          example: 0
        TransactionFee:
          type: number
          example: 0
    POSTransactionItem:
      type: object
      properties:
        ItemId:
          type: integer
          example: 1234
          format: int64
        ProductId:
          type: integer
          example: 1234
          format: int64
        ProductName:
          type: string
          example: Coke
        Description:
          type: string
          example: Sale
        PriceExTax:
          type: number
          description: Item price excluding TAX
          example: 1234
        PriceIncTax:
          type: number
          description: Item price including TAX
          example: 1234
        Quantity:
          type: number
          example: 1
        Tax:
          type: number
          description: Item TAX component
          example: 1234
        Discount:
          type: number
          description: Item discount
          example: 1234
        CategoryId:
          type: integer
          description: Item product category id
          example: 1234
          format: int64
        CategoryName:
          type: string
          example: Drinks
          description: Item product category name
        SubCategoryId:
          type: integer
          description: Item product sub category id
          example: 1234
          format: int64
        SubCategoryName:
          type: string
          example: Soft Drinks
          description: Item product sub category name
        IsRefunded:
          type: boolean
          description: true if the line item has been refunded
          example: false
        IsVoided:
          type: boolean
          description: true if the line item has been voided
          example: false
    MembersVisitResponse:
      type: object
      properties:
        href:
          type: string
          description: Current API URL
          example: https://api.clubfit.net.au/v1/members/attendance/visits
        next:
          type: string
          description: Next API URL to retrieve the next page
          example: >-
            https://api.clubfit.net.au/v1/members/attendance/visits?limit=500&offset=500
        data:
          type: array
          items:
            $ref: '#/components/schemas/MemberVisit'
    MemberVisit:
      type: object
      properties:
        MemberNumber:
          type: string
          example: Ab1234
        Door:
          type: string
          example: Globo front door
        ScanSource:
          type: string
          example: Paxton
        VisitDateTime:
          type: string
          description: >-
            Gym local time. ISO 8601 date and time with no UTC offset, e.g.
            2024-08-24T14:30:00. Clients must not send an offset or trailing Z.
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
          example: '2000-01-01T04:02:00'
    DisbursementResponse:
      type: object
      properties:
        href:
          type: string
          description: Current API URL
          example: https://api.clubfit.net.au/v1/financial/disbursements
        next:
          type: string
          description: Next API URL to retrieve the next page
          example: >-
            https://api.clubfit.net.au/v1/financial/disbursements?limit=500&offset=500
        data:
          type: array
          items:
            $ref: '#/components/schemas/Disbursement'
    Disbursement:
      type: object
      properties:
        DisbursementDate:
          type: string
          description: >-
            ISO 8601 date and time with no UTC offset, e.g. 2024-08-24T14:30:00.
            Clients must not send an offset or trailing Z.
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
          example: '2000-01-02T00:00:00'
        TransactionDate:
          type: string
          description: >-
            ISO 8601 date and time with no UTC offset, e.g. 2024-08-24T14:30:00.
            Clients must not send an offset or trailing Z.
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
          example: '2000-01-01T00:00:00'
        Amount:
          type: number
          example: 22.95
        MemberNumber:
          type: string
          example: Ab1234
        Department:
          type: string
          example: Gym
        PaymentType:
          type: string
          example: CC
        Breakdown:
          $ref: '#/components/schemas/DisbursementBreakdown'
    Member:
      type: object
      properties:
        Number:
          type: string
          example: '1000'
        FirstName:
          type: string
          example: John
        LastName:
          type: string
          example: Doe
        Status:
          type: string
          example: Active
        Barcode:
          type: string
          example: '51234'
        FitnessPassportNumber:
          type: string
          example: '51234'
        DateOfBirth:
          type: string
          description: >-
            ISO 8601 date and time with no UTC offset, e.g. 2024-08-24T14:30:00.
            Clients must not send an offset or trailing Z.
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
          example: '2000-01-01T00:00:00'
        Gender:
          type: string
          example: M
        LastUpdatedUtcDateTime:
          description: >-
            This date time is in UTC. ISO 8601 date and time with no UTC offset,
            e.g. 2024-08-24T14:30:00. Clients must not send an offset or
            trailing Z.
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
          example: '2000-01-01T00:00:00'
        Contact:
          $ref: '#/components/schemas/Contact'
        Membership:
          $ref: '#/components/schemas/Membership'
    Prospect:
      type: object
      properties:
        Number:
          type: string
          example: '1000'
        FirstName:
          type: string
          example: John
        LastName:
          type: string
          example: Doe
        Status:
          type: string
          example: OnTrial
        Barcode:
          type: string
          example: '51234'
        DateOfBirth:
          type: string
          description: >-
            ISO 8601 date and time with no UTC offset, e.g. 2024-08-24T14:30:00.
            Clients must not send an offset or trailing Z.
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
          example: '2000-01-01T00:00:00'
        Gender:
          type: string
          example: M
        TrialStartDate:
          type: string
          description: >-
            ISO 8601 date and time with no UTC offset, e.g. 2024-08-24T14:30:00.
            Clients must not send an offset or trailing Z.
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
          example: '2000-01-01T00:00:00'
        TrialEndDate:
          type: string
          description: >-
            ISO 8601 date and time with no UTC offset, e.g. 2024-08-24T14:30:00.
            Clients must not send an offset or trailing Z.
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
          example: '2000-01-01T00:00:00'
        CreatedDateUtc:
          type: string
          description: >-
            ISO 8601 date and time with no UTC offset, e.g. 2024-08-24T14:30:00.
            Clients must not send an offset or trailing Z.
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
          example: '2000-01-01T00:00:00'
        ContactMethod:
          $ref: '#/components/schemas/IdName'
        Source:
          $ref: '#/components/schemas/IdName'
        SourcePage:
          type: string
          example: abc
        SalesPerson:
          $ref: '#/components/schemas/SalesPerson'
        Contact:
          $ref: '#/components/schemas/Contact'
    Membership:
      required:
        - Id
        - Name
        - StartDate
        - Type
      properties:
        Id:
          type: integer
          example: 12345
        Name:
          type: string
          example: 12 Month Membership
        StartDate:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
          description: >-
            Gym local time. ISO 8601 date and time with no UTC offset, e.g.
            2024-08-24T14:30:00. Clients must not send an offset or trailing Z.
          example: '2024-08-24T00:00:00'
        SaleDate:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
          description: >-
            Gym local time. ISO 8601 date and time with no UTC offset, e.g.
            2024-08-24T14:30:00. Clients must not send an offset or trailing Z.
          example: '2024-08-24T00:00:00'
        CancellationDate:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
          example: '2024-08-24T00:00:00'
          description: >-
            Displays if there is a value. ISO 8601 date and time with no UTC
            offset, e.g. 2024-08-24T14:30:00. Clients must not send an offset or
            trailing Z.
        MinimumTermDate:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
          example: '2024-08-24T00:00:00'
          description: >-
            Displays if there is a value. ISO 8601 date and time with no UTC
            offset, e.g. 2024-08-24T14:30:00. Clients must not send an offset or
            trailing Z.
        ExpiryDate:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
          example: '2024-08-24T00:00:00'
          description: >-
            Displays if membership contract type is Paid in Full. ISO 8601 date
            and time with no UTC offset, e.g. 2024-08-24T14:30:00. Clients must
            not send an offset or trailing Z.
        Type:
          type: string
          example: Direct Debit
      type: object
    Contact:
      required:
        - Email
      properties:
        Email:
          type: string
          format: email
          example: john@doe.com
        OptOutEmail:
          type: boolean
          description: true the contact has opted out to email communication
          example: false
        Mobile:
          type: string
          example: '0424000000'
        OptOutSms:
          type: boolean
          description: true the contact has opted out to sms communication
          example: false
        Home:
          type: string
          example: '0712345661'
        Work:
          type: string
          example: '074555667'
        Address:
          type: string
          example: 1 No way Street
        Suburb:
          type: string
          example: Sunnyhills
        State:
          type: string
          example: QLD
        Postcode:
          type: string
          example: '4000'
      type: object
    SalesPerson:
      type: object
      properties:
        Id:
          type: integer
          example: 12345
        FirstName:
          type: string
          example: John
        LastName:
          type: string
          example: Doe
        Email:
          type: string
          format: email
          example: john@doe.com
    IdName:
      properties:
        Id:
          type: integer
          example: 123
        Name:
          type: string
          example: abc
      type: object
    DisbursementBreakdown:
      properties:
        Membership:
          description: Membership fee
          type: number
          example: 0
        AccessCard:
          description: Access card fee
          type: number
          example: 0
        Surcharge:
          description: Surcharge fee
          type: number
          example: 0
        Joining:
          description: Joining fee
          type: number
          example: 0
        Setup:
          description: Setup fee
          type: number
          example: 0
        Transaction:
          description: Transaction fee
          type: number
          example: 0
        Subscription:
          description: Subscription fee
          type: number
          example: 0
        Arrears:
          description: Arrears fee
          type: number
          example: 0
        Prorata:
          description: Pro Rata fee
          type: number
          example: 0
        Dishonour:
          description: Dishonour fee
          type: number
          example: 0
        Suspension:
          description: Suspension fee
          type: number
          example: 0
        Pos:
          description: Pos transaction
          type: number
          example: 0
        AddOn:
          description: AddOn fee
          type: number
          example: 0
        Cancellation:
          description: Cancellation fee
          type: number
          example: 0
        ClassNoShow:
          description: Class no show fee
          type: number
          example: 0
        PtNoShow:
          description: Pt no show fee
          type: number
          example: 0
  securitySchemes:
    OAuth2:
      type: oauth2
      description: OAuth2 client credentials. Obtain a token from the /token endpoint.
      flows:
        clientCredentials:
          tokenUrl: https://api.clubfit.net.au/v1/token
          scopes:
            read: Grants read access
    BasicAuth:
      type: http
      scheme: basic
      description: >-
        Base64-encoded username:password supplied by Clubfit. Used only on
        /token.
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key per club, provided to you by Clubfit.
  parameters:
    Limit500:
      in: query
      name: limit
      description: The maximum number of results to return.
      required: false
      schema:
        type: integer
        format: int32
        minimum: 0
        maximum: 500
        default: 500
    Offset:
      in: query
      name: offset
      description: >-
        The index of the first result to return. Use with limit to get the next
        page of search results.
      required: false
      schema:
        type: integer
        format: int32
    StatusFilter:
      in: query
      name: status
      description: Filter by current member status.
      required: false
      schema:
        type: string
        enum:
          - Active
          - PaymentIssue
          - Suspended
          - Archived
          - PendingActivation
          - PendingOnlineSignup
    ProspectStatusFilter:
      in: query
      name: status
      description: Filter by current prospect status.
      required: false
      schema:
        type: string
        enum:
          - Trial_Expired
          - Enquiry
          - NotInterested
          - OnTrial
          - Tour
          - NoSaleReturn
          - DidNotShow
          - Sale
  responses:
    BadRequest:
      description: Bad input parameter.
    Unauthorized:
      description: Missing, invalid or expired access token, or missing/invalid x-api-key.
    TooManyRequests:
      description: Request quota for the club's API plan has been exceeded.
tags:
  - name: Authentication
    description: >-
      API authentication. This endpoint will create an access token that you can
      then use for subsequent API calls.
  - name: Members
    description: The member endpoints will return data relevant to member information.
  - name: Prospects
    description: The prospect endpoints will return data relevant to prospect information.
  - name: Financial
    description: >-
      The financial endpoints will return data relevant to financial
      information.
