Add V1 online guest creation

POST https://api.zenoti.com/v1/guests/online_guests

This API creates new online guests from custom webstores to support “Checkout as guest” flows. This is a dummy guest and is not retrievable on Zenoti POS.

Before you begin

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

Endpoint

POST /v1/guests/online_guests

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

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Request body

Field Type Required Description
email string No The email address of the online guest. Must be valid and non-empty.
center_id integer (int32) No The unique identifier of the center where the guest is created.
first_name string No The first name of the online guest.
last_name string No The last name of the online guest.

Response

Success (201 Created)

{
  "online_guest_id": "6a1893ba-e9c0-4bc3-9316-3e25a4e61df7",
  "guest_id": "e0a70531-30b6-44ef-a9fb-b7e18c9bd8a8",
  "error": {}
}

Response fields

Field Type Description
online_guest_id string
guest_id string
error object

Example

curl --request POST \
  --url 'https://api.zenoti.com/v1/guests/online_guests' \
  --header 'Authorization: bearer {{access_token}}' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "string",
  "center_id": 0,
  "first_name": "string",
  "last_name": "string"
}'
const response = await fetch('https://api.zenoti.com/v1/guests/online_guests', {
  method: 'POST',
  headers: {
    'Authorization': 'bearer {{access_token}}',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
  email: 'string',
  center_id: 0,
  first_name: 'string',
  last_name: 'string'
})
});
const data = await response.json();
import requests

response = requests.post(
    'https://api.zenoti.com/v1/guests/online_guests',
    headers={
        'Authorization': 'bearer {{access_token}}',
    },
    json={'email': 'string', 'center_id': 0, 'first_name': 'string', 'last_name': 'string'}
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var content = new StringContent(
    JsonSerializer.Serialize(new {
    email = "string",
    center_id = 0,
    first_name = "string",
    last_name = "string"
}),
    Encoding.UTF8, "application/json");
var response = await client.PostAsync(
    "https://api.zenoti.com/v1/guests/online_guests", content);
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

uri = URI('https://api.zenoti.com/v1/guests/online_guests')
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 = { email: 'string', center_id: 0, first_name: 'string', last_name: 'string' }.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