| title | Services |
|---|---|
| nav_order | 4 |
| description | API reference for the Makeplans services endpoint — service types and their attributes. |
There are seven types of services:
- Appointment
- Attendance
- Product
- Gift card
- Addon
- Subscription
- Pass
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.
| 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 |
| 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, addon, subscription, pass |
| custom_data | Object | Not required. Key/value. Stored as strings. |
| 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 | |
| mail_request_payment | Liquid-Text | |
| sms_request_payment | 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. Values: resource (default), provider. With resource the opening hours on the resource are used. With provider the opening hours on the [provider](/endpoints/providers/) are used. |
| priority_value | Integer | Not required. Priority value for ordering. |
| quota | Integer | Number of uses. Required for subscription and pass unless `unlimited` is true. Not applicable for other types. |
| unlimited | Boolean | Unlimited number of uses. Only applicable for subscription and pass. Default: false. |
| billing_period | Integer | Required for subscription. Not applicable for other types. |
| renewal_price | Decimal | Only applicable for subscription. |
| validity_days | Integer | Number of days the pass is valid. Required for unlimited passes. Only applicable for pass. |
| linked_service_ids | Array | Ids of linked services. |
| Name | Type | Description |
|---|---|---|
| booking_type_id | Integer | 1: appointment. 2: attendance. 3: gift_card. 4: product. 5: addon. 6: subscription. 7: pass. |
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 sellable services (booking_type product, gift_card, addon, subscription or pass).
GET /services/gift_cards will return all services with booking_type=gift_card.
GET /services/addons will return all services with booking_type=addon.
GET /services/subscriptions will return all services with booking_type=subscription.
GET /services/passes will return all services with booking_type=pass.
| Name | Type | Description |
|---|---|---|
| category_id | Integer | Only return services in this category. |
| booking_type | String | Only return services with this booking type. |
The listing includes the connected resources for each service as a nested resources array. Get service also includes the connected categories.
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 /services/{service_id} will get a service with id {service_id}.
POST /services will create a new service.
PUT /services/{service_id} will update existing service with id {service_id}.
GET /services/{service_id}/availability will return the providers for a service with id {service_id}. The providers define which resources provide the service and their opening hours.
Response
[
{
"provider": {
"created_at": "2012-09-20T15:34:16+02:00",
"id": 1,
"resource_id": 1,
"service_id": 1,
"opening_hours_mon": null,
"opening_hours_tue": null,
"opening_hours_wed": null,
"opening_hours_thu": null,
"opening_hours_fri": null,
"opening_hours_sat": null,
"opening_hours_sun": null,
"priority_value": null,
"updated_at": "2012-09-20T15:34:16+02:00"
}
}
]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.