Create a booking
POST
/api/public/{slug}/book
const url = 'https://example.com/api/public/example/book';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"serviceId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","staffId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","startTime":"example","customerName":"example","customerEmail":"hello@example.com","customerPhone":"example","notes":"example","locationType":"in_person"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/public/example/book \ --header 'Content-Type: application/json' \ --data '{ "serviceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "staffId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "startTime": "example", "customerName": "example", "customerEmail": "hello@example.com", "customerPhone": "example", "notes": "example", "locationType": "in_person" }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”slug
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
serviceId
required
string format: uuid
staffId
required
string format: uuid
startTime
required
string
customerName
required
string
customerEmail
required
string format: email
customerPhone
string
notes
string
locationType
string
Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
data
required
object
bookingId
required
string format: uuid
status
required
string
startTime
required
string
endTime
required
string
Example
{ "data": { "status": "pending" }}