openapi: 3.0.0
paths:
  /api/v2/member:
    get:
      operationId: ApiV2MemberController_get
      summary: Get member info
      description: Returns general info for the current member
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemberInfoDto'
          description: ''
      tags: &ref_0
        - member
      security: &ref_1
        - OAuth2: []
    put:
      operationId: ApiV2MemberController_update
      summary: Update member info
      description: >-
        Changes some user detail, use `/email` endpoint to change email, use
        `/phone-number` endpoint to change phone number
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiV2MemberUpdateRequestDto'
      responses:
        '200':
          description: ''
      tags: *ref_0
      security: *ref_1
  /api/v2/member/visits:
    get:
      operationId: ApiV2MemberController_getVisits
      summary: Get member visits
      description: Returns visits counts for the current member
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemberVisitsDto'
          description: ''
      tags: *ref_0
      security: *ref_1
  /api/v2/member/email:
    put:
      operationId: ApiV2MemberController_updateEmail
      summary: Update member email
      description: Changes user email
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiV2MemberUpdateEmailRequestDto'
      responses:
        '200':
          description: ''
      tags: *ref_0
      security: *ref_1
  /api/v2/member/phone-number:
    put:
      operationId: ApiV2MemberController_updatePhoneNumber
      summary: Update member phone number
      description: Changes user phone number
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiV2MemberUpdatePhoneNumberRequestDto'
      responses:
        '200':
          description: ''
      tags: *ref_0
      security: *ref_1
    delete:
      operationId: ApiV2MemberController_deletePhoneNumber
      summary: Delete all phone number records for a member
      parameters: []
      responses:
        '200':
          description: ''
      tags: *ref_0
      security: *ref_1
  /api/v2/member/password-reset-email:
    post:
      operationId: ApiV2MemberController_requestPasswordResetEmail
      summary: Request member password reset
      description: Requests a new password reset email to be sent to the user
      parameters: []
      responses:
        '201':
          description: ''
      tags: *ref_0
      security: *ref_1
  /api/v2/member/sessions:
    get:
      operationId: ApiV2MemberSessionBookingsController_list
      summary: Get member bookings
      description: Returns list of sessions current user is signed up for
      parameters:
        - name: page
          required: true
          in: query
          description: Starts at 0
          example: 0
          schema:
            minimum: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          example: 10
          schema:
            minimum: 1
            type: integer
        - name: sortOrder
          required: false
          in: query
          schema:
            enum:
              - ASC
              - DESC
            type: string
        - name: sortBy
          required: false
          in: query
          description: Field to sort by
          schema:
            type: string
        - name: startAfter
          required: false
          in: query
          schema:
            type: string
        - name: endAfter
          required: false
          in: query
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponseDto'
                  - required:
                      - payload
                    properties:
                      payload:
                        type: array
                        items:
                          $ref: '#/components/schemas/MemberSessionBookingDto'
          description: ''
      tags: &ref_2
        - member-sessions
      security: &ref_3
        - OAuth2: []
  /api/v2/member/sessions/{sessionBookingId}:
    delete:
      operationId: ApiV2MemberSessionBookingsController_cancel
      summary: Cancel member booking
      description: Cancels session booking
      parameters:
        - name: sessionBookingId
          required: true
          in: path
          schema:
            type: number
      responses:
        '200':
          description: ''
      tags: *ref_2
      security: *ref_3
  /api/v2/member/host/memberships:
    get:
      operationId: ApiV2MemberHostMembershipsController_list
      summary: Get available host memberships
      parameters:
        - name: page
          required: true
          in: query
          description: Starts at 0
          example: 0
          schema:
            minimum: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          example: 10
          schema:
            minimum: 1
            maximum: 200
            type: integer
        - name: sortOrder
          required: false
          in: query
          schema:
            enum:
              - ASC
              - DESC
            type: string
        - name: sortBy
          required: false
          in: query
          description: Field to sort by
          schema:
            enum:
              - name
              - orderNumber
            type: string
        - name: includeDisabled
          required: false
          in: query
          schema:
            type: boolean
        - name: onlyFeatured
          required: false
          in: query
          schema:
            type: boolean
        - name: compatibleWithSessionId
          required: false
          in: query
          schema:
            type: integer
        - name: compatibleWithAppointmentId
          required: false
          in: query
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponseDto'
                  - required:
                      - payload
                    properties:
                      payload:
                        type: array
                        items:
                          $ref: '#/components/schemas/MemberHostMembershipDto'
          description: ''
      tags:
        - member-host
      security:
        - OAuth2: []
  /api/v2/member/bought-memberships/active:
    get:
      operationId: ApiV2MemberBoughtMembershipsController_list
      summary: Get member active memberships
      parameters:
        - name: page
          required: true
          in: query
          description: Starts at 0
          example: 0
          schema:
            minimum: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          example: 10
          schema:
            minimum: 1
            maximum: 200
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponseDto'
                  - required:
                      - payload
                    properties:
                      payload:
                        type: array
                        items:
                          $ref: '#/components/schemas/MemberBoughtMembershipsDto'
          description: ''
      tags:
        - member
      security:
        - OAuth2: []
  /api/v2/member/host/sessions:
    get:
      operationId: ApiV2MemberHostSessionsController_list
      summary: Get available host sessions
      parameters:
        - name: page
          required: true
          in: query
          description: Starts at 0
          example: 0
          schema:
            minimum: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          example: 10
          schema:
            minimum: 1
            maximum: 200
            type: integer
        - name: sortOrder
          required: false
          in: query
          schema:
            enum:
              - ASC
              - DESC
            type: string
        - name: sortBy
          required: false
          in: query
          description: Field to sort by
          schema:
            enum:
              - name
              - startsAt
              - endsAt
            type: string
        - name: includeCancelled
          required: false
          in: query
          description: also include cancelled sessions
          schema:
            type: boolean
        - name: types
          required: false
          in: query
          description: only return specified session types
          schema:
            type: array
            items:
              type: string
              enum:
                - private
                - special-event
                - special-event-new
                - retreat
                - fitness
                - course
                - course-class
                - semester
                - recital
        - name: teacherId
          required: false
          in: query
          schema:
            type: integer
        - name: locationId
          required: false
          in: query
          schema:
            type: integer
        - name: startAfter
          required: false
          in: query
          schema:
            type: string
        - name: startBefore
          required: false
          in: query
          schema:
            type: string
        - name: endAfter
          required: false
          in: query
          schema:
            type: string
        - name: endBefore
          required: false
          in: query
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponseDto'
                  - required:
                      - payload
                    properties:
                      payload:
                        type: array
                        items:
                          $ref: '#/components/schemas/MemberHostSessionDto'
          description: ''
      tags:
        - member-host
  /api/v2/member/host/locations:
    get:
      operationId: ApiV2MemberHostLocationsController_list
      summary: Get available host locations
      parameters:
        - name: page
          required: true
          in: query
          description: Starts at 0
          example: 0
          schema:
            minimum: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          example: 10
          schema:
            minimum: 1
            maximum: 200
            type: integer
        - name: sortOrder
          required: false
          in: query
          schema:
            enum:
              - ASC
              - DESC
            type: string
        - name: sortBy
          required: false
          in: query
          description: Field to sort by
          schema:
            enum:
              - name
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponseDto'
                  - required:
                      - payload
                    properties:
                      payload:
                        type: array
                        items:
                          $ref: '#/components/schemas/MemberHostLocationDto'
          description: ''
      tags:
        - member-host
      security:
        - OAuth2: []
  /api/v2/member/checkout/compatible-memberships:
    post:
      operationId: ApiV2MemberCheckoutController_postCompatibleMemberships
      summary: Get compatible memberships
      description: >
        This endpoint will return list of bought memberships potentially
        compatible with specified checkout cart.


        **NOTE**: The endpoint also returns memberships that are incompatible
        which is indicated by the incompatibility field. This is so you can
        present user with a reason why the membership is not usable in this
        case.


        | Incompatibility | Description |

        | --- | --- |

        | session-membership-excluded | session is not included in specified
        membership |

        | session-bought-membership-will-expire | bought membership will expire
        before the session start and it's not scheduled to renew |

        | session-bought-membership-pack-will-expire | pack will expire before
        the session starts |

        | session-bought-membership-already-used | bought membership was already
        used for this session and it's not allowed to use it multiple times |

        | session-bought-membership-usage-limit-reached | subscription has
        reached its usage limit for the renewal period that's aligned with
        session |

        | session-bought-membership-usage-limit-reached-for-semester-or-course |
        subscription has reached its usage limit for the renewal period or
        periods that're aligned with the whole semester or course |

        | session-bought-membership-daily-limit-reached | bought membership was
        already used today and is limited to one use per day |

        | session-bought-membership-no-event-credits-left | no event credits are
        left in the pack |

        | session-bought-membership-no-money-credits-left | no money credits are
        left in the pack |

        | session-bought-membership-on-demand | bought membership is only usable
        for on-demand content, not classes |

        | session-bought-membership-starts-later | bought membership starts
        being valid after the session start |

        | session-bought-membership-invalid-type | bought membership is not
        usable for this |

        | session-bought-membership-disabled | membership linked with the bought
        membership was disabled and thus it can't be used |

        | session-bought-membership-frozen | bought membership is frozen when
        the session happens |

        | session-subscription-ticket-limit | subscription is limited to one
        ticket |

        | unknown | unknown reason |
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/MemberCheckoutCompatibleMembershipsRequestDto
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemberCheckoutCompatibleMembershipsDto'
          description: ''
      tags: &ref_4
        - member-checkout
      security: &ref_5
        - OAuth2: []
  /api/v2/member/checkout/prices:
    post:
      operationId: ApiV2MemberCheckoutController_postPrices
      summary: Get prices
      description: >-
        This endpoint should be used before calling checkout to fetch correct
        prices for every item. The checkout endpoint will reject any request
        that doesn't contain correct prices even when you're using memberships
        to pay.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MemberCheckoutPricesRequestDto'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemberCheckoutPricesResponseDto'
          description: ''
      tags: *ref_4
      security: *ref_5
  /api/v2/member/checkout:
    post:
      operationId: ApiV2MemberCheckoutController_post
      summary: Perform checkout
      description: >
        Perform payment for specified items in the checkout cart. The endpoint
        will return list of purchased items.


        **NOTE**: Currently the endpoint only supports buying sessions with
        membership payment method.


        **NOTE:** You should call `/prices` endpoint to fetch correct prices for
        every item in the cart before calling this endpoint


        **NOTE:** You should call `/compatible-memberships` endpoint to fetch
        list of bought memberships that are potentially compatible with the cart
        before calling this endpoint


        | Error | Description |

        | --- | --- |

        | err-no-payment-methods | request doesn't contain any payment methods |

        | err-no-items | request doesn't contain any items |

        | err-too-many-items | request contain more than 1 items |

        | err-combined-payment-methods | request contains multiple payment
        method types in single request |

        | err-cannot-pay-for-membership-with-membership | request is attempting
        to buy membership with membership |

        | err-multiple-membership-types | request is combining different
        membership types in payment methods |

        | err-multiple-subscriptions | request contains more than 1 subscription
        payment methods |

        | err-saved-card-not-found | request contains invalid saved card payment
        method |

        | err-cart-validation-failed | general error when validating cart |

        | err-payment-failed | error occurred during payment processing |

        | err-duplicate-membership-payment-methods | request contains single
        bought membership multiple times |

        | err-invalid-membership-payment-method | request contains invalid
        membership payment method |

        | err-incompatible-membership | request contains membership that's
        incompatible with the checkout cart |

        | err-unsupported-payment-methods | request contains invalid payment
        methods |

        | err-session-has-invalid-state | request contains session with status
        that prevent sale |

        | err-session-has-passed | request contains session that has already
        passed |

        | err-session-sales-ended | request contains session that has ended
        sales |

        | err-session-dropins-not-allowed | request contains session that does
        not allow dropins |

        | err-session-is-full | request contains session that's full |

        | err-session-purchase-limit-reached | request contains session that
        member has already booked and host doesn't allow that |

        | err-session-access-restricted | request contains session that requires
        specific tag to book |

        | err-duplicate-item-ids | request contains single item id multiple
        times |

        | err-duplicate-payment-method-ids | request contains single payment
        method id multiple times |

        | err-unsupported-item-type | request contains unsupported item type |

        | err-missing-customer-date-of-birth | customer has no birthday
        information, but it's required |

        | err-customer-age-prevents-from-action | customer is not eligible for
        the action due to age restriction |
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MemberCheckoutRequestDto'
            examples:
              buySessionUsingSubscription:
                summary: Buy session using subscription
                value:
                  items:
                    - id: '1'
                      type: session
                      sessionId: 15525
                      attemptedPriceInCurrency: '10.5'
                  paymentMethods:
                    - id: '1'
                      type: membership
                      boughtMembershipId: 25568
              buySessionUsingSavedPaymentMethod:
                summary: Buy session using saved payment method
                value:
                  items:
                    - id: '1'
                      type: session
                      sessionId: 15525
                      attemptedPriceInCurrency: '10.5'
                  paymentMethods:
                    - id: '1'
                      type: saved_payment_method
                      savedPaymentMethodId: 5155
              buySessionUsingMultiplePackages:
                summary: Buy session using multiple packages
                value:
                  items:
                    - id: '1'
                      type: session
                      sessionId: 15525
                      attemptedPriceInCurrency: '10.5'
                  paymentMethods:
                    - id: '1'
                      type: membership
                      boughtMembershipId: 25568
                    - id: '2'
                      type: membership
                      boughtMembershipId: 25548
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemberCheckoutResponseDto'
          description: ''
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemberCheckoutErrorResponseDto'
      tags: *ref_4
      security: *ref_5
  /api/v2/member/saved-payment-methods:
    get:
      operationId: ApiV2MemberSavedPaymentMethodsController_get
      summary: Get saved member payment methods
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiV2MemberSavedPaymentMethodsResponseDto'
          description: ''
      tags: &ref_6
        - member
      security: &ref_7
        - OAuth2: []
    post:
      operationId: ApiV2MemberSavedPaymentMethodsController_post
      summary: Add member saved payment method
      description: >-
        This endpoint returns a temporary pre-authenticated URL that allows user
        to add a payment method. 

        Redirect user to that URL, which will allow them to add a payment method
        using a Momence-hosted app. 

        The URL will be valid for 3600 seconds. 

        After the user finishes adding the payment method, they will get
        redirected to the URL provided.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiV2MemberManagePaymentMethodsRequestDto'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ApiV2MemberManagePaymentMethodsResponseDto
          description: ''
      tags: *ref_6
      security: *ref_7
  /api/v2/member/saved-payment-methods/{savedPaymentMethodId}:
    delete:
      operationId: ApiV2MemberSavedPaymentMethodsController_delete
      summary: Remove member saved payment method
      description: >-
        This endpoint allows members to remove their saved payment method.


        | Error | Description |

        | --- | --- |

        | err-active-non-cancellable-subscription | member has an active
        non-cancellable subscription which prevent the last payment method from
        being deleted |

        | err-no-payment-method-found | the specified payment method does not
        exist |
      parameters:
        - name: savedPaymentMethodId
          required: true
          in: path
          schema:
            type: number
      responses:
        '200':
          description: ''
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/MemberDeleteSavedPaymentMethodErrorResponseDto
      tags: *ref_6
      security: *ref_7
  /api/v2/member-addresses:
    get:
      operationId: ApiV2MemberAddressesController_list
      summary: Get member addresses
      parameters:
        - name: page
          required: true
          in: query
          description: Starts at 0
          example: 0
          schema:
            minimum: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          example: 10
          schema:
            minimum: 1
            type: integer
        - name: sortOrder
          required: false
          in: query
          schema:
            enum:
              - ASC
              - DESC
            type: string
        - name: sortBy
          required: false
          in: query
          description: Field to sort by
          example: createdAt
          schema:
            enum:
              - createdAt
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponseDto'
                  - required:
                      - payload
                    properties:
                      payload:
                        type: array
                        items:
                          $ref: '#/components/schemas/ApiV2MemberAddressDto'
              examples:
                addresses:
                  summary: Member addresses
                  value:
                    pagination:
                      page: 0
                      pageSize: 10
                      totalCount: 1
                    payload:
                      - id: 5
                        address: 153 Hunters Drive
                        city: New York
                        country: US
                        zipcode: '8513'
                        createdAt: 2021-01-01T00:00:00.000Z
          description: ''
      tags: &ref_8
        - member-addresses
      security: &ref_9
        - OAuth2: []
    post:
      operationId: ApiV2MemberAddressesController_create
      summary: Create member address
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiV2MemberAddressRequestDto'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiV2MemberAddressDto'
              examples:
                addresses:
                  summary: Member address
                  value:
                    id: 5
                    address: 153 Hunters Drive
                    city: New York
                    country: US
                    zipcode: '8513'
                    createdAt: 2021-01-01T00:00:00.000Z
          description: ''
      tags: *ref_8
      security: *ref_9
  /api/v2/member-addresses/{memberAddressId}:
    get:
      operationId: ApiV2MemberAddressesController_get
      summary: Get member address
      parameters:
        - name: memberAddressId
          required: true
          in: path
          schema:
            type: number
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiV2MemberAddressDto'
              examples:
                addresses:
                  summary: Member address
                  value:
                    id: 5
                    address: 153 Hunters Drive
                    city: New York
                    country: US
                    zipcode: '8513'
                    createdAt: 2021-01-01T00:00:00.000Z
          description: ''
      tags: *ref_8
      security: *ref_9
    put:
      operationId: ApiV2MemberAddressesController_update
      summary: Update member address
      parameters:
        - name: memberAddressId
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiV2MemberAddressRequestDto'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiV2MemberAddressDto'
              examples:
                addresses:
                  summary: Member address
                  value:
                    id: 5
                    address: 153 Hunters Drive
                    city: New York
                    country: US
                    zipcode: '8513'
                    createdAt: 2021-01-01T00:00:00.000Z
          description: ''
      tags: *ref_8
      security: *ref_9
    delete:
      operationId: ApiV2MemberAddressesController_delete
      summary: Delete member address
      parameters:
        - name: memberAddressId
          required: true
          in: path
          schema:
            type: number
      responses:
        '200':
          description: ''
      tags: *ref_8
      security: *ref_9
  /api/v2/host/members:
    get:
      operationId: ApiV2HostMembersController_list
      summary: Get members
      parameters:
        - name: page
          required: true
          in: query
          description: Starts at 0
          example: 0
          schema:
            minimum: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          example: 10
          schema:
            minimum: 1
            maximum: 100
            type: integer
        - name: sortOrder
          required: false
          in: query
          schema:
            enum:
              - ASC
              - DESC
            type: string
        - name: sortBy
          required: false
          in: query
          description: Field to sort by
          schema:
            enum:
              - lastSeenAt
              - firstSeenAt
              - firstName
              - lastName
              - email
            type: string
        - name: query
          required: false
          in: query
          description: Search customers by query
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponseDto'
                  - required:
                      - payload
                    properties:
                      payload:
                        type: array
                        items:
                          $ref: '#/components/schemas/HostMemberDto'
          description: ''
      tags: &ref_10
        - host
      security: &ref_11
        - OAuth2: []
    post:
      operationId: ApiV2HostMembersController_create
      summary: Add member
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiV2HostMemberCreateRequestDto'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiV2HostMemberCreateResponseDto'
          description: ''
      tags: *ref_10
      security: *ref_11
  /api/v2/host/members/{memberId}:
    get:
      operationId: ApiV2HostMembersController_get
      summary: Get member
      parameters:
        - name: memberId
          required: true
          in: path
          schema:
            type: number
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostMemberDto'
          description: ''
      tags: *ref_10
      security: *ref_11
  /api/v2/host/members/{memberId}/name:
    put:
      operationId: ApiV2HostMembersController_updateName
      summary: Update member name
      parameters:
        - name: memberId
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HostMemberUpdateNameRequestDto'
      responses:
        '200':
          description: ''
      tags: *ref_10
      security: *ref_11
  /api/v2/host/members/{memberId}/phone-number:
    put:
      operationId: ApiV2HostMembersController_updatePhoneNumber
      summary: Update member phone number
      parameters:
        - name: memberId
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HostMemberUpdatePhoneNumberRequestDto'
      responses:
        '200':
          description: ''
      tags: *ref_10
      security: *ref_11
    delete:
      operationId: ApiV2HostMembersController_deleteMemberPhoneNumber
      summary: Delete all phone number records for a member
      parameters:
        - name: memberId
          required: true
          in: path
          schema:
            type: number
      responses:
        '200':
          description: ''
      tags: *ref_10
      security: *ref_11
  /api/v2/host/members/{memberId}/email:
    put:
      operationId: ApiV2HostMembersController_updateEmail
      summary: Update member e-mail
      parameters:
        - name: memberId
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HostMemberUpdateEmailRequestDto'
      responses:
        '200':
          description: ''
      tags: *ref_10
      security: *ref_11
  /api/v2/host/members/{memberId}/sessions:
    get:
      operationId: ApiV2HostMembersSessionBookingsController_list
      summary: Get session bookings by a specific member
      parameters:
        - name: memberId
          required: true
          in: path
          schema:
            type: number
        - name: page
          required: true
          in: query
          description: Starts at 0
          example: 0
          schema:
            minimum: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          example: 10
          schema:
            minimum: 1
            maximum: 100
            type: integer
        - name: sortOrder
          required: false
          in: query
          schema:
            enum:
              - ASC
              - DESC
            type: string
        - name: sortBy
          required: false
          in: query
          description: Field to sort by
          schema:
            enum:
              - startsAt
            type: string
        - name: startAfter
          required: false
          in: query
          schema:
            type: string
        - name: startBefore
          required: false
          in: query
          schema:
            type: string
        - name: endAfter
          required: false
          in: query
          schema:
            type: string
        - name: endBefore
          required: false
          in: query
          schema:
            type: string
        - name: includeCancelled
          required: false
          in: query
          schema:
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponseDto'
                  - required:
                      - payload
                    properties:
                      payload:
                        type: array
                        items:
                          $ref: '#/components/schemas/HostMemberSessionBookingDto'
          description: ''
      tags:
        - host
      security:
        - OAuth2: []
  /api/v2/host/appointments/reservations:
    get:
      operationId: ApiV2HostAppointmentsController_getHostAppointmentReservations
      summary: Get all appointment reservations
      parameters:
        - name: page
          required: true
          in: query
          description: Starts at 0
          example: 0
          schema:
            minimum: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          example: 10
          schema:
            minimum: 1
            maximum: 200
            type: integer
        - name: sortOrder
          required: false
          in: query
          schema:
            enum:
              - ASC
              - DESC
            type: string
        - name: sortBy
          required: false
          in: query
          description: Field to sort by
          schema:
            enum:
              - startsAt
            type: string
        - name: startAfter
          required: false
          in: query
          schema:
            type: string
        - name: startBefore
          required: false
          in: query
          schema:
            type: string
        - name: endAfter
          required: false
          in: query
          schema:
            type: string
        - name: endBefore
          required: false
          in: query
          schema:
            type: string
        - name: includeCancelled
          required: false
          in: query
          schema:
            type: boolean
        - name: includeCancelledAttendees
          required: false
          in: query
          schema:
            type: boolean
        - name: isPaid
          required: false
          in: query
          schema:
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponseDto'
                  - required:
                      - payload
                    properties:
                      payload:
                        type: array
                        items:
                          $ref: >-
                            #/components/schemas/ApiV2HostAppointmentReservationDto
          description: ''
      tags:
        - host
      security:
        - OAuth2: []
  /api/v2/host/members/{memberId}/appointments:
    get:
      operationId: ApiV2HostMembersAppointmentsController_getAppointmentReservations
      summary: Get appointments by a specific member
      parameters:
        - name: memberId
          required: true
          in: path
          schema:
            type: number
        - name: page
          required: true
          in: query
          description: Starts at 0
          example: 0
          schema:
            minimum: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          example: 10
          schema:
            minimum: 1
            maximum: 200
            type: integer
        - name: sortOrder
          required: false
          in: query
          schema:
            enum:
              - ASC
              - DESC
            type: string
        - name: sortBy
          required: false
          in: query
          description: Field to sort by
          schema:
            enum:
              - startsAt
            type: string
        - name: startAfter
          required: false
          in: query
          schema:
            type: string
        - name: startBefore
          required: false
          in: query
          schema:
            type: string
        - name: endAfter
          required: false
          in: query
          schema:
            type: string
        - name: endBefore
          required: false
          in: query
          schema:
            type: string
        - name: includeCancelled
          required: false
          in: query
          schema:
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponseDto'
                  - required:
                      - payload
                    properties:
                      payload:
                        type: array
                        items:
                          $ref: >-
                            #/components/schemas/HostMemberAppointmentReservationDto
          description: ''
      tags:
        - host
      security:
        - OAuth2: []
  /api/v2/host/members/{memberId}/notes:
    get:
      operationId: ApiV2HostMembersNotesController_list
      summary: Get notes for a specific member
      parameters:
        - name: page
          required: true
          in: query
          description: Starts at 0
          example: 0
          schema:
            minimum: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          example: 10
          schema:
            minimum: 1
            maximum: 100
            type: integer
        - name: sortOrder
          required: false
          in: query
          schema:
            enum:
              - ASC
              - DESC
            type: string
        - name: sortBy
          required: false
          in: query
          description: Field to sort by
          schema:
            enum:
              - createdAt
              - modifiedAt
            type: string
        - name: memberId
          required: true
          in: path
          schema:
            type: number
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponseDto'
                  - required:
                      - payload
                    properties:
                      payload:
                        type: array
                        items:
                          $ref: '#/components/schemas/HostMemberNoteDto'
          description: ''
      tags:
        - host
      security:
        - OAuth2: []
  /api/v2/host/sales:
    get:
      operationId: ApiV2HostSalesController_list
      summary: Get sales
      description: >-
        **Note:** This is an experimental feature, please contact support if you
        want to utilize this endpoint. 
         
        This endpoint returns a list of host sales. 

        The default sorting mode is DESC (newest sales first), but you can also
        specify ASC (oldest sales first). 

        For session and appointment sales, additional meta data is returned in
        the response.
      parameters:
        - name: page
          required: true
          in: query
          description: Starts at 0
          example: 0
          schema:
            minimum: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          example: 10
          schema:
            minimum: 1
            type: integer
        - name: sortOrder
          required: false
          in: query
          schema:
            enum:
              - ASC
              - DESC
            type: string
        - name: sortBy
          required: false
          in: query
          description: Field to sort by
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponseDto'
                  - required:
                      - payload
                    properties:
                      payload:
                        type: array
                        items:
                          $ref: '#/components/schemas/HostSaleDto'
          description: ''
      tags:
        - host
      security:
        - OAuth2: []
  /api/v2/host/sessions:
    get:
      operationId: ApiV2HostSessionsController_getSessions
      summary: Returns a list of sessions
      parameters:
        - name: page
          required: true
          in: query
          description: Starts at 0
          example: 0
          schema:
            minimum: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          example: 10
          schema:
            minimum: 1
            maximum: 200
            type: integer
        - name: sortOrder
          required: false
          in: query
          schema:
            enum:
              - ASC
              - DESC
            type: string
        - name: sortBy
          required: false
          in: query
          description: Field to sort by
          schema:
            enum:
              - name
              - startsAt
              - endsAt
            type: string
        - name: includeCancelled
          required: false
          in: query
          description: also include cancelled sessions
          schema:
            type: boolean
        - name: types
          required: false
          in: query
          description: only return specified session types
          schema:
            type: array
            items:
              type: string
              enum:
                - private
                - special-event
                - special-event-new
                - retreat
                - fitness
                - course
                - course-class
                - semester
                - recital
        - name: teacherId
          required: false
          in: query
          schema:
            type: integer
        - name: locationId
          required: false
          in: query
          schema:
            type: integer
        - name: startAfter
          required: false
          in: query
          schema:
            type: string
        - name: startBefore
          required: false
          in: query
          schema:
            type: string
        - name: endAfter
          required: false
          in: query
          schema:
            type: string
        - name: endBefore
          required: false
          in: query
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponseDto'
                  - required:
                      - payload
                    properties:
                      payload:
                        type: array
                        items:
                          $ref: '#/components/schemas/HostSessionDto'
          description: ''
      tags: &ref_12
        - host
      security: &ref_13
        - OAuth2: []
  /api/v2/host/sessions/{sessionId}:
    get:
      operationId: ApiV2HostSessionsController_getSession
      summary: Returns a session detail
      parameters:
        - name: sessionId
          required: true
          in: path
          schema:
            type: number
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostSessionDetailDto'
          description: ''
      tags: *ref_12
      security: *ref_13
  /api/v2/host/sessions/{sessionId}/bookings:
    get:
      operationId: ApiV2HostSessionsController_getSessionBookings
      summary: Returns a list of session bookings
      parameters:
        - name: page
          required: true
          in: query
          description: Starts at 0
          example: 0
          schema:
            minimum: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          example: 10
          schema:
            minimum: 1
            maximum: 100
            type: integer
        - name: sortOrder
          required: false
          in: query
          schema:
            enum:
              - ASC
              - DESC
            type: string
        - name: sortBy
          required: false
          in: query
          description: Field to sort by
          schema:
            enum:
              - createdAt
              - firstName
              - lastName
            type: string
        - name: includeCancelled
          required: false
          in: query
          description: also include cancelled bookings
          schema:
            type: boolean
        - name: sessionId
          required: true
          in: path
          schema:
            type: number
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponseDto'
                  - required:
                      - payload
                    properties:
                      payload:
                        type: array
                        items:
                          $ref: '#/components/schemas/HostSessionBookingDto'
          description: ''
      tags: *ref_12
      security: *ref_13
  /api/v2/host/sessions/{sessionId}/bookings/free:
    post:
      operationId: ApiV2HostSessionsController_addToSessionForFree
      summary: Add a member to a session for free
      description: >-
        This endpoint allows staff user to add a member to a session for free 
         
        | Error | Description |

        | --- | --- |

        | err-member-not-found | member not found |

        | err-member-not-assigned-to-host | member is not assigned to the host |

        | err-session-not-found | session not found |

        | err-session-not-provided-by-host | session not provided by the host |

        | err-customer-age-prevents-from-action | member is not eligible due to
        age restrictions |

        | err-missing-customer-date-of-birth | member is missing date of birth
        value |

        | err-missing-date-of-birth-setting | host is missing date of birth
        settings |

        | err-invalid-date-of-birth-value | member has invalid date of birth
        value |
      parameters:
        - name: sessionId
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HostFreeSessionBookingRequestDto'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostFreeSessionBookingResponseDto'
          description: ''
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostFreeSessionBookingErrorResponseDto'
      tags: *ref_12
      security: *ref_13
  /api/v2/host/sessions/{sessionId}/waitlist/bookings:
    post:
      operationId: ApiV2HostSessionsController_addToWaitlist
      summary: Add a member to a session waitlist
      description: >-
        This endpoint allows staff user to add a member to a session waitlist 
         
        **NOTE**: You can use the optional `useBoughtMembershipIds` field to
        provide a list of bought memberships that should be attempted to use
        during booking from the waitlist. If you don't provide anything here the
        best matching membership will be used automatically. 
         
        | Error | Description |

        | --- | --- |

        | err-waitlist-not-allowed | session does not have waitlist enabled |

        | err-waitlist-full | session waitlist is full |

        | err-member-already-on-waitlist | member is already on the waitlist |

        | err-member-not-found | member not found |

        | err-member-not-assigned-to-host | member is not assigned to the host |

        | err-session-not-found | session not found |

        | err-session-not-provided-by-host | session not provided by the host |

        | err-customer-age-prevents-from-action | member is not eligible due to
        age restrictions |

        | err-missing-customer-date-of-birth | member is missing date of birth
        value |

        | err-missing-date-of-birth-setting | host is missing date of birth
        settings |

        | err-invalid-date-of-birth-value | member has invalid date of birth
        value |
      parameters:
        - name: sessionId
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HostSessionWaitlistBookingRequestDto'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostSessionWaitlistBookingResponseDto'
          description: ''
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/HostSessionWaitlistBookingErrorResponseDto
      tags: *ref_12
      security: *ref_13
  /api/v2/host/session-bookings/{bookingId}/check-in:
    post:
      operationId: ApiV2HostSessionBookingCheckInController_addSessionBookingCheckIn
      summary: Mark session booking as checked-in
      parameters:
        - name: bookingId
          required: true
          in: path
          schema:
            type: number
      responses:
        '200':
          description: ''
      tags: &ref_14
        - host
      security: &ref_15
        - OAuth2: []
    delete:
      operationId: ApiV2HostSessionBookingCheckInController_removeSessionBookingCheckIn
      summary: Mark session booking as not checked-in
      parameters:
        - name: bookingId
          required: true
          in: path
          schema:
            type: number
      responses:
        '200':
          description: ''
      tags: *ref_14
      security: *ref_15
  /api/v2/host/session-bookings/{bookingId}:
    delete:
      operationId: ApiV2HostSessionBookingController_cancelSessionBooking
      summary: Cancel session booking
      description: >-
        Cancel a single session booking identified by its ID. 

        **Tip:** You can find the ID within the *ApiV2HostSessionBookingDto*
        object (`id` field) returned from the session booking list endpoint. 

        **Note:** This endpoint does not cancel or impact any recurring
        bookings. There is a separate endpoint for canceling those.
      parameters:
        - name: bookingId
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HostSessionBookingCancelRequestDto'
      responses:
        '200':
          description: ''
      tags:
        - host
      security:
        - OAuth2: []
  /api/v2/host/session-recurring-bookings/{bookingId}:
    delete:
      operationId: ApiV2HostSessionRecurringBookingController_cancelRecurringSessionBooking
      summary: Cancel recurring session booking
      description: >-
        Cancel recurring session booking identified by its ID and related
        session bookings. 

        **Tip:** You can find the ID within the ApiV2HostSessionBookingDto
        object (`recurringBookingId` field) returned from the session booking
        list endpoint. 

        **Note:** This endpoint cancels both recurring booking and individual
        bookings originating from the same. 

        User can provide more specific filters to specify which bookings will be
        cancelled.
      parameters:
        - name: bookingId
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HostSessionRecurringBookingCancelRequestDto'
      responses:
        '200':
          description: ''
      tags:
        - host
      security:
        - OAuth2: []
  /api/v2/host/memberships:
    get:
      operationId: ApiV2HostMembershipsController_list
      summary: Get available host memberships
      parameters:
        - name: page
          required: true
          in: query
          description: Starts at 0
          example: 0
          schema:
            minimum: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          example: 10
          schema:
            minimum: 1
            maximum: 200
            type: integer
        - name: sortOrder
          required: false
          in: query
          schema:
            enum:
              - ASC
              - DESC
            type: string
        - name: sortBy
          required: false
          in: query
          description: Field to sort by
          schema:
            enum:
              - name
              - orderNumber
            type: string
        - name: includeDisabled
          required: false
          in: query
          schema:
            type: boolean
        - name: onlyFeatured
          required: false
          in: query
          schema:
            type: boolean
        - name: compatibleWithSessionId
          required: false
          in: query
          schema:
            type: integer
        - name: compatibleWithAppointmentId
          required: false
          in: query
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponseDto'
                  - required:
                      - payload
                    properties:
                      payload:
                        type: array
                        items:
                          $ref: '#/components/schemas/ApiV2HostMembershipDto'
          description: ''
      tags:
        - host
      security:
        - OAuth2: []
  /api/v2/host/members/{memberId}/bought-memberships/active:
    get:
      operationId: ApiV2HostMembersBoughtMembershipsController_list
      summary: Get all active subscriptions and packs of a specific member
      parameters:
        - name: memberId
          required: true
          in: path
          schema:
            type: number
        - name: page
          required: true
          in: query
          description: Starts at 0
          example: 0
          schema:
            minimum: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          example: 10
          schema:
            minimum: 1
            maximum: 200
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponseDto'
                  - required:
                      - payload
                    properties:
                      payload:
                        type: array
                        items:
                          $ref: '#/components/schemas/ApiV2HostBoughtMembershipsDto'
          description: ''
      tags:
        - host
      security:
        - OAuth2: []
  /api/v2/auth/authorize:
    get:
      operationId: ApiV2AuthController_authorize
      summary: OAuth2 authorize
      parameters:
        - name: client_id
          required: true
          in: query
          schema:
            type: string
        - name: redirect_uri
          required: true
          in: query
          schema:
            type: string
        - name: prompt
          required: false
          in: query
          description: |-
            Indicates possible user prompts:

             - login (default): show Sign In screen; if a user is logged in, they are logged out first
             - sign-up: show Sign Up screen; if a user is logged in, they are logged out first
             - none: no prompt, throw when user isn't logged in
          schema:
            enum:
              - login
              - sign-up
              - none
            type: string
        - name: scope
          required: false
          in: query
          schema:
            enum:
              - public-api-v2
            type: string
        - name: response_type
          required: false
          in: query
          schema:
            enum:
              - code
            type: string
        - name: state
          required: false
          in: query
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags: &ref_16
        - auth
      security:
        - OAuth2ApiClient: []
  /api/v2/auth/token:
    post:
      operationId: ApiV2AuthController_token
      summary: OAuth2 token
      description: Obtain a new access token
      parameters: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              oneOf:
                - $ref: '#/components/schemas/AuthTokenPasswordRequestDto'
                - $ref: '#/components/schemas/AuthTokenRefreshTokenRequestDto'
                - $ref: '#/components/schemas/AuthTokenAuthorizationCodeRequestDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthTokenDto'
      tags: *ref_16
      security:
        - OAuth2ApiClient: []
  /api/v2/auth/profile:
    get:
      operationId: ApiV2AuthController_profile
      summary: Get logged user data
      description: Get info about currently logged user
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthProfileDto'
          description: ''
      tags: *ref_16
  /api/v2/auth/logout:
    post:
      operationId: ApiV2AuthController_logout
      summary: Logout
      description: Invalidate provided access token
      parameters: []
      responses:
        '201':
          description: ''
      tags: *ref_16
info:
  title: Momence Public
  description: ''
  version: '2.0'
  contact: {}
tags: []
servers:
  - url: https://api.momence.com
    description: Production API
components:
  schemas:
    MemberInfoDto:
      type: object
      properties:
        id:
          type: integer
        firstName:
          type: string
          example: John
        lastName:
          type: string
          example: Doe
        email:
          type: string
          example: john.doe@example.com
        phoneNumber:
          type: string
          nullable: true
          example: '1234567890'
        pictureUrl:
          type: string
          nullable: true
          example: https://example.com/picture.jpg
      required:
        - id
        - firstName
        - lastName
        - email
        - phoneNumber
        - pictureUrl
    MemberVisitsDto:
      type: object
      properties:
        appointments:
          type: integer
          description: All the appointments the customer has booked
        appointmentsVisits:
          type: integer
          description: All the appointments the customer has booked and checked into
        bookings:
          type: integer
          description: All the session bookings the customer has booked
        bookingsVisits:
          type: integer
          description: All the session bookings the customer has booked and checked into
        openAreaVisits:
          type: integer
          description: All visits of open areas for customer
        total:
          type: integer
          description: Combined count of appointments + bookings
        totalVisits:
          type: integer
          description: Combined count of appointmentsVisits + bookingsVisits
      required:
        - appointments
        - appointmentsVisits
        - bookings
        - bookingsVisits
        - openAreaVisits
        - total
        - totalVisits
    ApiV2MemberUpdateRequestDto:
      type: object
      properties:
        firstName:
          type: string
          example: John
          minLength: 1
          maxLength: 100
        lastName:
          type: string
          example: Doe
          minLength: 1
          maxLength: 100
      required:
        - firstName
        - lastName
    ApiV2MemberUpdateEmailRequestDto:
      type: object
      properties:
        email:
          type: string
          example: john.doe@example.com
      required:
        - email
    ApiV2MemberUpdatePhoneNumberRequestDto:
      type: object
      properties:
        phoneNumber:
          type: string
          example: '1234567890'
      required:
        - phoneNumber
    PaginatedResponseDataDto:
      type: object
      properties:
        page:
          type: integer
          example: 0
          minimum: 0
        pageSize:
          type: integer
          example: 10
          minimum: 1
        totalCount:
          type: integer
          example: 1
        sortBy:
          type: string
        sortOrder:
          type: string
          enum:
            - ASC
            - DESC
      required:
        - page
        - pageSize
        - totalCount
    PaginatedResponseDto:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/PaginatedResponseDataDto'
      required:
        - pagination
    MemberTeacherDto:
      type: object
      properties:
        id:
          type: integer
          example: 1
        firstName:
          type: string
          example: John
        lastName:
          type: string
          example: Doe
        pictureUrl:
          type: string
          nullable: true
          example: https://example.com/picture.jpg
      required:
        - id
        - firstName
        - lastName
        - pictureUrl
    MemberLocationDto:
      type: object
      properties:
        id:
          type: integer
          example: 1
        name:
          type: string
          example: Main Studio
      required:
        - id
        - name
    MemberSessionBookingSessionDto:
      type: object
      properties:
        id:
          type: integer
          example: 1
        name:
          type: string
          example: Stretching with John
        type:
          enum:
            - private
            - special-event
            - special-event-new
            - retreat
            - fitness
            - course
            - course-class
            - semester
            - recital
          type: string
          example: fitness
          x-enumNames:
            - PRIVATE
            - SPECIAL_EVENT
            - SPECIAL_EVENT_NEW
            - RETREAT
            - FITNESS
            - COURSE
            - COURSE_CLASS
            - SEMESTER
            - RECITAL
        description:
          type: string
          nullable: true
          example: >-
            Our program is designed to help you increase your flexibility and
            strength.
        startsAt:
          type: string
          example: '2021-08-01T10:00:00Z'
          format: date-time
        endsAt:
          type: string
          example: '2021-08-01T11:00:00Z'
          format: date-time
        durationInMinutes:
          type: integer
          example: 60
          minimum: 0
        capacity:
          type: integer
          nullable: true
          example: 10
          minimum: 0
        teacher:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/MemberTeacherDto'
        isRecurring:
          type: boolean
          example: false
        isInPerson:
          type: boolean
          example: false
        inPersonLocation:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/MemberLocationDto'
        onlineStreamUrl:
          type: string
          nullable: true
          example: https://example.com/online-stream
        onlineStreamPassword:
          type: string
          nullable: true
          example: password123
        bannerImageUrl:
          type: string
          nullable: true
          example: https://example.com/banner.jpg
        hostPhotoUrl:
          type: string
          nullable: true
          example: https://example.com/host.jpg
      required:
        - id
        - name
        - type
        - description
        - startsAt
        - endsAt
        - durationInMinutes
        - capacity
        - teacher
        - isRecurring
        - isInPerson
        - inPersonLocation
        - onlineStreamUrl
        - onlineStreamPassword
        - bannerImageUrl
        - hostPhotoUrl
    MemberSessionBookingDto:
      type: object
      properties:
        id:
          type: integer
          example: 1
        createdAt:
          type: string
          example: '2021-08-01T10:00:00Z'
          format: date-time
        roomSpotId:
          type: integer
          nullable: true
        checkedIn:
          type: boolean
        cancelledAt:
          type: string
          nullable: true
          example: null
          format: date-time
        isRecurring:
          type: boolean
          example: false
        session:
          $ref: '#/components/schemas/MemberSessionBookingSessionDto'
      required:
        - id
        - createdAt
        - roomSpotId
        - checkedIn
        - cancelledAt
        - isRecurring
        - session
    HostTagDto:
      type: object
      properties:
        id:
          type: integer
          example: 1
        name:
          type: string
          example: VIP
        isCustomerBadge:
          type: boolean
          example: false
        badgeLabel:
          type: string
          nullable: true
          example: VIP
        badgeColor:
          type: string
          nullable: true
          example: '#fe0000'
      required:
        - id
        - name
        - isCustomerBadge
        - badgeLabel
        - badgeColor
    MemberHostMembershipDto:
      type: object
      properties:
        id:
          type: integer
          example: 5
        name:
          type: string
          example: Monthly Membership
        description:
          type: string
          nullable: true
          example: Monthly membership with unlimited access to <b>all</b> classes.
        type:
          enum: &ref_17
            - subscription
            - on-demand-subscription
            - package-events
            - package-money
            - patron
          type: string
          example: subscription
          x-enumNames: &ref_18
            - Subscription
            - OnDemandSubscription
            - PackageEvents
            - PackageMoney
            - Patron
        locationId:
          type: integer
          nullable: true
          example: null
        disabled:
          type: boolean
          description: Indicates that the membership was disabled and shouldn't be shown
          example: false
        autoRenewing:
          type: boolean
          description: Indicates that membership renews after specific interval
          example: true
        minimumAutoRenews:
          type: integer
          nullable: true
          description: >-
            How many times membership has to renew before user can cancel
            renewal
          example: null
        eventCredits:
          type: integer
          nullable: true
          description: >-
            For PACKAGE_EVENTS memberships, defines how many event credits are
            included
          example: null
        moneyCredits:
          type: number
          nullable: true
          description: For PACKAGE_MONEY memberships, defines how much money is included
          example: null
        duration:
          type: integer
          nullable: true
          description: >-
            For SUBSCRIPTION this is auto renew duration, for PACKAGE_* this is
            expiration time
          example: 1
        durationUnit:
          nullable: true
          type: string
          example: months
          enum: &ref_19
            - days
            - months
            - years
          x-enumNames: &ref_20
            - DAYS
            - MONTHS
            - YEARS
        isActivatedOnFirstUse:
          type: boolean
          description: >-
            If set to false, membership is activated upon purchase. When set to
            true, membership is activated at the moment of the first purchase.
            When the purchase is for booking in the future, the activation date
            is set to the booking date.
          example: false
        hasFreeTrial:
          type: boolean
          example: false
        freeTrialDurationInDays:
          type: integer
          example: 7
        contractAgreement:
          type: string
          nullable: true
          example: Contract agreement text
        order:
          type: integer
          example: 1
        isIntroOffer:
          type: boolean
          example: false
        usageLimitForSessions:
          type: number
          nullable: true
          description: >-
            Only applicable for SUBSCRIPTION. Maximum number of sessions
            customer can book with this membership during one renewal period,
            not used when combinedUsageLimitEnabled=true
          example: 5
        usageLimitForAppointments:
          type: number
          nullable: true
          description: >-
            Only applicable for SUBSCRIPTION. Maximum number of appointments
            customer can book with this membership during one renewal period,
            not used when combinedUsageLimitEnabled=true
          example: 2
        combinedUsageLimitEnabled:
          type: boolean
          description: >-
            Only applicable for SUBSCRIPTION. The usage limits of the
            memberships are applied to sum of both bookings and appointments.
          example: false
        combinedUsageLimit:
          type: number
          nullable: true
          description: >-
            Only applicable for SUBSCRIPTION. Combined maximum number of
            bookings and appointments customer can book with this membership
            during one renewal period, only used when
            combinedUsageLimitEnabled=true
          example: null
        usageLimitRenewalEnabled:
          type: boolean
          description: >-
            Only applicable for SUBSCRIPTION. Calculate usage limits differently
            to renewal duration.
          example: false
        usageLimitRenewalDuration:
          type: number
          nullable: true
          description: >-
            Only applicable for SUBSCRIPTION. Interval for which the usage
            limits are calculated, only used when usageLimitRenewalEnabled=true
          example: null
        usageLimitRenewalDurationUnit:
          nullable: true
          type: string
          description: >-
            Only applicable for SUBSCRIPTION. Interval for which the usage
            limits are calculated, only used when usageLimitRenewalEnabled=true
          example: null
          enum: &ref_21
            - days
            - months
            - years
          x-enumNames: &ref_22
            - DAYS
            - MONTHS
            - YEARS
        usageLimitRolloverEnabled:
          type: boolean
          description: >-
            Only applicable for SUBSCRIPTION. When true and customer doesn't use
            reach their usage limits, the rest is transferred to the customer
            according to usageLimitRolloverMode
          example: false
        usageLimitRolloverMode:
          nullable: true
          type: string
          description: >-
            Only applicable for SUBSCRIPTION. How should extra usage limits be
            transferred to customer, either as package or as addition to next
            renewal period. Only used when usageLimitRolloverEnabled=true
          example: null
          enum: &ref_23
            - next-renewal
            - event-credits
          x-enumNames: &ref_24
            - NEXT_RENEWAL
            - EVENT_CREDITS
        usageLimitRolloverExpirationDuration:
          type: number
          nullable: true
          description: >-
            Only applicable for SUBSCRIPTION. When should the extra limits /
            package expire after rolling over. Only used when
            usageLimitRolloverEnabled=true
          example: null
        usageLimitRolloverExpirationDurationUnit:
          nullable: true
          type: string
          description: >-
            Only applicable for SUBSCRIPTION. When should the extra limits /
            package expire after rolling over. Only used when
            usageLimitRolloverEnabled=true
          example: null
          enum: &ref_25
            - days
            - months
            - years
          x-enumNames: &ref_26
            - DAYS
            - MONTHS
            - YEARS
        startDate:
          type: string
          nullable: true
          description: Explicit start date for memberships that have specific duration
          example: '2022-01-01T00:00:00Z'
          format: date-time
        endDate:
          type: string
          nullable: true
          description: Explicit end date for memberships that have specific duration
          example: '2022-02-01T00:00:00Z'
          format: date-time
        featured:
          type: boolean
          description: Indicates that membership should be featured on checkout
          example: false
        priceType:
          enum:
            - fixed-price
            - dynamic
          type: string
          example: fixed-price
          x-enumNames:
            - FIXED
            - DYNAMIC
        price:
          type: number
          nullable: true
          description: In cents, membership price for FIXED priceType
          example: 955
        minimumPrice:
          type: integer
          nullable: true
          description: In cents, minimum membership price for DYNAMIC priceType
          example: null
        maximumPrice:
          type: integer
          nullable: true
          description: In cents, maximum membership price for DYNAMIC priceType
          example: null
        recommendedPrice:
          type: integer
          nullable: true
          description: In cents, recommended membership price for DYNAMIC priceType
          example: null
        priceIncludesTax:
          type: boolean
          description: Indicates if tax is already included in the price
          example: true
        taxRateInPercent:
          type: number
          nullable: true
          description: Tax rate in percents
          example: 20
        freeTrialPrice:
          type: integer
          description: in cents
          example: 199
        tags:
          type: array
          items:
            $ref: '#/components/schemas/HostTagDto'
      required:
        - id
        - name
        - description
        - type
        - locationId
        - disabled
        - autoRenewing
        - minimumAutoRenews
        - eventCredits
        - moneyCredits
        - duration
        - durationUnit
        - isActivatedOnFirstUse
        - hasFreeTrial
        - freeTrialDurationInDays
        - contractAgreement
        - order
        - isIntroOffer
        - usageLimitForSessions
        - usageLimitForAppointments
        - combinedUsageLimitEnabled
        - combinedUsageLimit
        - usageLimitRenewalEnabled
        - usageLimitRenewalDuration
        - usageLimitRenewalDurationUnit
        - usageLimitRolloverEnabled
        - usageLimitRolloverMode
        - usageLimitRolloverExpirationDuration
        - usageLimitRolloverExpirationDurationUnit
        - startDate
        - endDate
        - featured
        - priceType
        - price
        - minimumPrice
        - maximumPrice
        - recommendedPrice
        - priceIncludesTax
        - taxRateInPercent
        - freeTrialPrice
        - tags
    HostMembershipBasicDto:
      type: object
      properties:
        id:
          type: integer
          example: 5
        name:
          type: string
          example: Monthly Membership
        description:
          type: string
          nullable: true
          example: Monthly membership with unlimited access to <b>all</b> classes.
        type:
          enum: *ref_17
          type: string
          example: subscription
          x-enumNames: *ref_18
        locationId:
          type: integer
          nullable: true
          example: null
        disabled:
          type: boolean
          description: Indicates that the membership was disabled
          example: false
        autoRenewing:
          type: boolean
          description: Indicates that membership renews after specific interval
          example: true
        minimumAutoRenews:
          type: integer
          nullable: true
          description: >-
            How many times membership has to renew before user can cancel
            renewal
          example: null
        eventCredits:
          type: integer
          nullable: true
          description: >-
            For PACKAGE_EVENTS memberships, defines how many event credits are
            included
          example: null
        moneyCredits:
          type: number
          nullable: true
          description: For PACKAGE_MONEY memberships, defines how much money is included
          example: null
        duration:
          type: integer
          nullable: true
          description: >-
            For SUBSCRIPTION this is auto renew duration, for PACKAGE_* this is
            expiration time
          example: 1
        durationUnit:
          nullable: true
          type: string
          example: months
          enum: *ref_19
          x-enumNames: *ref_20
        isActivatedOnFirstUse:
          type: boolean
          description: >-
            If set to false, membership is activated upon purchase. When set to
            true, membership is activated at the moment of the first purchase.
            When the purchase is for booking in the future, the activation date
            is set to the booking date.
          example: false
        hasFreeTrial:
          type: boolean
          example: false
        freeTrialDurationInDays:
          type: integer
          example: 7
        contractAgreement:
          type: string
          nullable: true
          example: Contract agreement text
        order:
          type: integer
          example: 1
        isIntroOffer:
          type: boolean
          example: false
        usageLimitForSessions:
          type: number
          nullable: true
          description: >-
            Only applicable for SUBSCRIPTION. Maximum number of sessions
            customer can book with this membership during one renewal period,
            not used when combinedUsageLimitEnabled=true
          example: 5
        usageLimitForAppointments:
          type: number
          nullable: true
          description: >-
            Only applicable for SUBSCRIPTION. Maximum number of appointments
            customer can book with this membership during one renewal period,
            not used when combinedUsageLimitEnabled=true
          example: 2
        combinedUsageLimitEnabled:
          type: boolean
          description: >-
            Only applicable for SUBSCRIPTION. The usage limits of the
            memberships are applied to sum of both bookings and appointments.
          example: false
        combinedUsageLimit:
          type: number
          nullable: true
          description: >-
            Only applicable for SUBSCRIPTION. Combined maximum number of
            bookings and appointments customer can book with this membership
            during one renewal period, only used when
            combinedUsageLimitEnabled=true
          example: null
        usageLimitRenewalEnabled:
          type: boolean
          description: >-
            Only applicable for SUBSCRIPTION. Calculate usage limits differently
            to renewal duration.
          example: false
        usageLimitRenewalDuration:
          type: number
          nullable: true
          description: >-
            Only applicable for SUBSCRIPTION. Interval for which the usage
            limits are calculated, only used when usageLimitRenewalEnabled=true
          example: null
        usageLimitRenewalDurationUnit:
          nullable: true
          type: string
          description: >-
            Only applicable for SUBSCRIPTION. Interval for which the usage
            limits are calculated, only used when usageLimitRenewalEnabled=true
          example: null
          enum: *ref_21
          x-enumNames: *ref_22
        usageLimitRolloverEnabled:
          type: boolean
          description: >-
            Only applicable for SUBSCRIPTION. When true and customer doesn't use
            reach their usage limits, the rest is transferred to the customer
            according to usageLimitRolloverMode
          example: false
        usageLimitRolloverMode:
          nullable: true
          type: string
          description: >-
            Only applicable for SUBSCRIPTION. How should extra usage limits be
            transferred to customer, either as package or as addition to next
            renewal period. Only used when usageLimitRolloverEnabled=true
          example: null
          enum: *ref_23
          x-enumNames: *ref_24
        usageLimitRolloverExpirationDuration:
          type: number
          nullable: true
          description: >-
            Only applicable for SUBSCRIPTION. When should the extra limits /
            package expire after rolling over. Only used when
            usageLimitRolloverEnabled=true
          example: null
        usageLimitRolloverExpirationDurationUnit:
          nullable: true
          type: string
          description: >-
            Only applicable for SUBSCRIPTION. When should the extra limits /
            package expire after rolling over. Only used when
            usageLimitRolloverEnabled=true
          example: null
          enum: *ref_25
          x-enumNames: *ref_26
      required:
        - id
        - name
        - description
        - type
        - locationId
        - disabled
        - autoRenewing
        - minimumAutoRenews
        - eventCredits
        - moneyCredits
        - duration
        - durationUnit
        - isActivatedOnFirstUse
        - hasFreeTrial
        - freeTrialDurationInDays
        - contractAgreement
        - order
        - isIntroOffer
        - usageLimitForSessions
        - usageLimitForAppointments
        - combinedUsageLimitEnabled
        - combinedUsageLimit
        - usageLimitRenewalEnabled
        - usageLimitRenewalDuration
        - usageLimitRenewalDurationUnit
        - usageLimitRolloverEnabled
        - usageLimitRolloverMode
        - usageLimitRolloverExpirationDuration
        - usageLimitRolloverExpirationDurationUnit
    MemberBoughtMembershipsDto:
      type: object
      properties:
        id:
          type: integer
          example: 1
        type:
          enum:
            - subscription
            - on-demand-subscription
            - package-events
            - package-money
            - patron
          type: string
          example: subscription
          x-enumNames:
            - Subscription
            - OnDemandSubscription
            - PackageEvents
            - PackageMoney
            - Patron
        startDate:
          type: string
          nullable: true
          description: start date of the bought membership
          example: '2021-01-01T00:00:00Z'
          format: date-time
        endDate:
          type: string
          nullable: true
          description: expiration date of the bought membership
          example: '2021-02-01T00:00:00Z'
          format: date-time
        eventCreditsLeft:
          type: number
          nullable: true
          description: number of event credits left, valid for PACKAGE_EVENTS
          example: null
        eventCreditsTotal:
          type: number
          nullable: true
          description: >-
            number of event credits originally included in the package, valid
            for PACKAGE_EVENTS
          example: null
        moneyCreditsLeft:
          type: number
          nullable: true
          description: number of money credits left, valid for PACKAGE_MONEY
          example: null
        moneyCreditsTotal:
          type: number
          nullable: true
          description: >-
            number of money credits originally included in the package, valid
            for PACKAGE_MONEY
          example: null
        usageLimitForSessions:
          type: number
          nullable: true
          description: >-
            Non-null value indicates the membership has limit to number of
            session bookings, only valid for SUBSCRIPTION
          example: 5
        usageLimitForAppointments:
          type: number
          nullable: true
          description: >-
            Non-null value indicates the membership has limit to number of
            appointments booked, only valid for SUBSCRIPTION
          example: 3
        combinedUsageLimit:
          type: number
          nullable: true
          description: >-
            Non-null value indicates the membership has combined limits for
            session and appointment bookings, only valid for SUBSCRIPTION
          example: null
        usedSessions:
          type: number
          nullable: true
          description: only valid for SUBSCRIPTION with session-only usage limits
          example: 1
        usedAppointments:
          type: number
          nullable: true
          description: only valid for SUBSCRIPTION with appointment-only usage limits
          example: 2
        combinedUsage:
          type: number
          nullable: true
          description: only valid for SUBSCRIPTION with combined usage limits
          example: null
        usageLimitStartDate:
          type: string
          nullable: true
          description: >-
            date range for which the current usage is calculated for, only valid
            for SUBSCRIPTION with usage limits
          example: null
          format: date-time
        usageLimitEndDate:
          type: string
          nullable: true
          description: >-
            date range for which the current usage is calculated for, only valid
            for SUBSCRIPTION with usage limits
          example: null
          format: date-time
        membership:
          nullable: true
          description: >-
            info about origin membership, it's possible the bought membership
            has no origin membership
          allOf:
            - $ref: '#/components/schemas/HostMembershipBasicDto'
      required:
        - id
        - type
        - startDate
        - endDate
        - eventCreditsLeft
        - eventCreditsTotal
        - moneyCreditsLeft
        - moneyCreditsTotal
        - usageLimitForSessions
        - usageLimitForAppointments
        - combinedUsageLimit
        - usedSessions
        - usedAppointments
        - combinedUsage
        - usageLimitStartDate
        - usageLimitEndDate
        - membership
    MemberHostSessionDto:
      type: object
      properties:
        id:
          type: integer
          example: 3
        name:
          type: string
          example: Stretching with John
        type:
          enum:
            - private
            - special-event
            - special-event-new
            - retreat
            - fitness
            - course
            - course-class
            - semester
            - recital
          type: string
          example: fitness
          x-enumNames:
            - PRIVATE
            - SPECIAL_EVENT
            - SPECIAL_EVENT_NEW
            - RETREAT
            - FITNESS
            - COURSE
            - COURSE_CLASS
            - SEMESTER
            - RECITAL
        description:
          type: string
          nullable: true
          example: Our stretching class is a great way to start your day.
        startsAt:
          type: string
          example: '2021-01-01T05:00:00Z'
          format: date-time
        endsAt:
          type: string
          example: '2021-01-01T06:00:00Z'
          format: date-time
        durationInMinutes:
          type: integer
          example: 60
        capacity:
          type: integer
          nullable: true
          description: Maximum session capacity, NULL means unlimited
          example: 10
          minimum: 0
        participants:
          type: integer
          description: How many bookings the session already has
          example: 1
        waitlistEnabled:
          type: boolean
          example: true
        waitlistCapacity:
          type: integer
          nullable: true
          description: >-
            Maximum number of people on the waitlist if the waitlist is enabled.
            NULL means unlimited
          example: 5
        salesCutoffInMinutes:
          type: number
          nullable: true
          description: How long before the session start the bookings sale stops
          example: 10
        isCancelled:
          type: boolean
          example: false
        priceType:
          enum:
            - fixed-price
            - dynamic
          type: string
          example: fixed-price
          x-enumNames:
            - FIXED
            - DYNAMIC
        fixedTicketPrice:
          type: number
          example: 955
        dynamicTicketPriceMin:
          type: number
          nullable: true
          example: null
        dynamicTicketPriceMax:
          type: number
          nullable: true
          example: null
        dynamicTicketFreeOptionEnabled:
          type: boolean
          nullable: true
          example: null
        teacher:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/MemberTeacherDto'
        originalTeacher:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/MemberTeacherDto'
        additionalTeachers:
          type: array
          items:
            $ref: '#/components/schemas/MemberTeacherDto'
        isRecurring:
          type: boolean
          example: false
        isInPerson:
          type: boolean
          example: false
        inPersonLocation:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/MemberLocationDto'
        bannerImageUrl:
          type: string
          nullable: true
          example: https://example.com/image.jpg
        hostPhotoUrl:
          type: string
          nullable: true
          example: https://example.com/image.jpg
        onlineStreamUrl:
          type: string
          nullable: true
          example: https://example.com/online-stream
        onlineStreamPassword:
          type: string
          nullable: true
          example: password123
      required:
        - id
        - name
        - type
        - description
        - startsAt
        - endsAt
        - durationInMinutes
        - capacity
        - participants
        - waitlistEnabled
        - waitlistCapacity
        - salesCutoffInMinutes
        - isCancelled
        - priceType
        - fixedTicketPrice
        - dynamicTicketPriceMin
        - dynamicTicketPriceMax
        - dynamicTicketFreeOptionEnabled
        - teacher
        - originalTeacher
        - additionalTeachers
        - isRecurring
        - isInPerson
        - inPersonLocation
        - bannerImageUrl
        - hostPhotoUrl
        - onlineStreamUrl
        - onlineStreamPassword
    MemberHostLocationDto:
      type: object
      properties:
        id:
          type: integer
          example: 5
        parentLocationId:
          type: integer
          nullable: true
          example: null
        name:
          type: string
          nullable: true
          example: Brooklyn Location
        timeZone:
          type: string
          nullable: true
          example: America/New_York
        fullAddress:
          type: string
          nullable: true
          description: Full location address
          example: 96 North Country Club Street, Brooklyn, NY 11233
        address:
          type: string
          nullable: true
          example: 96 North Country Club Street
        city:
          type: string
          nullable: true
          example: Brooklyn
        countryCode:
          type: string
          nullable: true
          example: NY
        zipCode:
          type: string
          nullable: true
          example: '11233'
        latitude:
          type: number
          nullable: true
          example: 40.6453448
        longitude:
          type: number
          nullable: true
          example: -74.0275687
        isPhysical:
          type: boolean
          nullable: true
          example: true
      required:
        - id
        - parentLocationId
        - name
        - timeZone
        - fullAddress
        - address
        - city
        - countryCode
        - zipCode
        - latitude
        - longitude
        - isPhysical
    MemberCheckoutCompatibleBoughtMembershipDto:
      type: object
      properties:
        id:
          type: integer
          example: 1
        type:
          enum:
            - subscription
            - on-demand-subscription
            - package-events
            - package-money
            - patron
          type: string
          example: subscription
          x-enumNames:
            - Subscription
            - OnDemandSubscription
            - PackageEvents
            - PackageMoney
            - Patron
        startDate:
          type: string
          nullable: true
          description: start date of the bought membership
          example: '2021-01-01T00:00:00Z'
          format: date-time
        endDate:
          type: string
          nullable: true
          description: expiration date of the bought membership
          example: '2021-02-01T00:00:00Z'
          format: date-time
        eventCreditsLeft:
          type: number
          nullable: true
          description: number of event credits left, valid for PACKAGE_EVENTS
          example: null
        eventCreditsTotal:
          type: number
          nullable: true
          description: >-
            number of event credits originally included in the package, valid
            for PACKAGE_EVENTS
          example: null
        moneyCreditsLeft:
          type: number
          nullable: true
          description: number of money credits left, valid for PACKAGE_MONEY
          example: null
        moneyCreditsTotal:
          type: number
          nullable: true
          description: >-
            number of money credits originally included in the package, valid
            for PACKAGE_MONEY
          example: null
        membership:
          nullable: true
          description: >-
            info about origin membership, it's possible the bought membership
            has no origin membership
          allOf:
            - $ref: '#/components/schemas/HostMembershipBasicDto'
      required:
        - id
        - type
        - startDate
        - endDate
        - eventCreditsLeft
        - eventCreditsTotal
        - moneyCreditsLeft
        - moneyCreditsTotal
        - membership
    MemberCheckoutCompatibleMembershipDto:
      type: object
      properties:
        boughtMembership:
          $ref: '#/components/schemas/MemberCheckoutCompatibleBoughtMembershipDto'
        incompatibility:
          enum:
            - session-membership-excluded
            - session-bought-membership-will-expire
            - session-bought-membership-pack-will-expire
            - session-bought-membership-already-used
            - session-bought-membership-usage-limit-reached
            - >-
              session-bought-membership-usage-limit-reached-for-semester-or-course
            - session-bought-membership-daily-limit-reached
            - session-bought-membership-no-event-credits-left
            - session-bought-membership-no-money-credits-left
            - session-bought-membership-on-demand
            - session-bought-membership-starts-later
            - session-bought-membership-invalid-type
            - session-bought-membership-disabled
            - session-bought-membership-frozen
            - session-subscription-ticket-limit
            - unknown
          type: string
          x-enumNames:
            - SESSION_MEMBERSHIP_EXCLUDED
            - SESSION_BOUGHT_MEMBERSHIP_WILL_EXPIRE
            - SESSION_BOUGHT_MEMBERSHIP_PACK_WILL_EXPIRE
            - SESSION_BOUGHT_MEMBERSHIP_ALREADY_USED
            - SESSION_BOUGHT_MEMBERSHIP_USAGE_LIMIT_REACHED
            - >-
              SESSION_BOUGHT_MEMBERSHIP_USAGE_LIMIT_REACHED_FOR_SEMESTER_OR_COURSE
            - SESSION_BOUGHT_MEMBERSHIP_DAILY_LIMIT_REACHED
            - SESSION_BOUGHT_MEMBERSHIP_NO_EVENT_CREDITS_LEFT
            - SESSION_BOUGHT_MEMBERSHIP_NO_MONEY_CREDITS_LEFT
            - SESSION_BOUGHT_MEMBERSHIP_ON_DEMAND
            - SESSION_BOUGHT_MEMBERSHIP_STARTS_LATER
            - SESSION_BOUGHT_MEMBERSHIP_INVALID_TYPE
            - SESSION_BOUGHT_MEMBERSHIP_DISABLED
            - SESSION_BOUGHT_MEMBERSHIP_FROZEN
            - SESSION_BOUGHT_MEMBERSHIP_TICKET_LIMIT
            - UNKNOWN
      required:
        - boughtMembership
    MemberCheckoutCompatibleMembershipsDto:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/MemberCheckoutCompatibleMembershipDto'
      required:
        - items
    MemberCheckoutCompatibleMembershipsRequestDto:
      type: object
      properties:
        items:
          type: array
          items: &ref_27
            oneOf:
              - $ref: '#/components/schemas/MemberCheckoutMembershipItemDto'
              - $ref: '#/components/schemas/MemberCheckoutSessionItemDto'
        homeLocationId:
          type: integer
      required:
        - items
    MemberCheckoutMembershipItemDto:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum: &ref_28
            - subscription
        membershipId:
          type: integer
      required:
        - id
        - type
        - membershipId
    MemberCheckoutSessionItemDto:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum: &ref_29
            - session
        sessionId:
          type: integer
        appliedPriceRuleIds:
          type: array
          items:
            type: integer
      required:
        - id
        - type
        - sessionId
    MemberCheckoutPricesItemDto:
      type: object
      properties:
        id:
          type: string
        priceInCurrencyWithTax:
          type: string
        priceInCurrencyWithoutTax:
          type: string
        taxInCurrency:
          type: string
      required:
        - id
        - priceInCurrencyWithTax
        - priceInCurrencyWithoutTax
        - taxInCurrency
    MemberCheckoutPricesResponseDto:
      type: object
      properties:
        totalInCurrency:
          type: string
        itemsWithPrices:
          type: array
          items:
            $ref: '#/components/schemas/MemberCheckoutPricesItemDto'
      required:
        - totalInCurrency
        - itemsWithPrices
    MemberCheckoutPricesRequestDto:
      type: object
      properties:
        items:
          type: array
          items: *ref_27
        homeLocationId:
          type: integer
        paymentMethods:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MemberPaymentMethodMembershipDto'
              - $ref: '#/components/schemas/MemberPaymentMethodSavedPaymentMethodDto'
      required:
        - items
        - paymentMethods
    MemberCheckoutResponseDto:
      type: object
      properties:
        purchasedItems:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MemberCheckoutPurchasedSessionDto'
              - $ref: '#/components/schemas/MemberCheckoutPurchasedMembershipDto'
              - $ref: '#/components/schemas/MemberCheckoutPurchasedAppointmentDto'
              - $ref: '#/components/schemas/MemberCheckoutPurchasedProductDto'
              - $ref: '#/components/schemas/MemberCheckoutPurchasedGiftCardDto'
              - $ref: '#/components/schemas/MemberCheckoutPurchasedMoneyCreditsDto'
              - $ref: '#/components/schemas/MemberCheckoutPurchasedEventCreditsDto'
      required:
        - purchasedItems
    MemberCheckoutMembershipItemWithPriceDto:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum: *ref_28
        membershipId:
          type: integer
        attemptedPriceInCurrency:
          type: string
      required:
        - id
        - type
        - membershipId
        - attemptedPriceInCurrency
    MemberCheckoutSessionItemWithPriceDto:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum: *ref_29
        sessionId:
          type: integer
        appliedPriceRuleIds:
          type: array
          items:
            type: integer
        attemptedPriceInCurrency:
          type: string
      required:
        - id
        - type
        - sessionId
        - attemptedPriceInCurrency
    MemberPaymentMethodMembershipDto:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - membership
        boughtMembershipId:
          type: integer
      required:
        - id
        - type
        - boughtMembershipId
    MemberPaymentMethodSavedPaymentMethodDto:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - saved_payment_method
        savedPaymentMethodId:
          type: integer
      required:
        - id
        - type
        - savedPaymentMethodId
    MemberCheckoutPurchasedSessionDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - session
        sessionBookingId:
          type: integer
      required:
        - type
        - sessionBookingId
    MemberCheckoutPurchasedMembershipDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - membership
        boughtMembershipId:
          type: integer
      required:
        - type
        - boughtMembershipId
    MemberCheckoutPurchasedAppointmentDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - appointment
        appointmentTransactionId:
          type: integer
      required:
        - type
        - appointmentTransactionId
    MemberCheckoutPurchasedProductDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - product
        productOrderId:
          type: integer
      required:
        - type
        - productOrderId
    MemberCheckoutPurchasedGiftCardDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - gift-card
        giftCardId:
          type: integer
      required:
        - type
        - giftCardId
    MemberCheckoutPurchasedMoneyCreditsDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - money-credit
        numberOfMoneyCredits:
          type: number
      required:
        - type
        - numberOfMoneyCredits
    MemberCheckoutPurchasedEventCreditsDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - event-credit
        numberOfEventCredits:
          type: number
      required:
        - type
        - numberOfEventCredits
    MemberCheckoutRequestDto:
      type: object
      properties:
        items:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MemberCheckoutMembershipItemWithPriceDto'
              - $ref: '#/components/schemas/MemberCheckoutSessionItemWithPriceDto'
        homeLocationId:
          type: integer
        paymentMethods:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MemberPaymentMethodMembershipDto'
              - $ref: '#/components/schemas/MemberPaymentMethodSavedPaymentMethodDto'
      required:
        - items
        - paymentMethods
    MemberCheckoutErrorResponseDto:
      type: object
      properties:
        type:
          enum:
            - err-no-payment-methods
            - err-no-items
            - err-too-many-items
            - err-combined-payment-methods
            - err-cannot-pay-for-membership-with-membership
            - err-multiple-membership-types
            - err-multiple-subscriptions
            - err-saved-card-not-found
            - err-cart-validation-failed
            - err-payment-failed
            - err-duplicate-membership-payment-methods
            - err-invalid-membership-payment-method
            - err-incompatible-membership
            - err-unsupported-payment-methods
            - err-session-has-invalid-state
            - err-session-has-passed
            - err-session-sales-ended
            - err-session-dropins-not-allowed
            - err-session-is-full
            - err-session-purchase-limit-reached
            - err-session-access-restricted
            - err-duplicate-item-ids
            - err-duplicate-payment-method-ids
            - err-unsupported-item-type
            - err-missing-customer-date-of-birth
            - err-customer-age-prevents-from-action
          type: string
          x-enumNames:
            - ERR_NO_PAYMENT_METHODS
            - ERR_NO_ITEMS
            - ERR_TOO_MANY_ITEMS
            - ERR_COMBINED_PAYMENT_METHODS
            - ERR_CANNOT_PAY_FOR_MEMBERSHIP_WITH_MEMBERSHIP
            - ERR_MULTIPLE_MEMBERSHIP_TYPES
            - ERR_MULTIPLE_SUBSCRIPTIONS
            - ERR_SAVED_CARD_NOT_FOUND
            - ERR_CART_VALIDATION_FAILED
            - ERR_PAYMENT_FAILED
            - ERR_DUPLICATE_MEMBERSHIP_PAYMENT_METHODS
            - ERR_INVALID_MEMBERSHIP_PAYMENT_METHOD
            - ERR_INCOMPATIBLE_MEMBERSHIP
            - ERR_UNSUPPORTED_PAYMENT_METHODS
            - ERR_SESSION_HAS_INVALID_STATE
            - ERR_SESSION_HAS_PASSED
            - ERR_SESSION_SALES_ENDED
            - ERR_SESSION_DROPINS_NOT_ALLOWED
            - ERR_SESSION_IS_FULL
            - ERR_SESSION_PURCHASE_LIMIT_REACHED
            - ERR_SESSION_ACCESS_RESTRICTED
            - ERR_DUPLICATE_ITEM_IDS
            - ERR_DUPLICATE_PAYMENT_METHOD_IDS
            - ERR_UNSUPPORTED_ITEM_TYPE
            - ERR_MISSING_CUSTOMER_DATE_OF_BIRTH
            - ERR_CUSTOMER_IS_NOT_ELIGIBLE_DUE_TO_AGE_RESTRICTION
        message:
          type: string
      required:
        - type
        - message
    ApiV2MemberSavedPaymentMethodDto:
      type: object
      properties:
        id:
          type: integer
          example: 1
        type:
          type: string
          enum:
            - card
          example: card
          x-enumNames:
            - CARD
        last4:
          type: string
          nullable: true
          description: Last 4 digits
          example: '4242'
        expiresAt:
          type: string
          nullable: true
          description: Expiration date in YYYY-MM-DD format
          example: '2022-12-31'
      required:
        - id
        - type
        - last4
        - expiresAt
    ApiV2MemberSavedPaymentMethodsResponseDto:
      type: object
      properties:
        paymentMethods:
          type: array
          items:
            $ref: '#/components/schemas/ApiV2MemberSavedPaymentMethodDto'
      required:
        - paymentMethods
    ApiV2MemberManagePaymentMethodsResponseDto:
      type: object
      properties:
        addPaymentMethodPageUrl:
          type: string
          description: URL to redirect for adding a payment method
      required:
        - addPaymentMethodPageUrl
    ApiV2MemberManagePaymentMethodsRequestDto:
      type: object
      properties:
        redirectUrl:
          type: string
          description: URL to redirect after the add operation is completed
        redirectUrlOnCancel:
          type: string
          description: Optional URL to redirect on cancel
      required:
        - redirectUrl
    MemberDeleteSavedPaymentMethodErrorResponseDto:
      type: object
      properties:
        type:
          enum:
            - err-active-non-cancellable-subscription
            - err-no-payment-method-found
          type: string
          x-enumNames:
            - ERR_ACTIVE_NON_CANCELLABLE_SUBSCRIPTION
            - ERR_NO_PAYMENT_METHOD_FOUND
        message:
          type: string
      required:
        - type
        - message
    ApiV2MemberAddressDto:
      type: object
      properties:
        id:
          type: integer
          example: 1
        address:
          type: string
          example: 153 Hunters Drive
        zipcode:
          type: string
          example: '8513'
        city:
          type: string
          example: New York
        country:
          type: string
          example: US
        createdAt:
          type: string
          example: '2021-09-22T00:00:00.000Z'
          format: date-time
      required:
        - id
        - address
        - zipcode
        - city
        - country
        - createdAt
    ApiV2MemberAddressRequestDto:
      type: object
      properties:
        address:
          type: string
          example: 153 Hunters Drive
          maxLength: 2048
        zipcode:
          type: string
          example: '8513'
          maxLength: 255
        city:
          type: string
          example: New York
          maxLength: 255
        country:
          type: string
          example: US
          maxLength: 255
      required:
        - address
        - zipcode
        - city
        - country
    HostMemberCustomerFieldDto:
      type: object
      properties:
        id:
          type: integer
          description: ID of the customer field
          example: 5
        label:
          type: string
          description: label of the customer field
          example: Date of Birth
        type:
          enum:
            - text
            - number
            - date
            - date-time
            - dropdown
            - boolean
            - date-of-birth
          type: string
          description: type of the customer field
          example: date-of-birth
          x-enumNames:
            - Text
            - Number
            - Date
            - DateTime
            - Dropdown
            - Boolean
            - DateOfBirth
        value:
          type: string
          description: value set for the member for this customer field
          example: '1990-01-01'
      required:
        - id
        - label
        - type
        - value
    HostMemberDto:
      type: object
      properties:
        id:
          type: integer
          example: 5
        firstName:
          type: string
          example: John
        lastName:
          type: string
          example: Doe
        email:
          type: string
          example: john.doe@mail.example.com
        phoneNumber:
          type: string
          nullable: true
          example: '1234567890'
        pictureUrl:
          type: string
          nullable: true
          example: https://example.com/picture.jpg
        firstSeen:
          type: string
          example: '2021-01-01T00:00:00Z'
          format: date-time
        lastSeen:
          type: string
          example: '2021-01-01T00:00:00Z'
          format: date-time
        visits:
          $ref: '#/components/schemas/MemberVisitsDto'
        customerFields:
          type: array
          items:
            $ref: '#/components/schemas/HostMemberCustomerFieldDto'
        customerTags:
          type: array
          items:
            $ref: '#/components/schemas/HostTagDto'
      required:
        - id
        - firstName
        - lastName
        - email
        - phoneNumber
        - pictureUrl
        - firstSeen
        - lastSeen
        - visits
        - customerFields
        - customerTags
    ApiV2HostMemberCreateResponseDto:
      type: object
      properties:
        memberId:
          type: integer
      required:
        - memberId
    ApiV2HostMemberCreateRequestDto:
      type: object
      properties:
        email:
          type: string
          minLength: 1
          maxLength: 100
        firstName:
          type: string
          minLength: 1
          maxLength: 100
        lastName:
          type: string
          minLength: 1
          maxLength: 100
        phoneNumber:
          type: string
        homeLocationId:
          type: integer
      required:
        - email
        - firstName
        - lastName
    HostMemberUpdateNameRequestDto:
      type: object
      properties:
        firstName:
          type: string
          minLength: 1
          maxLength: 100
        lastName:
          type: string
          minLength: 1
          maxLength: 100
      required:
        - firstName
        - lastName
    HostMemberUpdatePhoneNumberRequestDto:
      type: object
      properties:
        phoneNumber:
          type: string
      required:
        - phoneNumber
    HostMemberUpdateEmailRequestDto:
      type: object
      properties:
        email:
          type: string
      required:
        - email
    HostMemberSessionBookingDto:
      type: object
      properties:
        id:
          type: integer
        createdAt:
          type: string
          format: date-time
        roomSpotId:
          type: integer
          nullable: true
        checkedIn:
          type: boolean
        cancelledAt:
          type: string
          nullable: true
          format: date-time
        session:
          $ref: '#/components/schemas/MemberSessionBookingSessionDto'
      required:
        - id
        - createdAt
        - roomSpotId
        - checkedIn
        - cancelledAt
        - session
    ApiV2AppointmentReservationBoardDto:
      type: object
      properties:
        id:
          type: integer
          example: 1
        name:
          type: string
          example: Yoga Private Appointments
      required:
        - id
        - name
    ApiV2AppointmentReservationServiceDto:
      type: object
      properties:
        id:
          type: integer
          example: 1
        name:
          type: string
          example: Couple Massage
      required:
        - id
        - name
    ApiV2HostAppointmentReservationAttendeeDto:
      type: object
      properties:
        attendanceStatus:
          enum: &ref_30
            - checkedIn
            - cancelled
            - booked
          type: string
          example: checkedIn
          x-enumNames: &ref_31
            - CHECKED_IN
            - CANCELLED
            - BOOKED
        bookedAt:
          type: string
        isPaid:
          type: boolean
        isDepositPaid:
          type: boolean
        checkedInAt:
          type: string
          nullable: true
        isLateCancelled:
          type: boolean
        cancelledAt:
          type: string
          nullable: true
        id:
          type: integer
        memberId:
          type: integer
        firstName:
          type: string
          nullable: true
        lastName:
          type: string
          nullable: true
      required:
        - attendanceStatus
        - bookedAt
        - isPaid
        - isDepositPaid
        - checkedInAt
        - isLateCancelled
        - cancelledAt
        - id
        - memberId
        - firstName
        - lastName
    ApiV2HostAppointmentReservationDto:
      type: object
      properties:
        id:
          type: integer
        createdAt:
          type: string
        cancelledAt:
          type: string
          nullable: true
        startsAt:
          type: string
        endsAt:
          type: string
        durationInMinutes:
          type: number
        priceInCurrency:
          type: number
        depositInCurrency:
          type: string
          nullable: true
        isDepositPaid:
          type: boolean
        currency:
          type: string
        isPaid:
          type: boolean
        capacity:
          type: integer
          nullable: true
          example: 10
          minimum: 1
        board:
          $ref: '#/components/schemas/ApiV2AppointmentReservationBoardDto'
        service:
          $ref: '#/components/schemas/ApiV2AppointmentReservationServiceDto'
        teacher:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/MemberTeacherDto'
        additionalTeacher:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/MemberTeacherDto'
        isInPerson:
          type: boolean
          example: false
        inPersonLocation:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/MemberLocationDto'
        onlineStreamUrl:
          type: string
          nullable: true
          example: https://example.com/online-stream
        onlineStreamPassword:
          type: string
          nullable: true
          example: password123
        appointmentAttendees:
          type: array
          items:
            $ref: '#/components/schemas/ApiV2HostAppointmentReservationAttendeeDto'
      required:
        - id
        - createdAt
        - cancelledAt
        - startsAt
        - endsAt
        - durationInMinutes
        - priceInCurrency
        - depositInCurrency
        - isDepositPaid
        - currency
        - isPaid
        - capacity
        - board
        - service
        - teacher
        - additionalTeacher
        - isInPerson
        - inPersonLocation
        - onlineStreamUrl
        - onlineStreamPassword
        - appointmentAttendees
    MemberAppointmentMemberDto:
      type: object
      properties:
        attendanceStatus:
          enum: *ref_30
          type: string
          example: checkedIn
          x-enumNames: *ref_31
        bookedAt:
          type: string
        isPaid:
          type: boolean
        isDepositPaid:
          type: boolean
        checkedInAt:
          type: string
          nullable: true
        isLateCancelled:
          type: boolean
        cancelledAt:
          type: string
          nullable: true
        id:
          type: integer
        firstName:
          type: string
          nullable: true
        lastName:
          type: string
          nullable: true
      required:
        - attendanceStatus
        - bookedAt
        - isPaid
        - isDepositPaid
        - checkedInAt
        - isLateCancelled
        - cancelledAt
        - id
        - firstName
        - lastName
    HostMemberAppointmentReservationDto:
      type: object
      properties:
        id:
          type: integer
        createdAt:
          type: string
        cancelledAt:
          type: string
          nullable: true
        startsAt:
          type: string
        endsAt:
          type: string
        durationInMinutes:
          type: number
        priceInCurrency:
          type: number
        depositInCurrency:
          type: string
          nullable: true
        isDepositPaid:
          type: boolean
        currency:
          type: string
        isPaid:
          type: boolean
        capacity:
          type: integer
          nullable: true
          example: 10
          minimum: 1
        board:
          $ref: '#/components/schemas/ApiV2AppointmentReservationBoardDto'
        service:
          $ref: '#/components/schemas/ApiV2AppointmentReservationServiceDto'
        teacher:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/MemberTeacherDto'
        additionalTeacher:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/MemberTeacherDto'
        isInPerson:
          type: boolean
          example: false
        inPersonLocation:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/MemberLocationDto'
        onlineStreamUrl:
          type: string
          nullable: true
          example: https://example.com/online-stream
        onlineStreamPassword:
          type: string
          nullable: true
          example: password123
        member:
          $ref: '#/components/schemas/MemberAppointmentMemberDto'
      required:
        - id
        - createdAt
        - cancelledAt
        - startsAt
        - endsAt
        - durationInMinutes
        - priceInCurrency
        - depositInCurrency
        - isDepositPaid
        - currency
        - isPaid
        - capacity
        - board
        - service
        - teacher
        - additionalTeacher
        - isInPerson
        - inPersonLocation
        - onlineStreamUrl
        - onlineStreamPassword
        - member
    HostMemberNoteDto:
      type: object
      properties:
        id:
          type: integer
          example: 5
        createdAt:
          type: string
          example: '2021-01-01T00:00:00Z'
          format: date-time
        modifiedAt:
          type: string
          example: '2021-01-01T00:00:00Z'
          format: date-time
        type:
          enum:
            - regular
            - soap
          type: string
          example: regular
          x-enumNames:
            - REGULAR
            - SOAP
        note:
          type: string
          description: note contents, can contain HTML
          example: Note contents, <b>can contain HTML</b>
        imageLink:
          type: string
          nullable: true
        customerNoteTemplateId:
          type: integer
          nullable: true
          example: 4
        sessionBookingId:
          type: integer
          nullable: true
          example: 2
        appointmentReservationId:
          type: integer
          nullable: true
          example: 1
        productOrderId:
          type: integer
          nullable: true
          example: 5
        boughtMembershipId:
          type: integer
          nullable: true
          example: 8
        paymentTransactionId:
          type: integer
          nullable: true
          example: 9
        lockedAt:
          type: string
          nullable: true
          example: '2021-01-01T00:00:00Z'
          format: date-time
        lockedByUserId:
          type: integer
          nullable: true
          example: 3
      required:
        - id
        - createdAt
        - modifiedAt
        - type
        - note
        - imageLink
        - customerNoteTemplateId
        - sessionBookingId
        - appointmentReservationId
        - productOrderId
        - boughtMembershipId
        - paymentTransactionId
        - lockedAt
        - lockedByUserId
    HostSaleMemberDto:
      type: object
      properties:
        id:
          type: integer
          example: 1
        firstName:
          type: string
          example: John
        lastName:
          type: string
          example: Doe
      required:
        - id
        - firstName
        - lastName
    HostSaleSessionDto:
      type: object
      properties:
        id:
          type: integer
          example: 1
        name:
          type: string
          example: Monday Morning Yoga
        startsAt:
          type: string
          example: '2021-01-01T00:00:00Z'
          format: date-time
        endsAt:
          type: string
          example: '2021-01-01T01:00:00Z'
          format: date-time
      required:
        - id
        - name
        - startsAt
        - endsAt
    HostSaleAppointmentDto:
      type: object
      properties:
        id:
          type: integer
          example: 3
        name:
          type: string
          example: Stretching with John
      required:
        - id
        - name
    HostSaleProductDto:
      type: object
      properties:
        id:
          type: integer
          example: 3
        name:
          type: string
          example: T-Shirt
      required:
        - id
        - name
    HostSaleProductVariantDto:
      type: object
      properties:
        id:
          type: integer
          example: 3
        name:
          type: string
          example: M
      required:
        - id
        - name
    HostSaleOpenAreaDto:
      type: object
      properties:
        id:
          type: integer
          example: 3
        name:
          type: string
          example: Gym A
      required:
        - id
        - name
    HostSaleItemDto:
      type: object
      properties:
        id:
          type: integer
          example: 1
        saleItemId:
          type: integer
          example: 1
        itemType:
          enum:
            - membership
            - session
            - appointment
            - product
            - video
            - course
            - gift-card
            - monthly-subscription
            - custom-member-payment-plan-installment
            - money-credit
            - event-credit
            - auto-attendance-penalty
            - stripe-refund
            - refund
            - tips
            - appointment-deposit
            - tuition-installment
            - tuition-registration-fee
            - appointment-addon
            - open-area-visit
          type: string
          example: membership
          x-enumNames:
            - MEMBERSHIP
            - SESSION
            - APPOINTMENT
            - PRODUCT
            - VIDEO
            - COURSE
            - GIFT_CARD
            - MONTHLY_SUBSCRIPTION
            - CUSTOM_MEMBER_PAYMENT_PLAN_INSTALLMENT
            - MONEY_CREDIT
            - EVENT_CREDIT
            - AUTO_ATTENDANCE_PENALTY
            - STRIPE_REFUND
            - REFUND
            - TIPS
            - APPOINTMENT_DEPOSIT
            - TUITION_INSTALLMENT
            - TUITION_REGISTRATION_FEE
            - APPOINTMENT_ADDON
            - OPEN_AREA_VISIT
        itemName:
          type: string
          example: Monthly Membership for Johns
        descriptiveItemName:
          type: string
          example: Monthly Membership for Johns
        payingMember:
          $ref: '#/components/schemas/HostSaleMemberDto'
        targetMember:
          $ref: '#/components/schemas/HostSaleMemberDto'
        session:
          $ref: '#/components/schemas/HostSaleSessionDto'
        appointment:
          $ref: '#/components/schemas/HostSaleAppointmentDto'
        product:
          $ref: '#/components/schemas/HostSaleProductDto'
        productVariant:
          $ref: '#/components/schemas/HostSaleProductVariantDto'
        openArea:
          $ref: '#/components/schemas/HostSaleOpenAreaDto'
        quantity:
          type: number
          example: 1
        unitPriceExcludingTaxInCurrency:
          type: string
          example: '9.99'
        unitTaxAmountInCurrency:
          type: string
          example: '0.43'
      required:
        - id
        - saleItemId
        - itemType
        - itemName
        - descriptiveItemName
        - payingMember
        - targetMember
        - quantity
        - unitPriceExcludingTaxInCurrency
        - unitTaxAmountInCurrency
    HostSalePaymentTransactionItemDto:
      type: object
      properties:
        id:
          type: integer
        paymentMethodType:
          enum:
            - stripe
            - stripe-becs
            - stripe-nz-becs
            - stripe-ideal
            - stripe-ideal-sepa-direct-debit
            - stripe-bancontact
            - stripe-bancontact-sepa-direct-debit
            - stripe-sepa-direct-debit
            - stripe-ach-direct-debit
            - stripe-acss-debit
            - stripe-bacs-direct-debit
            - stripe-refund
            - membership
            - cash
            - free
            - imported
            - custom
            - scheduled-stripe
            - paypal
            - xendit
            - classpass
            - gympass
            - gift-card
            - stripe-reader
            - pay-later
            - pay-at-start
            - money-credit-correction
            - money-credit-refund
            - event-credit-correction
            - event-credit-refund
            - tuition
            - urban-sports-club
            - my-clubs
            - referral-reward
            - referral-gift
            - campaign-sequence-action
            - multiple-payment-methods
            - yappy
            - odin-card
            - odin-ach
          type: string
          example: custom
          x-enumNames:
            - STRIPE
            - STRIPE_AU_BECS
            - STRIPE_NZ_BECS
            - STRIPE_IDEAL
            - STRIPE_IDEAL_SEPA_DIRECT_DEBIT
            - STRIPE_BANCONTACT
            - STRIPE_BANCONTACT_SEPA_DIRECT_DEBIT
            - STRIPE_SEPA_DIRECT_DEBIT
            - STRIPE_ACH_DIRECT_DEBIT
            - STRIPE_ACSS_DEBIT
            - STRIPE_BACS_DIRECT_DEBIT
            - STRIPE_REFUND
            - MEMBERSHIP
            - CASH
            - FREE
            - IMPORTED
            - CUSTOM
            - SCHEDULED_STRIPE
            - PAYPAL
            - XENDIT
            - CLASSPASS
            - GYMPASS
            - GIFT_CARD
            - STRIPE_READER
            - PAY_LATER
            - PAY_AT_START
            - MONEY_CREDIT_CORRECTION
            - MONEY_CREDIT_REFUND
            - EVENT_CREDIT_CORRECTION
            - EVENT_CREDIT_REFUND
            - TUITION
            - URBAN_SPORTS_CLUB
            - MY_CLUBS
            - REFERRAL_REWARD
            - REFERRAL_GIFT
            - CAMPAIGN_SEQUENCE_ACTION
            - MULTIPLE_PAYMENT_METHODS
            - YAPPY
            - ODIN_CARD
            - ODIN_ACH
        paymentMethodName:
          type: string
          description: >-
            Additional name for the payment method used - for CUSTOM, it's
            custom payment method name, for MEMBERSHIP it's the membership name
          example: Custom payment method
        amountInCurrencyWithoutTax:
          type: string
          example: '9.99'
        taxAmountInCurrency:
          type: string
          example: '9.99'
      required:
        - id
        - paymentMethodType
        - amountInCurrencyWithoutTax
        - taxAmountInCurrency
    HostSalePaymentTransactionDto:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/HostSalePaymentTransactionItemDto'
      required:
        - items
    HostSaleDto:
      type: object
      properties:
        id:
          type: integer
          example: 1
        saleDate:
          type: string
          example: '2021-01-01T00:00:00Z'
          format: date-time
        items:
          type: array
          items:
            $ref: '#/components/schemas/HostSaleItemDto'
        paymentTransaction:
          $ref: '#/components/schemas/HostSalePaymentTransactionDto'
      required:
        - id
        - saleDate
        - items
        - paymentTransaction
    SessionTagDto:
      type: object
      properties:
        id:
          type: integer
          example: 1
        name:
          type: string
          example: VIP
        isCustomerBadge:
          type: boolean
          example: false
        badgeLabel:
          type: string
          nullable: true
          example: VIP
        badgeColor:
          type: string
          nullable: true
          example: '#fe0000'
      required:
        - id
        - name
        - isCustomerBadge
        - badgeLabel
        - badgeColor
    HostSessionDto:
      type: object
      properties:
        id:
          type: integer
          example: 1
        name:
          type: string
          example: Stretching with John
        type:
          enum:
            - private
            - special-event
            - special-event-new
            - retreat
            - fitness
            - course
            - course-class
            - semester
            - recital
          type: string
          example: fitness
          x-enumNames:
            - PRIVATE
            - SPECIAL_EVENT
            - SPECIAL_EVENT_NEW
            - RETREAT
            - FITNESS
            - COURSE
            - COURSE_CLASS
            - SEMESTER
            - RECITAL
        description:
          type: string
          nullable: true
          example: >-
            Our program is designed to help you increase your flexibility and
            strength.
        startsAt:
          type: string
          example: '2021-08-01T10:00:00Z'
          format: date-time
        endsAt:
          type: string
          example: '2021-08-01T11:00:00Z'
          format: date-time
        durationInMinutes:
          type: integer
          example: 60
          minimum: 0
        capacity:
          type: integer
          nullable: true
          example: 10
          minimum: 0
        bookingCount:
          type: integer
          example: 10
          minimum: 0
        teacher:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/MemberTeacherDto'
        isRecurring:
          type: boolean
          example: false
        isCancelled:
          type: boolean
          example: false
        isInPerson:
          type: boolean
          example: false
        isDraft:
          type: boolean
          example: false
        inPersonLocation:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/MemberLocationDto'
        onlineStreamUrl:
          type: string
          nullable: true
          example: https://example.com/online-stream
        onlineStreamPassword:
          type: string
          nullable: true
          example: password123
        bannerImageUrl:
          type: string
          nullable: true
          example: https://example.com/banner.jpg
        hostPhotoUrl:
          type: string
          nullable: true
          example: https://example.com/host.jpg
        tags:
          type: array
          items:
            $ref: '#/components/schemas/SessionTagDto'
      required:
        - id
        - name
        - type
        - description
        - startsAt
        - endsAt
        - durationInMinutes
        - capacity
        - bookingCount
        - teacher
        - isRecurring
        - isCancelled
        - isInPerson
        - isDraft
        - inPersonLocation
        - onlineStreamUrl
        - onlineStreamPassword
        - bannerImageUrl
        - hostPhotoUrl
    HostTeacherDto:
      type: object
      properties:
        id:
          type: integer
          example: 1
        firstName:
          type: string
          example: John
        lastName:
          type: string
          example: Doe
        pictureUrl:
          type: string
          nullable: true
          example: https://example.com/picture.jpg
        email:
          type: string
          nullable: true
          example: johndoe@teacher.com
      required:
        - id
        - firstName
        - lastName
        - pictureUrl
        - email
    HostSessionDetailDto:
      type: object
      properties:
        id:
          type: integer
          example: 1
        name:
          type: string
          example: Monday Morning Yoga
        startsAt:
          type: string
          example: '2021-01-01T00:00:00Z'
          format: date-time
        endsAt:
          type: string
          example: '2021-01-01T01:00:00Z'
          format: date-time
        capacity:
          type: integer
          nullable: true
          example: 20
        bookingCount:
          type: integer
          nullable: true
          example: 12
        waitlistCapacity:
          type: integer
          nullable: true
          example: 20
        waitlistBookingCount:
          type: integer
          nullable: true
          example: 20
        teacher:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/HostTeacherDto'
        originalTeacher:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/HostTeacherDto'
        additionalTeachers:
          nullable: true
          type: array
          items:
            $ref: '#/components/schemas/HostTeacherDto'
        isRecurring:
          type: boolean
          example: false
        isCancelled:
          type: boolean
          example: false
        isInPerson:
          type: boolean
          example: false
        isDraft:
          type: boolean
          example: false
        inPersonLocation:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/MemberLocationDto'
        zoomLink:
          type: string
          nullable: true
          example: https://zoom.us/j/1234567890
        zoomMeetingId:
          type: string
          nullable: true
          example: '1234567890'
        zoomMeetingPassword:
          type: string
          nullable: true
          example: '065809'
        onlineStreamUrl:
          type: string
          nullable: true
          example: https://example.com/online-stream
        onlineStreamPassword:
          type: string
          nullable: true
          example: password123
        tags:
          type: array
          items:
            $ref: '#/components/schemas/SessionTagDto'
      required:
        - id
        - name
        - startsAt
        - endsAt
        - capacity
        - bookingCount
        - waitlistCapacity
        - waitlistBookingCount
        - teacher
        - originalTeacher
        - additionalTeachers
        - isRecurring
        - isCancelled
        - isInPerson
        - isDraft
        - inPersonLocation
        - zoomLink
        - zoomMeetingId
        - zoomMeetingPassword
        - onlineStreamUrl
        - onlineStreamPassword
    HostSessionBookingDto:
      type: object
      properties:
        id:
          type: integer
        member:
          $ref: '#/components/schemas/MemberInfoDto'
        roomSpotId:
          type: integer
          nullable: true
        checkedIn:
          type: boolean
        ticketsBought:
          type: integer
        createdAt:
          type: string
          format: date-time
        isRecurring:
          type: boolean
          example: false
        recurringBookingId:
          type: integer
          nullable: true
        cancelledAt:
          type: string
          nullable: true
          format: date-time
      required:
        - id
        - member
        - roomSpotId
        - checkedIn
        - ticketsBought
        - createdAt
        - isRecurring
        - recurringBookingId
        - cancelledAt
    HostFreeSessionBookingResponseDto:
      type: object
      properties:
        sessionBookingId:
          type: integer
          example: 1
      required:
        - sessionBookingId
    HostFreeSessionBookingRequestDto:
      type: object
      properties:
        memberId:
          type: integer
          example: 1
      required:
        - memberId
    HostFreeSessionBookingErrorResponseDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - err-member-not-found
            - err-member-not-assigned-to-host
            - err-session-not-found
            - err-session-not-provided-by-host
            - err-customer-age-prevents-from-action
            - err-missing-customer-date-of-birth
            - err-missing-date-of-birth-setting
            - err-invalid-date-of-birth-value
          x-enumNames:
            - ERR_MEMBER_NOT_FOUND
            - ERR_MEMBER_NOT_ASSIGNED_TO_HOST
            - ERR_SESSION_NOT_FOUND
            - ERR_SESSION_NOT_PROVIDED_BY_HOST
            - ERR_CUSTOMER_AGE_PREVENTS_FROM_ACTION
            - ERR_MISSING_CUSTOMER_DATE_OF_BIRTH
            - ERR_MISSING_DATE_OF_BIRTH_SETTINGS
            - ERR_INVALID_DATE_OF_BIRTH_VALUE
        message:
          type: string
      required:
        - type
        - message
    HostSessionWaitlistBookingResponseDto:
      type: object
      properties:
        waitlistBookingId:
          type: integer
          example: 1
      required:
        - waitlistBookingId
    HostSessionWaitlistBookingRequestDto:
      type: object
      properties:
        memberId:
          type: integer
          example: 1
        useBoughtMembershipIds:
          example:
            - 2
          type: array
          items:
            type: integer
      required:
        - memberId
    HostSessionWaitlistBookingErrorResponseDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - err-member-not-found
            - err-member-not-assigned-to-host
            - err-session-not-found
            - err-session-not-provided-by-host
            - err-waitlist-not-allowed
            - err-waitlist-full
            - err-member-already-on-waitlist
            - err-customer-age-prevents-from-action
            - err-missing-customer-date-of-birth
            - err-missing-date-of-birth-setting
            - err-invalid-date-of-birth-value
          x-enumNames:
            - ERR_MEMBER_NOT_FOUND
            - ERR_MEMBER_NOT_ASSIGNED_TO_HOST
            - ERR_SESSION_NOT_FOUND
            - ERR_SESSION_NOT_PROVIDED_BY_HOST
            - ERR_WAITLIST_NOT_ALLOWED
            - ERR_WAITLIST_FULL
            - ERR_MEMBER_ALREADY_ON_WAITLIST
            - ERR_CUSTOMER_AGE_PREVENTS_FROM_ACTION
            - ERR_MISSING_CUSTOMER_DATE_OF_BIRTH
            - ERR_MISSING_DATE_OF_BIRTH_SETTINGS
            - ERR_INVALID_DATE_OF_BIRTH_VALUE
        message:
          type: string
      required:
        - type
        - message
    HostSessionBookingCancelRequestDto:
      type: object
      properties:
        refund:
          type: boolean
        disableNotifications:
          type: boolean
        isLateCancellation:
          type: boolean
      required:
        - refund
        - disableNotifications
        - isLateCancellation
    HostSessionRecurringBookingCancelRequestDto:
      type: object
      properties:
        afterSessionId:
          type: integer
          example: 123456
    ApiV2HostMembershipDto:
      type: object
      properties:
        id:
          type: integer
          example: 5
        name:
          type: string
          example: Monthly Membership
        description:
          type: string
          nullable: true
          example: Monthly membership with unlimited access to <b>all</b> classes.
        type:
          enum: *ref_17
          type: string
          example: subscription
          x-enumNames: *ref_18
        locationId:
          type: integer
          nullable: true
          example: null
        disabled:
          type: boolean
          description: Indicates that the membership was disabled and shouldn't be shown
          example: false
        autoRenewing:
          type: boolean
          description: Indicates that membership renews after specific interval
          example: true
        minimumAutoRenews:
          type: integer
          nullable: true
          description: >-
            How many times membership has to renew before user can cancel
            renewal
          example: null
        eventCredits:
          type: integer
          nullable: true
          description: >-
            For PACKAGE_EVENTS memberships, defines how many event credits are
            included
          example: null
        moneyCredits:
          type: number
          nullable: true
          description: For PACKAGE_MONEY memberships, defines how much money is included
          example: null
        duration:
          type: integer
          nullable: true
          description: >-
            For SUBSCRIPTION this is auto renew duration, for PACKAGE_* this is
            expiration time
          example: 1
        durationUnit:
          nullable: true
          type: string
          example: months
          enum: *ref_19
          x-enumNames: *ref_20
        isActivatedOnFirstUse:
          type: boolean
          description: >-
            If set to false, membership is activated upon purchase. When set to
            true, membership is activated at the moment of the first purchase.
            When the purchase is for booking in the future, the activation date
            is set to the booking date.
          example: false
        hasFreeTrial:
          type: boolean
          example: false
        freeTrialDurationInDays:
          type: integer
          example: 7
        contractAgreement:
          type: string
          nullable: true
          example: Contract agreement text
        order:
          type: integer
          example: 1
        isIntroOffer:
          type: boolean
          example: false
        usageLimitForSessions:
          type: number
          nullable: true
          description: >-
            Only applicable for SUBSCRIPTION. Maximum number of sessions
            customer can book with this membership during one renewal period,
            not used when combinedUsageLimitEnabled=true
          example: 5
        usageLimitForAppointments:
          type: number
          nullable: true
          description: >-
            Only applicable for SUBSCRIPTION. Maximum number of appointments
            customer can book with this membership during one renewal period,
            not used when combinedUsageLimitEnabled=true
          example: 2
        combinedUsageLimitEnabled:
          type: boolean
          description: >-
            Only applicable for SUBSCRIPTION. The usage limits of the
            memberships are applied to sum of both bookings and appointments.
          example: false
        combinedUsageLimit:
          type: number
          nullable: true
          description: >-
            Only applicable for SUBSCRIPTION. Combined maximum number of
            bookings and appointments customer can book with this membership
            during one renewal period, only used when
            combinedUsageLimitEnabled=true
          example: null
        usageLimitRenewalEnabled:
          type: boolean
          description: >-
            Only applicable for SUBSCRIPTION. Calculate usage limits differently
            to renewal duration.
          example: false
        usageLimitRenewalDuration:
          type: number
          nullable: true
          description: >-
            Only applicable for SUBSCRIPTION. Interval for which the usage
            limits are calculated, only used when usageLimitRenewalEnabled=true
          example: null
        usageLimitRenewalDurationUnit:
          nullable: true
          type: string
          description: >-
            Only applicable for SUBSCRIPTION. Interval for which the usage
            limits are calculated, only used when usageLimitRenewalEnabled=true
          example: null
          enum: *ref_21
          x-enumNames: *ref_22
        usageLimitRolloverEnabled:
          type: boolean
          description: >-
            Only applicable for SUBSCRIPTION. When true and customer doesn't use
            reach their usage limits, the rest is transferred to the customer
            according to usageLimitRolloverMode
          example: false
        usageLimitRolloverMode:
          nullable: true
          type: string
          description: >-
            Only applicable for SUBSCRIPTION. How should extra usage limits be
            transferred to customer, either as package or as addition to next
            renewal period. Only used when usageLimitRolloverEnabled=true
          example: null
          enum: *ref_23
          x-enumNames: *ref_24
        usageLimitRolloverExpirationDuration:
          type: number
          nullable: true
          description: >-
            Only applicable for SUBSCRIPTION. When should the extra limits /
            package expire after rolling over. Only used when
            usageLimitRolloverEnabled=true
          example: null
        usageLimitRolloverExpirationDurationUnit:
          nullable: true
          type: string
          description: >-
            Only applicable for SUBSCRIPTION. When should the extra limits /
            package expire after rolling over. Only used when
            usageLimitRolloverEnabled=true
          example: null
          enum: *ref_25
          x-enumNames: *ref_26
        startDate:
          type: string
          nullable: true
          description: Explicit start date for memberships that have specific duration
          example: '2022-01-01T00:00:00Z'
          format: date-time
        endDate:
          type: string
          nullable: true
          description: Explicit end date for memberships that have specific duration
          example: '2022-02-01T00:00:00Z'
          format: date-time
        featured:
          type: boolean
          description: Indicates that membership should be featured on checkout
          example: false
        priceType:
          enum:
            - fixed-price
            - dynamic
          type: string
          example: fixed-price
          x-enumNames:
            - FIXED
            - DYNAMIC
        price:
          type: number
          nullable: true
          description: In cents, membership price for FIXED priceType
          example: 955
        minimumPrice:
          type: integer
          nullable: true
          description: In cents, minimum membership price for DYNAMIC priceType
          example: null
        maximumPrice:
          type: integer
          nullable: true
          description: In cents, maximum membership price for DYNAMIC priceType
          example: null
        recommendedPrice:
          type: integer
          nullable: true
          description: In cents, recommended membership price for DYNAMIC priceType
          example: null
        priceIncludesTax:
          type: boolean
          description: Indicates if tax is already included in the price
          example: true
        taxRateInPercent:
          type: number
          nullable: true
          description: Tax rate in percents
          example: 20
        freeTrialPrice:
          type: integer
          description: in cents
          example: 199
        tags:
          type: array
          items:
            $ref: '#/components/schemas/HostTagDto'
      required:
        - id
        - name
        - description
        - type
        - locationId
        - disabled
        - autoRenewing
        - minimumAutoRenews
        - eventCredits
        - moneyCredits
        - duration
        - durationUnit
        - isActivatedOnFirstUse
        - hasFreeTrial
        - freeTrialDurationInDays
        - contractAgreement
        - order
        - isIntroOffer
        - usageLimitForSessions
        - usageLimitForAppointments
        - combinedUsageLimitEnabled
        - combinedUsageLimit
        - usageLimitRenewalEnabled
        - usageLimitRenewalDuration
        - usageLimitRenewalDurationUnit
        - usageLimitRolloverEnabled
        - usageLimitRolloverMode
        - usageLimitRolloverExpirationDuration
        - usageLimitRolloverExpirationDurationUnit
        - startDate
        - endDate
        - featured
        - priceType
        - price
        - minimumPrice
        - maximumPrice
        - recommendedPrice
        - priceIncludesTax
        - taxRateInPercent
        - freeTrialPrice
        - tags
    ApiV2HostBoughtMembershipsDto:
      type: object
      properties:
        id:
          type: integer
          example: 1
        type:
          enum:
            - subscription
            - on-demand-subscription
            - package-events
            - package-money
            - patron
          type: string
          example: subscription
          x-enumNames:
            - Subscription
            - OnDemandSubscription
            - PackageEvents
            - PackageMoney
            - Patron
        startDate:
          type: string
          nullable: true
          description: start date of the bought membership
          example: '2021-01-01T00:00:00Z'
          format: date-time
        endDate:
          type: string
          nullable: true
          description: expiration date of the bought membership
          example: '2021-02-01T00:00:00Z'
          format: date-time
        eventCreditsLeft:
          type: number
          nullable: true
          description: number of event credits left, valid for PACKAGE_EVENTS
          example: null
        eventCreditsTotal:
          type: number
          nullable: true
          description: >-
            number of event credits originally included in the package, valid
            for PACKAGE_EVENTS
          example: null
        moneyCreditsLeft:
          type: number
          nullable: true
          description: number of money credits left, valid for PACKAGE_MONEY
          example: null
        moneyCreditsTotal:
          type: number
          nullable: true
          description: >-
            number of money credits originally included in the package, valid
            for PACKAGE_MONEY
          example: null
        usageLimitForSessions:
          type: number
          nullable: true
          description: >-
            Non-null value indicates the membership has limit to number of
            session bookings, only valid for SUBSCRIPTION
          example: 5
        usageLimitForAppointments:
          type: number
          nullable: true
          description: >-
            Non-null value indicates the membership has limit to number of
            appointments booked, only valid for SUBSCRIPTION
          example: 3
        combinedUsageLimit:
          type: number
          nullable: true
          description: >-
            Non-null value indicates the membership has combined limits for
            session and appointment bookings, only valid for SUBSCRIPTION
          example: null
        usedSessions:
          type: number
          nullable: true
          description: only valid for SUBSCRIPTION with session-only usage limits
          example: 1
        usedAppointments:
          type: number
          nullable: true
          description: only valid for SUBSCRIPTION with appointment-only usage limits
          example: 2
        combinedUsage:
          type: number
          nullable: true
          description: only valid for SUBSCRIPTION with combined usage limits
          example: null
        usageLimitStartDate:
          type: string
          nullable: true
          description: >-
            date range for which the current usage is calculated for, only valid
            for SUBSCRIPTION with usage limits
          example: null
          format: date-time
        usageLimitEndDate:
          type: string
          nullable: true
          description: >-
            date range for which the current usage is calculated for, only valid
            for SUBSCRIPTION with usage limits
          example: null
          format: date-time
        membership:
          nullable: true
          description: >-
            info about origin membership, it's possible the bought membership
            has no origin membership
          allOf:
            - $ref: '#/components/schemas/HostMembershipBasicDto'
      required:
        - id
        - type
        - startDate
        - endDate
        - eventCreditsLeft
        - eventCreditsTotal
        - moneyCreditsLeft
        - moneyCreditsTotal
        - usageLimitForSessions
        - usageLimitForAppointments
        - combinedUsageLimit
        - usedSessions
        - usedAppointments
        - combinedUsage
        - usageLimitStartDate
        - usageLimitEndDate
        - membership
    AuthTokenPasswordRequestDto:
      type: object
      properties:
        grant_type:
          type: string
          enum:
            - password
        username:
          type: string
        password:
          type: string
      required:
        - grant_type
        - username
        - password
    AuthTokenRefreshTokenRequestDto:
      type: object
      properties:
        grant_type:
          type: string
          enum:
            - refresh_token
        refresh_token:
          type: string
      required:
        - grant_type
        - refresh_token
    AuthTokenAuthorizationCodeRequestDto:
      type: object
      properties:
        grant_type:
          type: string
          enum:
            - authorization_code
        code:
          type: string
        redirect_uri:
          type: string
      required:
        - grant_type
        - code
        - redirect_uri
    AuthTokenDto:
      type: object
      properties:
        accessToken:
          type: string
        access_token:
          type: string
        accessTokenExpiresAt:
          type: string
          format: date-time
        refreshToken:
          type: string
        refresh_token:
          type: string
        refreshTokenExpiresAt:
          type: string
          format: date-time
      required:
        - accessToken
        - access_token
        - accessTokenExpiresAt
        - refreshToken
        - refresh_token
        - refreshTokenExpiresAt
    AuthProfileDto:
      type: object
      properties:
        userId:
          type: integer
          example: 1
        memberId:
          type: integer
          nullable: true
          example: 1
        email:
          type: string
          example: john.doe@example.com
        firstName:
          type: string
          example: John
        lastName:
          type: string
          example: Doe
      required:
        - userId
        - memberId
        - email
        - firstName
        - lastName
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /api/v2/auth/token
        authorizationCode:
          authorizationUrl: /api/v2/auth/authorize
          tokenUrl: /api/v2/auth/token
          scopes: {}
    OAuth2ApiClient:
      type: http
      scheme: basic
      description: Use your `client_id` as username and `client_secret` as password
security:
  - OAuth2: []
    OAuth2ApiClient: []
