The API system will search in your account for the lead subscribed under that specific email, and it will subscribe the lead to the calendar.  

TypeParametersValues
POSTcmd*calendar_subscribe
POSTcalendar_name*string
POSTclass_name*string
POSTstarting_datestring (DD Mmm YYYY) Timezone EST
POSTstarting_hourstring (HH:MM) Timezone EST

* Required fields Here is an example:

'lead' => [
    'email' => 'example@email.com'
],
'actions' => [
    '0' => [
        'cmd' => 'calendar_subscribe',
        'calendar_name' => 'First calendar',
        'class_name' => 'First class',
        'starting_date' => '16 Jan 2019',
        'starting_hour' => '15:00',
    ]
]

Success message:

{
  "status": "Success",
  "message": "Lead subscribed to class",
  "type": "112"
}

Error Cases:

Type NumberMessageCause
255Calendar cannot be empty
  • The 'calendar_name' parameter is mandatory and needs to contain data
256Class cannot be empty
  • The 'class_name' parameter is mandatory and needs to contain data.
257Calendar does not exist
  • The calendar does not exist in the database or is not completed.
258Class does not exist
  • The class does not exist in the database or does not belong to the calendar.
260Invalid date format
  • starting_date does not have the correct 'DD Mmm YYYY' format or starting_hour does not have the correct 'HH:MM' format
261Date is in the past
  • starting_date with starting_hour is in the past based on EST timezone.
An example of an error message:
{
  "status": "Error",
  "message": "Class does not exist",
  "type": "258"
}