Kartra Documentation Technical Documentation for Kartra

Action: Subscribe lead to calendar

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.

 

Type Parameters Values
POST cmd* calendar_subscribe
POST calendar_name* string
POST class_name* string
POST starting_date string (DD Mmm YYYY) Timezone EST
POST starting_hour string (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 Number Message Cause
255 Calendar cannot be empty
  • The ‘calendar_name’ parameter is mandatory and needs to contain data
256 Class cannot be empty
  • The ‘class_name’ parameter is mandatory and needs to contain data.
257 Calendar does not exist
  • The calendar does not exist in the database or is not completed.
258 Class does not exist
  • The class does not exist in the database or does not belong to the calendar.
260 Invalid date format
  • starting_date does not have the correct ‘DD Mmm YYYY’ format or starting_hour does not have the correct ‘HH:MM’ format
261 Date 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"
}

© 2024 Kartra All Rights Reserved