Skip to main content

Cancellation API - Setster Developer Instructions (2.0)

Comprehensive guide on implementing appointment cancellations through Setster's API. Discover the API's capabilities, required parameters, and error handling for effective cancellation processes.

Cancel Appointment

Canceling Appointments

Canceling an appointment keeps a record of the appointment and amends the status to Canceled. Canceling is different from deleting an appointment which will completely erase the appointment from the Setster database.

The steps to cancel an appointment are as follows:

  1. 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.
  2. Locate the appointment you would like to cancel from the list of appointments in the response body.
  3. Take note of the appointment's id for later use.
  4. To cancel, you'll need to update the appointment's status to "status": 3. The complete list of appointment status codes are listed below.
  5. Finally, you're ready to make a PUT request to the Modify Appointment Endpoint to update the appointment status to 3 - completing the appointment cancellation process.

Update Appointment Status to Canceled

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.

{
  "status": 3, // Status code 3 to cancel appointment
  "company_id": "{{company_id}}",
  "client_email": "<string>",
  "client_name": "<string>",
  "service_id": "<integer>",
  "start_date": "<integer>",
  "client_phone": "<string>",
  "client_address": "<string>",
  "employee_id": "<long>",
  "location_id": "<long>",
  "duration": 15,
  "note": "<string>",
  "subservices": "<integer>",
  "paid": false,
  "price": 0,
  "custom_data": "<object>",
  "timezone_id": "<integer>"
}

Appointment Status Codes

Status Code Status Definition
0 Waiting for email confirmation from the client
1 Email confirmed but not validated by the admin/provider
2 Email confirmed and validated or paid
3 Declined or canceled
4 Busy time imported from external sources (e.g., Google calendar)
6 Busy time imported from Zapier
8 Completed
9 No show (the scheduled event did not take place)
10 In progress
11 Checked-in
12 Just arrived
13 Delayed

Rescheduling Appointments

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:

  1. 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.
  2. Locate the appointment you would like to update from the list of appointments in the response body.
  3. Take note of the appointment id, service_id, and other parameters for later use.
  4. Make a GET request to Get Availability of the appointment's selected service by including the service_id you previously noted.
  5. Once you've found the desired available date and time, take note of the day, month, year, and time.
  6. Construct the start_date that will be used in the next request by combining the day, month, year, and time into a string formatted as "yyyy-mm-dd hh:mm:ss". For example: 2019-09-01 12:00
  7. Finally, you're ready to make a PUT request to the Modify Appointment Endpoint to update the appointment time - completing the rescheduling process.

Update and Reschedule Your Appointment

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>"
}

Cancel

Modify appointment to cancel it.

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.

Triggers Client Notification

By default triggers an email and SMS if configured. Learn More

Authorizations:
session_token
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 1, enables strict validation of custom fields in the custom_data object. This enforces:

  • Required field validation: Returns an error if any custom field marked as required is missing or empty
  • Length validation: Returns an error if any field value exceeds the maximum length configured for that field
  • Dropdown options validation: Validates that values for dropdown fields (type 7) match the allowed options

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 yyyy-mm-dd hh:mm:ss

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:

  • 0 - waiting email confirmation from the client
  • 1 - email confirmed but not validated by the admin/provider
  • 2 - email confirmed and validated or paid
  • 3 - declined or canceled
  • 4 - busy time imported from external sources (e.g. google)
  • 6 - busy time imported from Zapier
  • 8 - completed
  • 9 - no show (the scheduled event did not take place)
  • 10 - in progress
  • 11 - checked in
  • 12 - just arrived
  • 13 - delayed
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_fields property.

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 key matches one of your booking form field keys and the value is any custom data value.

timezone_id
integer <int32>
Example: "553"

The ID of the time zone in our database

Responses

Request samples

Content type
application/json
{
  • "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": [
      ],
    • "field index2": [
      ]
    },
  • "custom_data": {
    • "key1": "Lorem Ipsum",
    • "key2": "Lorem Ipsum"
    },
  • "timezone_id": 553
}

Response samples

Content type
application/json
{
  • "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": {
      },
    • "custom_data": {
      },
    • "timezone_short": "GMT -05:00",
    • "timezone_offset_seconds": -18000,
    • "timezone_id": 553
    }
}