Skip to main content

Services

Services are the foundation of your scheduling system in ReserveKit. A service represents an offering that customers can book, such as a haircut, consultation, or any appointment-based activity. Each service defines its availability through time slots, which specify when bookings can be made.

ReserveKit Services

Service Object

A service object contains the following properties:

PropertyTypeDescription
idintegerUnique identifier for the service
namestringName of the service
descriptionstringDescription of what the service offers
timezonestringTimezone in which the service operates (e.g., "America/New_York")
created_atstringTimestamp when the service was created
updated_atstringTimestamp when the service was last updated

Creating a Service

Create a new service with optional time slots.

HTTP Request

POST /v1/services

Request Body Parameters

ParameterTypeRequiredDescription
namestringYesName of the service
descriptionstringNoDescription of what the service offers
timezonestringYesTimezone in which the service operates (e.g., "America/New_York")
time_slotsarrayNoArray of time slot objects to create with the service

Time Slot Object

ParameterTypeRequiredDescription
day_of_weekintegerYesDay of the week (0-6, where 0 is Sunday)
start_timestringYesStart time in format "YYYY-MM-DD HH:MM:SS"
end_timestringYesEnd time in format "YYYY-MM-DD HH:MM:SS"
max_bookingsintegerYesMaximum number of bookings allowed for this time slot

Example Request

curl -X POST "https://api.reservekit.io/v1/services" \
-H "Authorization: Bearer sk_rsv_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Consultation",
"description": "30-minute initial consultation",
"timezone": "America/New_York",
"time_slots": [
{
"day_of_week": 1,
"start_time": "2023-01-01 09:00:00",
"end_time": "2023-01-01 17:00:00",
"max_bookings": 8
},
{
"day_of_week": 3,
"start_time": "2023-01-01 10:00:00",
"end_time": "2023-01-01 15:00:00",
"max_bookings": 5
}
]
}'

Response

{
"data": {
"id": 123,
"name": "Consultation",
"description": "30-minute initial consultation",
"timezone": "America/New_York",
"created_at": "2023-06-15T14:22:00Z",
"updated_at": "2023-06-15T14:22:00Z"
}
}

Retrieving Services

Fetch all services associated with your API key.

HTTP Request

GET /v1/services

Query Parameters

ParameterTypeRequiredDescription
pageintegerNoPage number for pagination
page_sizeintegerNoNumber of results per page

Example Request

curl -X GET "https://api.reservekit.io/v1/services?page=1&page_size=10" \
-H "Authorization: Bearer sk_rsv_your_api_key" \
-H "Content-Type: application/json"

Response

{
"data": {
"services": [
{
"id": 123,
"name": "Consultation",
"description": "30-minute initial consultation",
"timezone": "America/New_York",
"created_at": "2023-06-15T14:22:00Z",
"updated_at": "2023-06-15T14:22:00Z"
},
{
"id": 124,
"name": "Follow-up",
"description": "15-minute follow-up session",
"timezone": "America/New_York",
"created_at": "2023-06-16T10:15:00Z",
"updated_at": "2023-06-16T10:15:00Z"
}
],
"pagination": {
"current_page": 1,
"total_pages": 3,
"total_count": 25,
"page_size": 10
}
}
}

Retrieving a Single Service

Fetch a specific service by its ID.

HTTP Request

GET /v1/services/{serviceID}

Path Parameters

ParameterTypeRequiredDescription
serviceIDintegerYesID of the service to retrieve

Example Request

curl -X GET "https://api.reservekit.io/v1/services/123" \
-H "Authorization: Bearer sk_rsv_your_api_key" \
-H "Content-Type: application/json"

Response

{
"data": {
"id": 123,
"name": "Consultation",
"description": "30-minute initial consultation",
"timezone": "America/New_York",
"created_at": "2023-06-15T14:22:00Z",
"updated_at": "2023-06-15T14:22:00Z"
}
}

Updating a Service

Update an existing service's details.

HTTP Request

PATCH /v1/services/{serviceID}

Path Parameters

ParameterTypeRequiredDescription
serviceIDintegerYesID of the service to update

Request Body Parameters

ParameterTypeRequiredDescription
namestringNoUpdated name of the service
descriptionstringNoUpdated description of what the service offers
timezonestringNoUpdated timezone in which the service operates

Example Request

curl -X PATCH "https://api.reservekit.io/v1/services/123" \
-H "Authorization: Bearer sk_rsv_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Premium Consultation",
"description": "45-minute comprehensive consultation"
}'

Response

{
"data": {
"id": 123,
"name": "Premium Consultation",
"description": "45-minute comprehensive consultation",
"timezone": "America/New_York",
"created_at": "2023-06-15T14:22:00Z",
"updated_at": "2023-06-17T09:30:00Z"
}
}

Deleting a Service

Delete a service and all its associated time slots and bookings.

HTTP Request

DELETE /v1/services/{serviceID}

Path Parameters

ParameterTypeRequiredDescription
serviceIDintegerYesID of the service to delete

Example Request

curl -X DELETE "https://api.reservekit.io/v1/services/123" \
-H "Authorization: Bearer sk_rsv_your_api_key"

Response

{
"data": "ok"
}

Retrieving Time Slots for a Service

Get all time slots associated with a specific service.

HTTP Request

GET /v1/services/{serviceID}/time-slots

Path Parameters

ParameterTypeRequiredDescription
serviceIDintegerYesID of the service

Example Request

curl -X GET "https://api.reservekit.io/v1/services/123/time-slots" \
-H "Authorization: Bearer sk_rsv_your_api_key" \
-H "Content-Type: application/json"

Response

{
"data": [
{
"id": 456,
"service_id": 123,
"day_of_week": 1,
"start_time": "2023-01-01 09:00:00",
"end_time": "2023-01-01 17:00:00",
"max_bookings": 8,
"created_at": "2023-06-15T14:22:00Z",
"updated_at": "2023-06-15T14:22:00Z"
},
{
"id": 457,
"service_id": 123,
"day_of_week": 3,
"start_time": "2023-01-01 10:00:00",
"end_time": "2023-01-01 15:00:00",
"max_bookings": 5,
"created_at": "2023-06-15T14:22:00Z",
"updated_at": "2023-06-15T14:22:00Z"
}
]
}

Best Practices

  1. Timezone Setting: Choose the appropriate timezone for your service based on where it's physically located.

  2. Service Organization: Create services based on distinct offerings rather than combining multiple services into one.

  3. Service Description: Provide clear descriptions to help customers understand what the service entails.

  4. Service Naming: Use consistent naming conventions across your services for better organization.

Common Errors

Status CodeErrorDescription
400Bad RequestThe request body contains invalid parameters
404Not FoundThe specified service could not be found
422Unprocessable EntityThe service cannot be created with the provided parameters

Next Steps

Now that you've learned how to manage services, you can proceed to the Time Slots section to understand how to control availability in more detail, or the Bookings section to learn how customers can book your services.