There are four types of services:
- Appointment
- Attendance
- Product
- Gift card
Appointments can be booked within fixed opening hours as specified on the Resource and with exceptions specified in ResourceExceptionDate.
Attendance at an event is also a booking but the individual booking datetime or resource cannot be modified. Attendance is linked to an event which occurs at a specific time. One service can be linked to one or multiple events.
Attributes
| Name | Type | Description |
|---|---|---|
| id | Integer | Automatically set |
| created_at | Datetime | Automatically set |
| updated_at | Datetime | Automatically set |
| title | String | Required |
| description | Text | |
| active | Boolean | Automatically set |
| booking_capacity | Integer | Not required |
| day_booking_specify_time | Boolean | Not required (default false) |
| has_day_booking | Boolean | Not required (default false) |
| interval | Integer | Not required (default 60) |
| max_slots | Integer | Not required (default 1) |
| price | Decimal | Not required. |
| same_day | Boolean | Not required (default false) |
| template | String | Component template (calendar view) |
| interval_rounding | Integer | Overrides account default (see info on account object) |
| booking_type | String | Required. Values: appointment (default), attendance, product, gift_card |
| custom_data | Array | Not required |
| booking_form | Liquid-Text | Custom booking form |
| mail_verification | Liquid-Text | |
| mail_confirmation | Liquid-Text | |
| sms_verification | Liquid-Text | |
| sms_confirmation | Liquid-Text | |
| sms_reminder | Liquid-Text | |
| mail_modification | Liquid-Text | |
| mail_awaiting_confirmation | Liquid-Text | |
| mail_cancellation | Liquid-Text | |
| sms_modification | Liquid-Text | |
| sms_awaiting_confirmation | Liquid-Text | |
| sms_cancellation | Liquid-Text | |
| next_interval | Integer | Not required |
| payment_required | Boolean | Not required |
| allow_invoice | Boolean | Not required |
| booking_minimum | Integer | Not required |
| terms | Text | Not required |
| priority_strategy | String | Not required. Strategy for resource priority assignment. |
| availability_type | String | Not required. Type of availability calculation. |
| priority_value | Integer | Not required. Priority value for ordering. |
Deprecated attributes
| Name | Type | Description |
|---|---|---|
| booking_type_id | Integer | 1: appointment. 2: attendance. |
Listing
GET /services will return all services.
GET /services/appointments will return all services with booking_type=appointment.
GET /services/attendances will return all services with booking_type=attendance.
GET /services/products will return all services with booking_type=product.
GET /services/gift_cards will return all services with booking_type=gift_card.
Response
[
{
"service": {
"active": true,
"booking_capacity": 1,
"booking_type": "appointment",
"booking_type_id": 1,
"description": "The best service",
"created_at": "2012-09-20T15:34:16+02:00",
"custom_data": null,
"day_booking_specify_time": false,
"has_day_booking": false,
"id": 1,
"interval": 20,
"max_slots": null,
"price": "115.0",
"same_day": false,
"template": null,
"title": "Chiropractor",
"updated_at": "2012-09-20T15:34:16+02:00"
}
}
]
Get service
GET /services/{service_id} will get a service with id {service_id}.
Add new service
POST /services will create a new service.
Update service
PUT /services/{service_id} will update existing service with id {service_id}.
Get availability
GET /services/{service_id}/availability will return available resources for a service with id {service_id}.
Delete service
DELETE /services/{service_id} will delete existing service with id {service_id}. Deleting a service will set it to active=false and will not be returned in any listings.