cURL
curl -X POST https://api.neuraldraft.io/v1/bookable-services \
-H "Authorization: Bearer ndsk_live_yourkey" \
-H "Content-Type: application/json" \
-d '{"name":"60-minute private yoga","price":7500,"currency":"gbp","duration_minutes":60}'await nd.bookableServices.create({ name: "60-minute private yoga", price: 7500, currency: "gbp", durationMinutes: 60 });
requests.post("https://api.neuraldraft.io/v1/bookable-services",
headers={"Authorization": f"Bearer {key}"},
json={"name":"60-minute private yoga","price":7500,"currency":"gbp","duration_minutes":60})
<?php
$client->post('bookable-services', [
'headers' => ['Authorization' => 'Bearer '.$key],
'json' => ['name' => '60-minute private yoga', 'price' => 7500, 'currency' => 'gbp', 'duration_minutes' => 60],
]);
{
"id": 12,
"name": "60-minute private yoga",
"slug": "60-minute-private-yoga",
"price": 7500,
"currency": "gbp",
"status": "active",
"description": "<string>",
"short_description": "<string>",
"booking_type": "time_slot",
"duration_minutes": 60,
"buffer_before_minutes": 5,
"buffer_after_minutes": 10,
"max_bookings_per_slot": 1,
"min_notice_hours": 1,
"max_advance_days": 90,
"cancellation_hours": 24,
"min_nights": 123,
"max_nights": 123,
"color": "<string>",
"images": [
"<string>"
],
"sort_order": 0,
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"type": "https://api.neuraldraft.io/errors/bad_request",
"title": "Bad request",
"status": 400,
"detail": "Request body could not be parsed.",
"code": "bad_request",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "API key missing or invalid.",
"code": "unauthorized",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://neuraldraft.com/errors/payment-required",
"title": "Payment Required",
"status": 402,
"detail": "This project has no credits remaining for the current period.",
"code": "insufficient_credits",
"cost": 1,
"balance": 0,
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/validation_failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields failed validation.",
"code": "validation_failed",
"instance": "req_2Nh4PqRsTuVw",
"errors": {
"customer_email": [
"The customer email field must be a valid email address."
],
"starts_at": [
"The starts at field must be a date after now."
]
}
}Booking
Create a bookable service
POST
/
bookable-services
cURL
curl -X POST https://api.neuraldraft.io/v1/bookable-services \
-H "Authorization: Bearer ndsk_live_yourkey" \
-H "Content-Type: application/json" \
-d '{"name":"60-minute private yoga","price":7500,"currency":"gbp","duration_minutes":60}'await nd.bookableServices.create({ name: "60-minute private yoga", price: 7500, currency: "gbp", durationMinutes: 60 });
requests.post("https://api.neuraldraft.io/v1/bookable-services",
headers={"Authorization": f"Bearer {key}"},
json={"name":"60-minute private yoga","price":7500,"currency":"gbp","duration_minutes":60})
<?php
$client->post('bookable-services', [
'headers' => ['Authorization' => 'Bearer '.$key],
'json' => ['name' => '60-minute private yoga', 'price' => 7500, 'currency' => 'gbp', 'duration_minutes' => 60],
]);
{
"id": 12,
"name": "60-minute private yoga",
"slug": "60-minute-private-yoga",
"price": 7500,
"currency": "gbp",
"status": "active",
"description": "<string>",
"short_description": "<string>",
"booking_type": "time_slot",
"duration_minutes": 60,
"buffer_before_minutes": 5,
"buffer_after_minutes": 10,
"max_bookings_per_slot": 1,
"min_notice_hours": 1,
"max_advance_days": 90,
"cancellation_hours": 24,
"min_nights": 123,
"max_nights": 123,
"color": "<string>",
"images": [
"<string>"
],
"sort_order": 0,
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"type": "https://api.neuraldraft.io/errors/bad_request",
"title": "Bad request",
"status": 400,
"detail": "Request body could not be parsed.",
"code": "bad_request",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "API key missing or invalid.",
"code": "unauthorized",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://neuraldraft.com/errors/payment-required",
"title": "Payment Required",
"status": 402,
"detail": "This project has no credits remaining for the current period.",
"code": "insufficient_credits",
"cost": 1,
"balance": 0,
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/validation_failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields failed validation.",
"code": "validation_failed",
"instance": "req_2Nh4PqRsTuVw",
"errors": {
"customer_email": [
"The customer email field must be a valid email address."
],
"starts_at": [
"The starts at field must be a date after now."
]
}
}Authorizations
Project API key. Pass as Authorization: Bearer ndsk_live_.... Manage
keys via /projects/me/api-keys. Test-mode keys use
the ndsk_test_ prefix.
Body
application/json
Maximum string length:
500Available options:
time_slot, date_range Available options:
active, inactive Pattern:
^#([0-9A-Fa-f]{6})$Response
Created.
Example:
12
Example:
"60-minute private yoga"
Example:
"60-minute-private-yoga"
Price in the smallest currency unit (cents/pence).
Example:
7500
Required string length:
3Example:
"gbp"
Available options:
active, inactive Maximum string length:
500time_slot— discrete-duration appointments (default).date_range— multi-night rentals (min_nights/max_nightsapply).
Available options:
time_slot, date_range Example:
60
Example:
5
Example:
10
Pattern:
^#([0-9A-Fa-f]{6})$