Cancel the registration of a class session

DELETE https://api.zenoti.com/api/Appointments/Admin/Sessions/{registration_id}

This API helps you to cancel the registration of a class session booking.

You must provide a unique identifier of the registration as registration_id in the API request. The API then cancels the registration of the specified class session and returns the appropriate cancellation status.

Before you begin

Permission: Manage API Keys (on the Administrator security object) — Required to access Zenoti APIs.

Endpoint

DELETE /api/Appointments/Admin/Sessions/{registration_id}

Base URL: https://api.zenoti.com

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Path parameters

Parameter Type Required Description
registration_id integer (int32) Yes Mandatory Unique identifier of the registration of the class session booking that is to be canceled.

Response

Success (204 No Content)

{}

Example

curl --request DELETE \
  --url 'https://api.zenoti.com/api/Appointments/Admin/Sessions/{registration_id}' \
  --header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/api/Appointments/Admin/Sessions/{registration_id}', {
  method: 'DELETE',
  headers: {
    'Authorization': 'bearer {{access_token}}'
  },
});
const data = await response.json();
import requests

response = requests.delete(
    'https://api.zenoti.com/api/Appointments/Admin/Sessions/{registration_id}',
    headers={
        'Authorization': 'bearer {{access_token}}',
    },
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var response = await client.DeleteAsync(
    "https://api.zenoti.com/api/Appointments/Admin/Sessions/{registration_id}");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

uri = URI('https://api.zenoti.com/api/Appointments/Admin/Sessions/{registration_id}')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
response = http.request(request)
data = JSON.parse(response.body)

Error codes

Status Description
400 400
401 Unauthorized -- invalid or expired access token
429 Too many requests -- rate limit exceeded