v1

latestOpenAPI 3.0.02026-07-24226294602.4 KB
Class Reservations

Create a Class Reservation for a Client

Creates a Class Reservation for a Client for a specified Class

post/classes/{class_id}/clients/{client_id}/reserve

Path parameters

class_idinteger required

Id of the Class to reserve for the Client

client_idinteger required

Id of the Client to reserve the Class for

Headers

x-api-keystring required

A valid api key. If you don't have one, please request one through the Web Integration screen.

Request body

is_recurringboolean

If true, create a recurring class reservation

member_plan_idinteger

Membership to associate reservations to

repeat_type_idinteger

The repetition type of the recurring class reservation (1 = weekly, 2 = monthly, 3 = yearly)

end_type_idinteger

The end type of the recurring class reservation (1 = end date, 2 = occurences, 3 = forever)

end_datestring date

Date that the recurring reservation ends (If EndTypeId = OnADate)

custom_repeat_intervalinteger

Number of weeks, months, or years (depending on RepeatTypeId) between reservations (ex: every 2 weeks)

occurrencesinteger

Number of occurrences before recurring reservation ends (If EndTypeId = After)

is_sundayboolean

If true, reservations will be made on Sundays (If RepeatTypeId = Weeks)

is_mondayboolean

If true, reservations will be made on Mondays (If RepeatTypeId = Weeks)

is_tuesdayboolean

If true, reservations will be made on Tuesdays (If RepeatTypeId = Weeks)

is_wednesdayboolean

If true, reservations will be made on Wednesdays (If RepeatTypeId = Weeks)

is_thursdayboolean

If true, reservations will be made on Thursdays (If RepeatTypeId = Weeks)

is_fridayboolean

If true, reservations will be made on Fridays (If RepeatTypeId = Weeks)

is_saturdayboolean

If true, reservations will be made on Saturdays (If RepeatTypeId = Weeks)

override_waitlistboolean

If true, reservations created will override the waitlist and book over a class's reservation limit

Example request

{
  "member_plan_id": 1234567891234567,
  "end_date": "2014-12-31"
}

Response

Created Class Reservation

reservation_idinteger

Reservation's Id

client_idstring

ClientId

clientstring

Client's Name

lead_idinteger

Lead's Id

leadstring

Lead's Name

dropin_idinteger

Drop In Identifier

dropinstring

Drop In Name

drop_in_emailstring

Email of the Drop In

class_idinteger

Reservation's Class Id (Identifier)

classstring

Reservation's class name

utc_class_start_datetimestring date-time

Date Time that the Class Starts (UTC)

utc_class_end_datetimestring date-time

Date Time that the Class Ends (UTC)

local_class_start_datetimestring date-time

Date Time that the Class Starts (Local)

local_class_end_datetimestring date-time

Date Time that the Class Ends (Local)

program_idstring

Resrvation's Program Id (Identifier)

programstring

Reservation's Program Name

location_idinteger

Reservations Location Id (Identifier)

location_namestring

Reservation's Location Name

reservation_status_idinteger

Reservation Status Id (Identifier)

reservation_statusstring

Reservation Status

membership_idinteger

Id of the Membership used for the Reservation

membershipstring

Membership used for the Reservation

is_cancelled_from_waitlistboolean

Determines if the Reservation was cancelled from waitlist

is_late_cancellationboolean

Determines if the Reservation is a Late Cancellation

wodify_validation_resultstring

The purpose of this attribute is to save any UserException message, that is, and user friendly message that should be shown to the end user. All methods should have, just like service actions:

  • an UserException with Abort Transaction = Yes, and a Log Error = No
  • an AllExceptions with Abort Transaction = Yes, and a Log Error = Yes With this, any known issue that we don't consider an error log, like a business validation, we raise it to be catch in the UserException and we don't log it. Then, in the OnResponse of the full REST service, the Build_Response_JSON action will take care on the output json format. An Exception will have the default formatted error message. If its an AllException, it will log the error so that we can fix it. If its a UserException, it will deliver as an error but it won't log it as an error. A success output will not have this attribute, the Build_Response_JSON will remove it from the final output.
is_recurringboolean

If true, reservation is a part of a recurring reservation

recurrence_descriptionstring

If the class reservation is a part of a recurrence, the description of that recurrence

Example response

{
  "reservation_id": 1234567891234567,
  "lead_id": 1234567891234567,
  "dropin_id": 1234567891234567,
  "class_id": 1234567891234567,
  "utc_class_start_datetime": "2014-12-31T23:59:59.938Z",
  "utc_class_end_datetime": "2014-12-31T23:59:59.938Z",
  "local_class_start_datetime": "2014-12-31T23:59:59.938Z",
  "local_class_end_datetime": "2014-12-31T23:59:59.938Z",
  "location_id": 1234567891234567,
  "coaches": [
    {
      "coach_id": 1234567891234567,
      "payroll_position_id": 1234567891234567
    }
  ],
  "reservation_status_id": 1234567891234567,
  "created": {
    "created_by_id": 1234567891234567,
    "created_on_datetime": "2014-12-31T23:59:59.938Z"
  },
  "updated": {
    "updated_by_id": 1234567891234567,
    "updated_on_datetime": "2014-12-31T23:59:59.938Z"
  },
  "membership_id": 1234567891234567
}