Momence Host Checkout & Sales API

Staff-side commerce and reporting - resolve compatible memberships and prices for a cart, perform checkout on behalf of a member (buy a session with a subscription or a saved payment method, or buy a membership), list sales, manage appointment reservations, and run and retrieve host reports.

OpenAPI Specification

momence-openapi.yml Raw ↑
openapi: 3.0.0
paths:
  /api/v2/auth/authorize:
    get:
      operationId: ApiV2AuthController_authorize
      summary: OAuth2 authorize
      parameters:
        - name: client_id
          required: false
          in: query
          schema:
            type: string
        - name: redirect_uri
          required: false
          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
          x-enumNames:
            - LOGIN
            - SIGN_UP
            - NONE
          schema:
            enum:
              - login
              - sign-up
              - none
            type: string
        - name: scope
          required: false
          in: query
          x-enumNames:
            - PUBLIC_API_V2
          schema:
            enum:
              - public-api-v2
            type: string
        - name: response_type
          required: false
          in: query
          x-enumNames:
            - CODE
          schema:
            enum:
              - code
            type: string
        - name: state
          required: false
          in: query
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - 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:
        - auth
      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:
        - auth
  /api/v2/auth/logout:
    post:
      operationId: ApiV2AuthController_logout
      summary: Logout
      description: Invalidate provided access token
      parameters: []
      responses:
        '201':
          description: ''
      tags:
        - auth
  /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
          schema:
            minimum: 0
            example: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          schema:
            minimum: 1
            maximum: 200
            example: 10
            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/checkout/compatible-memberships:
    post:
      operationId: ApiV2HostCheckoutController_postCompatibleMemberships
      summary: Get compatible memberships for checkout cart
      description: >
        This endpoint will return list of bought memberships of the specified
        member potentially compatible with the given 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/HostCheckoutCompatibleMembershipsRequestDto'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/HostCheckoutCompatibleMembershipsResponseDto
          description: ''
      tags:
        - host-checkout
      security:
        - OAuth2: []
  /api/v2/host/checkout/prices:
    post:
      operationId: ApiV2HostCheckoutController_postPrices
      summary: Get prices for checkout
      description: >-
        This endpoint should be used before calling checkout to fetch correct
        prices for every item.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HostCheckoutPricesRequestDto'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostCheckoutPricesResponseDto'
          description: ''
      tags:
        - host-checkout
      security:
        - OAuth2: []
  /api/v2/host/checkout:
    post:
      operationId: ApiV2HostCheckoutController_post
      summary: Perform checkout
      description: >
        Perform payment for specified items in the checkout cart on behalf of
        the specified member. The endpoint will return list of purchased items.
        The checkout endpoint will reject any request that doesn't contain
        correct prices even when you're using memberships to pay.


        **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 |

        | err-invalid-custom-payment-method | request contains invalid custom
        payment method id |
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HostCheckoutRequestDto'
            examples:
              buySessionUsingSubscription:
                summary: Buy session using subscription
                value:
                  memberId: 12345
                  items:
                    - id: '1'
                      type: session
                      sessionId: 15525
                      attemptedPriceInCurrency: '10.5'
                  paymentMethods:
                    - id: '1'
                      type: membership
                      boughtMembershipId: 25568
              buySessionUsingSavedPaymentMethod:
                summary: Buy session using member's saved payment method
                value:
                  memberId: 12345
                  items:
                    - id: '1'
                      type: session
                      sessionId: 15525
                      attemptedPriceInCurrency: '10.5'
                  paymentMethods:
                    - id: '1'
                      type: saved_payment_method
                      savedPaymentMethodId: 5155
              buyMembershipUsingSavedPaymentMethod:
                summary: Buy membership using member's saved payment method
                value:
                  memberId: 12345
                  items:
                    - id: '1'
                      type: subscription
                      membershipId: 789
                      attemptedPriceInCurrency: '49.99'
                  paymentMethods:
                    - id: '1'
                      type: saved_payment_method
                      savedPaymentMethodId: 5155
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostCheckoutResponseDto'
          description: ''
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostCheckoutErrorResponseDto'
      tags:
        - host-checkout
      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
          schema:
            minimum: 0
            example: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          schema:
            minimum: 1
            maximum: 200
            example: 10
            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}/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
          schema:
            minimum: 0
            example: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          schema:
            minimum: 1
            maximum: 200
            example: 10
            type: integer
        - name: includeFrozen
          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/ApiV2HostBoughtMembershipsDto'
          description: ''
      tags:
        - host
      security:
        - OAuth2: []
  /api/v2/host/members/{memberId}/bought-memberships/{boughtMembershipId}/credits:
    put:
      operationId: ApiV2HostMembersBoughtMembershipsController_updateClassCredits
      summary: >-
        Update credits of package-events or package-money bought membership for
        a specific member
      parameters:
        - name: memberId
          required: true
          in: path
          schema:
            type: number
        - name: boughtMembershipId
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/ApiV2HostMemberBoughtMembershipsUpdateClassCreditsRequestDto
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ApiV2HostMemberBoughtMembershipsUpdateClassCreditsResponseDto
          description: ''
      tags:
        - host
      security:
        - OAuth2: []
  /api/v2/host/members/{memberId}/bought-memberships/{boughtMembershipId}/membership-freeze:
    put:
      operationId: ApiV2HostMembersBoughtMembershipsController_freezeMembership
      summary: Freeze bought membership immediately or schedule freeze/unfreeze
      parameters:
        - name: memberId
          required: true
          in: path
          schema:
            type: number
        - name: boughtMembershipId
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiV2BoughtMembershipFreezeRequestDto'
      responses:
        '200':
          description: ''
      tags:
        - host
      security:
        - OAuth2: []
  /api/v2/host/members/{memberId}/bought-memberships/{boughtMembershipId}/membership-schedule-freeze:
    put:
      operationId: ApiV2HostMembersBoughtMembershipsController_scheduleMembershipFreeze
      summary: Schedule bought membership freeze
      parameters:
        - name: memberId
          required: true
          in: path
          schema:
            type: number
        - name: boughtMembershipId
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/ApiV2BoughtMembershipScheduleFreezeRequestDto
      responses:
        '200':
          description: ''
      tags:
        - host
      security:
        - OAuth2: []
    delete:
      operationId: ApiV2HostMembersBoughtMembershipsController_removeMembershipFreeze
      summary: Unfreeze bought membership or remove scheduled freeze
      parameters:
        - name: memberId
          required: true
          in: path
          schema:
            type: number
        - name: boughtMembershipId
          required: true
          in: path
          schema:
            type: number
      responses:
        '200':
          description: ''
      tags:
        - host
      security:
        - OAuth2: []
  /api/v2/host/members/{memberId}/bought-memberships/{boughtMembershipId}/membership-schedule-unfreeze:
    put:
      operationId: ApiV2HostMembersBoughtMembershipsController_scheduleMembershipUnfreeze
      summary: Schedule bought membership unfreeze
      parameters:
        - name: memberId
          required: true
          in: path
          schema:
            type: number
        - name: boughtMembershipId
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/ApiV2BoughtMembershipScheduleUnfreezeRequestDto
      responses:
        '200':
          description: ''
      tags:
        - host
      security:
        - OAuth2: []
    delete:
      operationId: ApiV2HostMembersBoughtMembershipsController_removeMembershipUnfreeze
      summary: Remove bought membership scheduled unfreeze
      parameters:
        - name: memberId
          required: true
          in: path
          schema:
            type: number
        - name: boughtMembershipId
          required: true
          in: path
          schema:
            type: number
      responses:
        '200':
          description: ''
      tags:
        - host
      security:
        - OAuth2: []
  /api/v2/host/members:
    get:
      operationId: ApiV2HostMembersController_list
      summary: Get members
      parameters:
        - name: page
          required: true
          in: query
          description: Starts at 0
          schema:
            minimum: 0
            example: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          schema:
            minimum: 1
            maximum: 100
            example: 10
            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
        - name: filterPreset
          required: false
          in: query
          schema:
            enum:
              - with-active-membership
            type: string
        - name: staticSegmentId
          required: false
          in: query
          description: Filter customers by static segment ID
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponseDto'
                  - required:
                      - payload
                    properties:
                      payload:
                        type: array
                        items:
                          $ref: '#/components/schemas/HostMemberDto'
          description: ''
      tags:
        - host
      security:
        - 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:
        - host
      security:
        - OAuth2: []
  /api/v2/host/members/list:
    post:
      operationId: ApiV2HostMembersController_listPost
      summary: Get members (with filters)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiV2HostMembersListRequestWithFilterDto'
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponseDto'
                  - required:
                      - payload
                    properties:
                      payload:
                        type: array
                        items:
                          $ref: '#/components/schemas/HostMemberDto'
          description: ''
        '201':
          description: ''
      tags:
        - host
      security:
        - OAuth2: []
  /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:
        - host
      security:
        - OAuth2: []
  /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:
        - host
      security:
        - OAuth2: []
  /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:
        - host
      security:
        - OAuth2: []
    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:
        - host
      security:
        - OAuth2: []
  /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:
        - 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
          schema:
            minimum: 0
            example: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          schema:
            minimum: 1
            maximum: 200
            example: 10
            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}/notes:
    get:
      operationId: ApiV2HostMembersNotesController_list
      summary: Get notes for a specific member
      parameters:
        - name: page
          required: true
          in: query
          description: Starts at 0
          schema:
            minimum: 0
            example: 0
            type: integer
        - name: pageSize
          required: true
          in: query
          schema:
            minimum: 1
            maximum: 100
            example: 10
            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:
   

# --- truncated at 32 KB (293 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/momence/refs/heads/main/openapi/momence-openapi.yml