πŸ“…Manage your services

APIs for Services (opening hours): Create, Update, and Retrieve Time Slots

ℹ️ If rooms and tables specify the "what," services specify the "when." In OctoTable, a service refers to the designated time slot for a specific offering, such as breakfast, lunch, aperitif, or dinner. Each service has its own availability and booking rules.

βš™οΈ Use the base resource URL for the following examples, or see the complete collection

https://api.octorate.com/octotable-pms/api/v2

πŸ” Find all services

GET /services

Retrieves a list of available service for the specified property (e.g., restaurant) using the property ID see more

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Property

<your_property_id>

/

{
  "data": [
    {
      "id": 33924,
      "name": "Breakfast",
      "bookable": true,
      "advance_min": 0,
      "average_stay": 60,
      "card_guarantee": false,
      "confirmation_mode": "CONFIRMED",
      "days_of_week": [
        "MONDAY",
        "SATURDAY"
      ],
      "end_time": "11:00:00",
      "max_advance": 120,
      "online": true,
      "orders_section": {
        "order_enabled": true,
        "required_fields": [
          "phone"
        ],
        "send_order_enabled": true
      },
      "show_rooms": true,
      "slots": [
        "09:30:00",
        "10:30:00"
      ],
      "start_time": "09:00:00"
    },
    {
      "id": 30280,
      "name": "Lunch (12-14h)",
      "bookable": true,
      "advance_min": 0,
      "average_stay": 60,
      "card_guarantee": false,
      "confirmation_mode": "CONFIRMED",
      "days_of_week": [
        "MONDAY",
        "TUESDAY",
        "WEDNESDAY",
        "THURSDAY",
        "FRIDAY",
        "SATURDAY",
        "SUNDAY"
      ],
      "end_time": "14:00:00",
      "max_advance": 60,
      "online": true,
      "orders_section": {
        "order_enabled": true,
        "required_fields": [
          "phone"
        ],
        "send_order_enabled": true
      },
      "show_rooms": true,
      "slots": [
        "12:00:00",
        "12:30:00",
        "13:00:00",
        "13:30:00"
      ],
      "start_time": "12:00:00"
    },
    {
      "id": 33841,
      "name": "Custom dinner",
      "bookable": true,
      "advance_min": 0,
      "average_stay": 60,
      "card_guarantee": false,
      "confirmation_mode": "WAITING_LIST",
      "days_of_week": [
        "MONDAY",
        "TUESDAY",
        "WEDNESDAY",
        "THURSDAY",
        "FRIDAY",
        "SATURDAY",
        "SUNDAY"
      ],
      "end_time": "14:00:00",
      "max_advance": 120,
      "online": true,
      "orders_section": {
        "order_enabled": true,
        "required_fields": [
          "phone"
        ],
        "send_order_enabled": true
      },
      "show_rooms": true,
      "slots": [
        "12:00:00",
        "12:30:00",
        "13:00:00"
      ],
      "start_time": "12:00:00"
    },
    {
      "id": 33925,
      "name": "Custom dinner",
      "bookable": true,
      "advance_min": 0,
      "average_stay": 60,
      "card_guarantee": false,
      "confirmation_mode": "CONFIRMED",
      "days_of_week": [
        "MONDAY",
        "TUESDAY",
        "WEDNESDAY",
        "THURSDAY",
        "FRIDAY",
        "SATURDAY",
        "SUNDAY"
      ],
      "end_time": "14:00:00",
      "max_advance": 120,
      "online": true,
      "orders_section": {
        "order_enabled": true,
        "required_fields": [
          "phone"
        ],
        "send_order_enabled": true
      },
      "show_rooms": true,
      "slots": [
        "12:00:00",
        "12:30:00",
        "13:00:00"
      ],
      "start_time": "12:00:00"
    },
    {
      "id": 30281,
      "name": "Dinner (19-22h)",
      "bookable": true,
      "advance_min": 0,
      "average_stay": 60,
      "card_guarantee": false,
      "confirmation_mode": "CONFIRMED",
      "days_of_week": [
        "MONDAY",
        "TUESDAY",
        "WEDNESDAY",
        "THURSDAY",
        "FRIDAY",
        "SATURDAY",
        "SUNDAY"
      ],
      "end_time": "22:00:00",
      "max_advance": 60,
      "online": true,
      "orders_section": {
        "order_enabled": true,
        "required_fields": [
          "phone"
        ],
        "send_order_enabled": true
      },
      "show_rooms": true,
      "slots": [
        "19:00:00",
        "19:30:00",
        "20:00:00",
        "20:30:00",
        "21:00:00",
        "21:30:00"
      ],
      "start_time": "19:00:00"
    }
  ]
}

πŸ” Find a service

GET /services/{service_id}

Retrieves details of a specific calendar for the given property using the calendar ID see more

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Property

<your_property_id>

Response

{
  "data": [
    {
      "id": 33924,
      "name": "Breakfast",
      "bookable": true,
      "advance_min": 0,
      "average_stay": 60,
      "card_guarantee": false,
      "confirmation_mode": "CONFIRMED",
      "days_of_week": [
        "MONDAY",
        "SATURDAY"
      ],
      "end_time": "11:00:00",
      "max_advance": 120,
      "online": true,
      "orders_section": {
        "order_enabled": true,
        "required_fields": [
          "phone"
        ],
        "send_order_enabled": true
      },
      "show_rooms": true,
      "slots": [
        "09:30:00",
        "10:30:00"
      ],
      "start_time": "09:00:00"
    },

πŸ†• Create a new service

POST /services

Creates a new service entry for the specified property using the provided availability details see more

⚠️ Reserve with Google updates could take up to 24 hours to process.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Property

<your_property_id>

Body

Name
Type
Description

name

string

Name of the seìì

average_stay

int

Average meal duration in minutes.This is important because the table becomes available again when the set time expires. For example, if you select 60, a table booked for 7 pm will be free at 8 pm.

days_of_week

enum [SUN, MON, TUE, WEN, THU, FRI, SAT]

This defines the days of the week in which a service is available for booking. It ensures bookings are only allowed on the specified days.

start_time

date time

Start date time of the calendar

end_time

date time

End time of the calendar

max_advance

int

This setting defines the maximum number of days in advance a customer can make a reservation.

room_ids

int

The IDs of the rooms associated to the service

Response

{
    "data": [
        {
            "id": 30552,
            "name": "Breakfast",
            "bookable": true,
            "advance_min": 0,
            "max_advance": 120,
            "average_stay": 60,
            "days_of_week": [
                "MONDAY"
            ],
            "start_time": "09:00:00",
            "end_time": "11:30:00",
            "slots": [
                "09:30:00",
                "10:00:00",
                "10:30:00",
                "11:00:00"
            ]
        }
    ]
}

πŸ”„ Update a service

PUT /services/{service_id}

Updates the details of a specified calendar entry using the provided availability details see more

⚠️ Reserve with Google updates could take up to 24 hours to process.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Property

<your_property_id>

Body

Name
Type
Description

name

string

Name of the calendar

average_stay

int

Average meal duration in minutes. This is important because the table becomes available again when the set time expires. For example, if you select 60, a table booked for 7 pm will be free at 8 pm.

days_of_week

enum [SUN, MON, TUE, WEN, THU, FRI, SAT]

This defines the days of the week in which a service is available for booking. It ensures bookings are only allowed on the specified days.

start_time

date time

Start date time of the calendar

end_time

date time

End time of the calendar

max_advance

int

This setting defines the maximum number of days in advance a customer can make a reservation.

Response

{
    "data": [
        {
            "id": 30552,
            "name": "Breakfast",
            "bookable": true,
            "advance_min": 0,
            "max_advance": 120,
            "average_stay": 60,
            "days_of_week": [
                "MONDAY"
            ],
            "start_time": "09:00:00",
            "end_time": "11:30:00",
            "slots": [
                "09:30:00",
                "10:00:00",
                "10:30:00",
                "11:00:00"
            ]
        }
    ]
}

πŸ—‘οΈ Delete a calendar

DELETE /services/{service_id}

Deletes an existing service entry from the specified property using the calendar ID see more

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Property

<your_property_id>

Response

{
    "data": [
        21294
    ]
}

πŸ“• ADDITIONAL NOTES

average stay: This refers to the typical duration of a customer's reservation for a particular service, such as a table or event. It is calculated based on past bookings and helps predict how long a reservation will last. For example, if the average stay for dinner is 90 minutes, the system will expect that each reservation will last around 90 minutes, allowing it to manage availability for subsequent bookings. The average stay helps optimize table usage and scheduling.

Example: If a table has an average stay of 90 minutes and a reservation is made for 7:00 PM, the table will be blocked from 7:00 PM to 8:30 PM. However, it will also be unavailable for any booking starting at 5:45 PM or later because the table is already reserved. However, the table will still be available for reservations starting at 5:30 PM or earlier, as the 90-minute stay won't overlap with the 7:00 PM booking.

card_guarantee: Indicates whether a credit card guarantee is required to complete the reservation

confirmation_mode: Defines how reservations are handled once created. Possible values:

  • CONFIRMED – The system automatically checks availability and confirms the reservation immediately.

  • WAITING – All reservations are placed in a waiting list and must be manually confirmed or declined by the restaurant.

slot times: Slot times define the available time intervals for reservations, which must fall within the designated start and end times for a service. For example, if the service is available from 6:00 PM to 10:00 PM, reservation slots can only be set within that window.

The restaurant can customize the slot intervals to be every 15, 30, or 45 minutes, depending on its needs. Additionally, the user has the flexibility to delete any time slots they do not want, allowing them to adjust availability as needed. Example: If a restaurant is offering dinner from 6:00 PM to 10:00 PM with 30-minute slots, it might initially create time slots from 6:00 PM to 10:00 PM in 30-minute increments (6:00, 6:30, 7:00, etc.). However, if the restaurant decides not to take any reservations at 9:30 PM, they can delete that slot, and the system will only allow reservations up to 9:00 PM

advance_min: Defines the minimum number of hours in advance required to make a reservation relative to the chosen time.

Example: If you set advance_min to 1 and the available time slots are 12:00, 12:30, and 13:00, a customer trying to book at 11:29 will only be able to choose 12:30 or 13:00, because 12:00 is no longer available within the required advance time. advance_max: Specifies the maximum number of days in advance a customer can book a reservation for a specific service. This setting helps control how far ahead customers can plan their bookings, ensuring that reservations are not made too far in advance.

For example, if advance_max is set to 30 days, a customer can only book a reservation up to 30 days ahead of the current date. So, if today is January 1st, the customer can make a reservation for any date from January 1st to January 31st, but they will not be able to book for February 1st or later until the 30-day window resets. show_rooms: this parameter determines whether the final customer can choose the room. If set to "true", the customer will be able to select their preferred room from the available options for dining. Example:

order_section

order_enabled: Enables table orders for this service. If set to true, customers can scan the table’s QR code and place an order directly from their device.

required_fields: Defines which customer details (e.g., first name, last name, email, phone) must be provided when placing an order without a reservation (walk-in).

sent_order_enabled: Determines whether customer orders are sent automatically to the kitchen.

  • If true, orders placed by customers are immediately marked as SENT, visible in the kitchen, and, if configured, printed on the kitchen printer.

  • If false, orders remain in UNREAD status and are not visible in the kitchen until reviewed and manually sent by a waiter or staff member.

Last updated