Skip to content

Calendar

Description

The calendar endpoint allows you to manage calendar appointments in PCRecruiter. This includes retrieving, creating, updating, and deleting calendar records. Additionally, you can generate the contents of an .ics file for an existing scheduled item.

TIP

This endpoint will return appointments for multiple users based on the permissions of the username that created the SessionId.

Data parameters

  • TaskId: The unique identifier for each calendar record.

  • UserId: The username that owns this calendar record.

  • Date: The start date and time of the appointment in ISO-8601 format.

  • EndDate: The end date and time of the appointment in ISO-8601 format.

  • Duration: The duration of the appointment, in minutes.

  • Subject: The title or subject of the appointment.

  • Notes: The body or description of the appointment.

  • Location: The specified location of the appointment (if available).

  • Alarms: "Y" indicates an alarm is set; otherwise, this is null.

  • LinkType: Links records to the appointment. Possible values are Candidate, Company, or Position.

  • LinkId: The unique identifier for the linked record.

  • AlarmBeforeMins: Time in minutes before the appointment when the alarm will trigger.

  • Snooze: The date the appointment was snoozed (if applicable).

  • IsSnoozed: Boolean indicating whether the appointment has been snoozed.

  • LastModified: The last modified date of the appointment in ISO-8601 format.

  • RecurringId: The ID of the original appointment for recurring events.

  • OutlookId: Unique ID of an Outlook calendar item (if synced from Outlook).

  • Planner: Indicates if the appointment is part of a rollup plan:

    • Rollup: The unique ID and name of the rollup separated by $$ (e.g., ADMIN.0001$$Marketing List).
    • Type: The type of rollup the plan originated from.
    • Ids: An array of unique IDs contained in the plan.
  • ActivityType: If the item is linked to a record, this denotes the activity type written to that record.

  • Result: The result code for the above activity type.

  • Stage: The rollup-style stage assigned to this appointment.

  • Attendees: A list of attendees for the appointment.

  • EventTypeColorCode: Hex color code indicating the type of appointment.

  • EventTypeDescription: A description of the appointment type.

  • RecurringPattern: The recurring pattern if the appointment is recurring.

  • RecurringEnd: The end date for the recurring appointments in ISO-8601 format.

  • RecurringDay: The day of the week for weekly recurring events.

  • RecurringCount: Number of times this appointment has recurred.

  • RecurringType: Indicates whether this is the original appointment or a recurring instance.

  • CalendarId: The unique identifier for the calendar (if multiple calendars exist).

  • IsAllDayAppointment: Boolean value indicating if the appointment lasts all day (e.g., events, time off, vacations).

Examples

------------------ REQUEST -------------------
API
GET /rest/api/calendar/{TaskId}
json
{
  "method": "GET",
  "url": "https://www2.pcrecruiter.net/rest/api/Calendar/{TaskId}",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "BEARER Token"
  },
  "path": {
    "Task Id": TaskId
  }
}
------------------ RESPONSE ------------------
json
{  
"TaskId": 123456,  
"UserId": "SAMPLE",  
"Date": "2020-03-15T13:00:00",  
"EndDate": "2020-03-15T14:00:00",  
"Duration": 60,  
"Subject": "In-office Interview",  
"Notes":  "Location: Conference Room\nDescription: In-office interview for candidate.",  
"Location": "Conference Room",  
"Alarms": "Y",  
"LinkType": "NONE",  
"LinkId": null,  
"AlarmBeforeMins": 5,  
"Snooze": "0001-01-01T00:00:00",  
"IsSnoozed": false,  
"LastModified": "2021-03-15T12:28:10.587",  
"RecurringId": 123456,  
"OutlookId": null,  
"Planner": null,  
"ActivityType": null,  
"Result": null,  
"Stage": null,  
"Attendees": "<meeting\_attendance><organizer>sample@email.net</organizer>  
<attendee><name>support@mainsequence.net</name><status>None</status></attendee>  
</meeting\_attendance>",  
"EventTypeColorCode": "#898763",  
"EventTypeDescription": "Interview",  
"RecurringPattern": "FREQ=DAILY;COUNT=1",  
"RecurringEnd": "2021-03-15T00:00:00",  
"RecurringDay": null,  
"RecurringCount": 1,  
"RecurringType": "MASTER",  
"CalendarId": null,  
"IsAllDayAppointment": false  
}

TIP

Use this API call to retrieve a specific appointment by specifying the TaskId. If no TaskId is provided, all appointments will be returned.

Retrieve Appointments by Date Range

------------------ REQUEST -------------------
API
GET /rest/api/calendar/events?FromDate=2020-03-14&ToDate=2020-03-16
json
{
  "method": "GET",
  "url": "https://www2.pcrecruiter.net/rest/api/Calendar/events?FromDate={date begin}&ToDate={date end}",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "BEARER Token"
  }
}
------------------ RESPONSE ------------------
json
{
  "TotalRecords": 2,
  "Results": [
    {
      "TaskId": 123456,
      "UserId": "SAMPLE",
      "Date": "2020-03-15T10:30:00",
      "EndDate": "2020-03-15T11:00:00",
      "Duration": 30,
      "Subject": "Team Meeting"
    },
    {
      "TaskId": 654321,
      "UserId": "SAMPLE",
      "Date": "2020-03-16T12:45:00",
      "EndDate": "2020-03-16T13:45:00",
      "Duration": 60,
      "Subject": "Client Call"
    }
  ]
}

TIP

Use this API call to retrieve all appointments within a specified date range. Each appointment will include the same parameters as described in the previous example.

Generate an .ics File for an Appointment

------------------ REQUEST -------------------
API
PUT /rest/api/calendar/{TaskId}/meetingrequest?fromEmail=sample.email.net&toEmail=support@mainsequence.net
json
{
  "method": "PUT",
  "url": "https://www2.pcrecruiter.net/rest/api/{TaskId}/meetingrequest?fromEmail=&toEmail=",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "BEARER Token"
  }
}
------------------ RESPONSE ------------------
json
{
  "icsAttachment": "BEGIN:VCALENDAR\nVERSION:2.0\nMETHOD:REQUEST\n..."
}

TIP

This API call generates the contents of an file for an existing PCRecruiter appointment. You can attach the file to an email for a meeting request. Any changes made to the file will not sync back to PCRecruiter