Managing Faculty Profile Appointment via the API
You can use our API to create and manage faculty appointments.
Managing Faculty Profile Appointment via the API
Create Appointment
1. To create a faculty appointment, you will first need the "profile_id" for the faculty member -- a user identifier generated when the profile is created. You can fetch this ID value from one of a few endpoints detailed here: View Single Profile.
2. Next, you will need the "unit_id" for the appointment object. You can retrieve a list of units for your tenant with the series#index endpoint.
Example:
GET => /10668/units
3. Next, you will need the "rank_id" to which you will associate the given faculty member's appointment. To find this, you will first need to fetch the "series_id" using the series#index endpoint. This endpoint uses the "unit_id" to return available series objects.
Example:
GET => /10668/series?unit_id=10669
4. Once you have the "series_id", you can use the ranks#index endpoint to retrieve the ranks for a given series. This endpoint uses the "series_id" and returns the associated series objects.
Example:
GET => /10668/ranks?series_id=42
5. Once you have the required identifiers, use the appointments#create endpoint. This endpoint takes a JSON payload of parameters associated with the appointment object and then returns the created appointment.
Example:
POST => /10668/profiles/with_appointment
{
"appointment":{
"unit_id": 10669,
"rank_id": 42,
"title": "Professor of Testing",
"start_date": "2021-01-01"
}
}
Update Appointment
To update an appointment for a faculty member, you will first need a value for "appointment_id" of the object to update. You can view the appointments for a given profile by fetching the profile for the faculty member as described here: View Single Profile. You can also accomplish this by fetching appointments for a given "profile_id" with the appointments#index endpoint. This endpoint takes query parameters to search for appointments and returns a paginated results set.
Example:
GET => /10668/appointments?profile_id=1432
GET => /10668/appointments?search=testappointment
Delete Appointment
To delete an appointment for a faculty member, you will first need a value for "appointment_id" of the object to update. You can view the appointments for a given profile by fetching the profile for the faculty member as described here: View Single Profile. You can also accomplish this by fetching appointments for a given "profile_id" with the appointments#index endpoint. This endpoint takes query parameters to search for appointments and returns a paginated results set.
Example:
GET => /10668/appointments?profile_id=1432
GET => /10668/appointments?search=testappointment
Once you have the "appointment_id" that you wish to delete, use the appointments#destroy endpoint.
Example:
DELETE => /10668/appointments/3532