Class Reservations

Create Class Refervation for Lead

Creates a Class Reservation for a Lead for a specified Class.

post/classes/{class_id}/leads/{lead_id}/reserve

Request

  • Base URL
    https://api.wodify.com/v1
  • URL
    https://api.wodify.com/v1/classes/{class_id}/leads/{lead_id}/reserve
  • Auth
    none declared. Required headers: x-api-key

Path parameters

class_idinteger required

Id of the Class to reserve for the Client

lead_idinteger required

Lead identifier.

Headers

x-api-keystring required

A valid API key. If you don't have one, please request one through the Automations → Integrations page.

Request body

layout_item_idinteger

Layout item to assign the lead to

Example request

{
  "layout_item_id": 1234567891234567
}

Response

Post_LeadClassReservation response

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.

Example response

{
  "lead_class_reservation": {
    "reservation_id": 1234567891234567,
    "lead_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,
        "pay_rate_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,
    "layout_item_id": 1234567891234567
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.