v1

latestOpenAPI 3.0.02026-07-2673188210.8 KB
host-checkout

Get compatible memberships for checkout cart

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.

IncompatibilityDescription
session-membership-excludedsession is not included in specified membership
session-bought-membership-will-expirebought membership will expire before the session start and it's not scheduled to renew
session-bought-membership-pack-will-expirepack will expire before the session starts
session-bought-membership-already-usedbought membership was already used for this session and it's not allowed to use it multiple times
session-bought-membership-usage-limit-reachedsubscription has reached its usage limit for the renewal period that's aligned with session
session-bought-membership-usage-limit-reached-for-semester-or-coursesubscription 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-reachedbought membership was already used today and is limited to one use per day
session-bought-membership-no-event-credits-leftno event credits are left in the pack
session-bought-membership-no-money-credits-leftno money credits are left in the pack
session-bought-membership-on-demandbought membership is only usable for on-demand content, not classes
session-bought-membership-starts-laterbought membership starts being valid after the session start
session-bought-membership-invalid-typebought membership is not usable for this
session-bought-membership-disabledmembership linked with the bought membership was disabled and thus it can't be used
session-bought-membership-frozenbought membership is frozen when the session happens
session-subscription-ticket-limitsubscription is limited to one ticket
unknownunknown reason
post/api/v2/host/checkout/compatible-memberships

Request body

memberIdinteger required

ID of the member to perform the checkout for

homeLocationIdinteger

Response

Example response

{
  "items": [
    {
      "boughtMembership": {
        "id": 1,
        "type": "subscription",
        "startDate": "2021-01-01T00:00:00Z",
        "endDate": "2021-02-01T00:00:00Z",
        "membership": {
          "id": 5,
          "name": "Monthly Membership",
          "description": "Monthly membership with unlimited access to <b>all</b> classes.",
          "type": "subscription",
          "autoRenewing": true,
          "duration": 1,
          "durationUnit": "months",
          "activationDeadlineInDays": 21,
          "freeTrialDurationInDays": 7,
          "contractAgreement": "Contract agreement text",
          "order": 1,
          "usageLimitForSessions": 5,
          "usageLimitForAppointments": 2
        }
      }
    }
  ]
}