Register a guest to a workshop
Purpose: Use this API to register a guest to a workshop.
You must specify workshop_id, along with the body params track_id, guest_id, and center_id.
Before you begin
- You need a valid API key or access token. See Set up API authentication.
Permission: Manage API Keys (on the Administrator security object) — Required to access Zenoti APIs.
Endpoint
POST /v1/workshops/{workshop_id}/registrations
Base URL: https://api.zenoti.com
Request
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | bearer {{access_token}} |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| workshop_id | string | Yes | Unique identifier of the workshop for which you are registering the guest. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| track_id | integer (int32) | Yes | Id of the track associated with the workshop. |
| guest_id | string | Yes | Unique identifier of the guest whom you are registering for the workshop. |
| center_id | string | Yes | Unique identifier of the center where the guest is registering for a workshop. |
| waitlist | boolean | No | (Optional) Use this param if you want to add the guest to the waitlist instead of registering the guest. True: Add the guest to the waitlist. False: If action is to register the guest and not to add in the waitlist. |
Response
Success (201 Created)
{
"registrations": [
{
"...": "..."
}
],
"error": {}
}
Response fields
| Field | Type | Description |
|---|---|---|
| registrations | object[] | |
| registrations[].id | integer | |
| registrations[].status | integer | |
| error | object |
Example
curl --request POST \
--url 'https://api.zenoti.com/v1/workshops/{workshop_id}/registrations' \
--header 'Authorization: bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
"track_id": 0,
"guest_id": "string",
"center_id": "string",
"waitlist": true
}'
const response = await fetch('https://api.zenoti.com/v1/workshops/{workshop_id}/registrations', {
method: 'POST',
headers: {
'Authorization': 'bearer {{access_token}}',
'Content-Type': 'application/json'
},
body: JSON.stringify({
track_id: 0,
guest_id: 'string',
center_id: 'string',
waitlist: true
})
});
const data = await response.json();
import requests
response = requests.post(
'https://api.zenoti.com/v1/workshops/{workshop_id}/registrations',
headers={
'Authorization': 'bearer {{access_token}}',
},
json={'track_id': 0, 'guest_id': 'string', 'center_id': 'string', 'waitlist': True}
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var content = new StringContent(
JsonSerializer.Serialize(new {
track_id = 0,
guest_id = "string",
center_id = "string",
waitlist = true
}),
Encoding.UTF8, "application/json");
var response = await client.PostAsync(
"https://api.zenoti.com/v1/workshops/{workshop_id}/registrations", content);
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'
uri = URI('https://api.zenoti.com/v1/workshops/{workshop_id}/registrations')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
request['Content-Type'] = 'application/json'
request.body = { track_id: 0, guest_id: 'string', center_id: 'string', waitlist: true }.to_json
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 |