New appointment
{{server}}/api/v1/appointment/bookingThis request books an appointment.
Request
-
branch(string, required): Branch key -
language(string, required): Selected language key -
service(string, required): Selected service key -
start(number, required): The start time of the slot. -
client.name(string, required): The name of the client. -
client.email(string): The email of the client. -
client.phone(string): The phone number of the client. -
clerk(string): Selected clerk key in case of clerk selection
Response
-
start(number): The start time of the appointment. -
language(string): Selected language key. -
branch(string): Branch key. -
service(string): Selected service key. -
client.name(string): The name of the client. -
client.email(string): The email of the client. -
client.phone(string): The phone number of the client. -
bookingCode(string): The unique code for the booking. -
verified(boolean): Indicates whether the booking is verified. If itfalse, it should be confirmed. The server sent the confirmation message to the client. -
length(number): The duration of the appointment.
Request
Authorization
| Header | Value |
|---|---|
Authorization | SmartToken {{smartToken}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
Body (json)
{
"branch": "{{branch}}",
"language": "00000000-0000-4000-0004-000000000001",
"service": "00000000-0000-4000-0007-000000000005",
"start": 1745850600000,
"client": {
"name": "John Node",
"phone": "+36458754123"
}
}
Code snippets
- cURL
- JavaScript
- Python
curl -X POST '{{server}}/api/v1/appointment/booking' \
-H 'Accept: application/json' \
-H 'Authorization: SmartToken {{smartToken}}' \
-H 'Content-Type: application/json' \
-d '{
"branch": "{{branch}}",
"language": "00000000-0000-4000-0004-000000000001",
"service": "00000000-0000-4000-0007-000000000005",
"start": 1745850600000,
"client": {
"name": "John Node",
"email": "[email protected]",
"phone": "+36458754123"
}
}'
const response = await fetch("{{server}}/api/v1/appointment/booking", {
method: "POST",
headers: {
"Accept": "application/json",
"Authorization": "SmartToken {{smartToken}}",
"Content-Type": "application/json"
},
body: JSON.stringify({
"branch": "{{branch}}",
"language": "00000000-0000-4000-0004-000000000001",
"service": "00000000-0000-4000-0007-000000000005",
"start": 1745850600000,
"client": {
"name": "John Node",
"phone": "+36458754123"
}
}),
});
const data = await response.json();
console.log(data);
import requests
url = "{{server}}/api/v1/appointment/booking"
headers = {
"Accept": "application/json",
"Authorization": "SmartToken {{smartToken}}",
"Content-Type": "application/json"
}
payload = {
"branch": "{{branch}}",
"language": "00000000-0000-4000-0004-000000000001",
"service": "00000000-0000-4000-0007-000000000005",
"start": 1745850600000,
"client": {
"name": "John Node",
"phone": "+36458754123"
}
}
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.json())
Example
{{server}}/api/v1/appointment/bookingHeaders (1)
| Key | Value |
|---|---|
Accept | application/json |
{
"branch": "{{branch}}",
"language": "00000000-0000-4000-0004-000000000001",
"service": "00000000-0000-4000-0007-000000000005",
"start": 1745850600000,
"client": {
"name": "John Node",
"phone": "+36458754123"
}
}
Response headers (9)
| Key | Value |
|---|---|
Access-Control-Expose-Headers | * |
Cache-Control | no-store, no-cache, must-revalidate |
Access-Control-Allow-Origin | * |
Access-Control-Allow-Methods | POST, PUT, GET, OPTIONS, DELETE |
Access-Control-Allow-Credentials | true |
Content-Length | 327 |
Access-Control-Max-Age | 86400 |
Access-Control-Allow-Headers | Content-Type, Authorization, X-Requested-With |
Content-Type | application/json;charset=utf-8 |
{
"start": 1745850600000,
"language": "00000000-0000-4000-0004-000000000001",
"branch": "00000000-0000-4000-0003-000000000001",
"service": "00000000-0000-4000-0007-000000000005",
"client": {
"name": "John Node",
"phone": "+36458754123"
},
"bookingCode": "918369",
"verified": false,
"length": 15,
"time": 1745842813085
}