Skip to content

Latest commit

 

History

History
125 lines (99 loc) · 5.06 KB

File metadata and controls

125 lines (99 loc) · 5.06 KB
title Services
nav_order 4

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

NameTypeDescription
idIntegerAutomatically set
created_atDatetimeAutomatically set
updated_atDatetimeAutomatically set
titleStringRequired
descriptionText
activeBooleanAutomatically set
booking_capacityIntegerNot required
day_booking_specify_timeBooleanNot required (default false)
has_day_bookingBooleanNot required (default false)
intervalIntegerNot required (default 60)
max_slotsIntegerNot required (default 1)
priceDecimalNot required.
same_dayBooleanNot required (default false)
templateStringComponent template (calendar view)
interval_roundingIntegerOverrides account default (see info on account object)
booking_typeStringRequired. Values: appointment (default), attendance, product, gift_card
custom_dataArrayNot required
booking_formLiquid-TextCustom booking form
mail_verificationLiquid-Text
mail_confirmationLiquid-Text
sms_verificationLiquid-Text
sms_confirmationLiquid-Text
sms_reminderLiquid-Text
mail_modificationLiquid-Text
mail_awaiting_confirmationLiquid-Text
mail_cancellationLiquid-Text
sms_modificationLiquid-Text
sms_awaiting_confirmationLiquid-Text
sms_cancellationLiquid-Text
next_intervalIntegerNot required
payment_requiredBooleanNot required
allow_invoiceBooleanNot required
booking_minimumIntegerNot required
termsTextNot required
priority_strategyStringNot required. Strategy for resource priority assignment.
availability_typeStringNot required. Type of availability calculation.
priority_valueIntegerNot required. Priority value for ordering.

Deprecated attributes

NameTypeDescription
booking_type_idInteger1: 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.