By default triggers an email and SMS if configured. Learn More
Rescheduling Appointments with Setster API - Documentation (2.0)
Learn how to implement appointment rescheduling in your application using Setster's API. This documentation covers methods, parameters, and best practices for a smooth rescheduling process.
Rescheduling is moving an appointment to a different date, time, location, or service. A PUT is used to edit the parameters of an existing appointment.
Steps to reschedule an appointment:
- Make a GET request to List Appointments to retrieve appointments - You may wish to include a client email, or client ID o narrow the appointments to a specific user.
- Locate the appointment you would like to update from the list of appointments in the response body.
- Take note of the appointment
id,service_id, and other parameters for later use. - Make a GET request to Get Availability of the appointment's selected service by including the
service_idyou previously noted. - Once you've found the desired available date and time, take note of the
day,month,year, andtime. - Construct the
start_datethat will be used in the next request by combining theday,month,year, andtimeinto a string formatted as "yyyy-mm-dd hh:mm:ss". For example: 2019-09-01 12:00 - Finally, you're ready to make a PUT request to the Modify Appointment Endpoint to update the appointment time - completing the rescheduling process.
After completing the previous steps you should make a PUT request to the https://www.setster.com/api/v2/appointment/{id}?session_token=SESSION_TOKEN&company_id=COMPANY_ID&id=ID replacing the id path parameter with the appointment id.
{
"company_id": "{{company_id}}",
"client_email": "<string>",
"client_name": "<string>",
"service_id": "{{service_id}}",
"start_date": "{{start_date}}",
"client_phone": "<string>",
"client_address": "<string>",
"employee_id": "<long>",
"location_id": "<long>",
"duration": 15,
"note": "<string>",
"subservices": "<string>",
"paid": false,
"price": 0,
"custom_data": "<object>",
"timezone_id": "<integer>"
}
Modify an Appointment
Modify the attributes for an existing appointment. Most commonly used to reschedule the appointment to a different date and time or to modify the appointment status.
Authorizations:
path Parameters
| id required | integer <int64> Appointment id |
query Parameters
| company_id required | integer <int64> Example: company_id=2345 The unique ID of the account. Account ID. |
| validate_custom_fields | integer Default: 0 Enum: 0 1 Example: validate_custom_fields=1 When set to
When validation fails, the API returns an error with details about which fields failed validation. |
Request Body schema: application/json
| company_id required | integer <int64> Example: "3123" The ID of the company that the appointment belongs to. Field is writable when entity is owned by child account |
| client_email required | string <email> The email of the client that made the appointment |
| client_name required | string Example: "Test Client" The client name |
| service_id required | integer <int64> Example: "453" The ID of the service that the appointment is made for |
| start_date required | string Example: "2019-09-01 12:00" The date and time when the appointment is scheduled to start.
The time is local to the company timezone or the location timezone (if the location is in a different timezone).
The format of the date is |
| client_phone | string Example: "12345678" The client phone number |
| client_address | string The client address |
| employee_id | integer <int64> Example: "12412" The ID of the employee (provider) that the appointment is made for |
| location_id | integer <int64> Example: "54232" The ID of the location where the appointment will take place at |
| duration | integer <int32> multiple of 15 Default: 15 The duration of the appointment in minutes |
| note | string or null Custom client message |
| status | integer Enum: 0 1 2 3 4 6 8 9 10 11 12 13 Appointment status. Possible values:
|
| subservices | string IDs of sub services that were selected for the appointment separated by comma |
| paid | boolean Default: false Whether the appointment has been paid or not, if the service requires a payment. |
| price | integer Default: 0 |
| ews_id | string Deprecated Default: "" |
object Deprecated The values of the booking form fields filled by the client. Custom fields are tied to your Setster Booking Form. New custom data can be added by creating a new field in the Setster dashboard under Booking Form. | |
object Replaces the deprecated Custom data is tied to your Setster Booking Form. New custom data can be added by creating a new field in the Setster dashboard under Booking Form. Expects an object containing key values pairs where the | |
| timezone_id | integer <int32> Example: "553" The ID of the time zone in our database |
Responses
Request samples
- Payload
- curl
- Node
- Java
- Ruby
- C#
{- "company_id": 3123,
- "client_email": "user@example.com",
- "client_name": "Test Client",
- "client_phone": "12345678",
- "client_address": "string",
- "employee_id": 12412,
- "location_id": 54232,
- "service_id": 453,
- "start_date": "2019-09-01 12:00",
- "duration": 15,
- "note": "string",
- "status": 0,
- "subservices": "string",
- "paid": false,
- "price": 0,
- "ews_id": "",
- "custom_fields": {
- "field index1": [
- "string",
- "string",
- "string"
], - "field index2": [
- "string",
- "string",
- "string"
]
}, - "custom_data": {
- "key1": "Lorem Ipsum",
- "key2": "Lorem Ipsum"
}, - "timezone_id": 553
}Response samples
- 200
{- "statusCode": 0,
- "statusDescriptions": "OK",
- "data": {
- "id": 2342,
- "old_id": 2342,
- "client_id": 23113,
- "company_id": 3123,
- "client_email": "user@example.com",
- "client_name": "Test Client",
- "client_phone": "12345678",
- "client_address": "string",
- "employee_id": 12412,
- "location_id": 54232,
- "service_id": 453,
- "start_date": "2019-09-01 12:00",
- "end_date": "2019-09-01 13:00",
- "length": 1800000,
- "duration_padding": 0,
- "note": "string",
- "status": 0,
- "type": "string",
- "last_updated": "2024-03-15 16:00:50",
- "created_at": "2024-03-15 16:00:50",
- "subservices": "string",
- "paid": false,
- "price": 0,
- "ews_id": "",
- "custom_fields": {
- "field index1": [
- "string",
- "string",
- "string"
], - "field index2": [
- "string",
- "string",
- "string"
]
}, - "custom_data": {
- "key1": "Lorem Ipsum",
- "key2": "Lorem Ipsum"
}, - "timezone_short": "GMT -05:00",
- "timezone_offset_seconds": -18000,
- "timezone_id": 553
}
}