Headless API

If our widget isn't applicable to your store (for example, if you're building a custom storefront or a mobile app), you have the ability to build your own date/time slot selector using the following endpoints.

Get the available dates

This endpoint returns all the available dates based on your shop's settings. Optionally, you can all so get the time slots along with the dates.

GET https://datepicker.buunto.com/api/v1/available_dates

Parameter name Example value Required? Comment
shop shopname.myshopify.com Yes
withTimeSlots true Yes When true - the time slots will be returned for each date. This option will only work if the number of dates returned is less than or equal to 50.
productVariantIds 234567,9876543,5432167 No The settings can be different for specific products. This only needs to be passed if you're using Custom settings or Placement filtering.

Example response body:

{
    "LOCAL_DELIVERY": [{
        date: "2022-10-20",
        soldOut: false,
        formatted: "20 October 2022"
    }, {
        date: "2022-10-21",
        soldOut: false,
        formatted: "21 October 2022"
    }],
    "STORE_PICKUP": [{
        date: "2022-10-19",
        soldOut: false,
        formatted: "19 October 2022"
    }, {
        date: "2022-10-20",
        soldOut: false,
        formatted: "20 October 2022"
    }, {
        date: "2022-10-21",
        soldOut: false,
        formatted: "20 October 2022"
    }]
}

Retrieves all the available dates for the shop.

There can be different available dates depending on the delivery method ( LOCAL_DELIVERY or STORE_PICKUP). If you're not using the method selector then all the dates will be under LOCAL_DELIVERY.

Each date is an object with 3 properties:

  • date - Date with ISO format
  • formatted - Date formatted based on the shop's locale for both display and value
  • soldOut - When using the order limit feature this value turns true when the limit has been reached for that date
  • timeSlots - This property will only be shown when the parameter withTimeSlots is true. It's an array listing all the time slots for that date. Please refer to the available_time_slots for more information about the format.

Example response body when withTimeSlots is true:

{
    "LOCAL_DELIVERY": [{
        date: "2022-10-21",
        soldOut: false,
        formatted: "20 October 2022",
        timeSlots: [{
            "to": "11:00",
            "from": "10:00",
            "formatted": "10:00 - 11:00",
            "disabled": true,
            "soldOut": false
        }, {
            "to": "12:00",
            "from": "11:00",
            "formatted": "11:00 - 12:00",
            "disabled": true,
            "soldOut": false
        }]
    }]
}

Get the available times

This endpoint returns all the available times based on your shop's settings for a given date and delivery method.

GET https://datepicker.buunto.com/api/v1/available_time_slots

Parameter name Example value Required? Comment
shop shopname.myshopify.com Yes
date 2022-10-19 Yes
method LOCAL_DELIVERY No. Defaults to LOCAL_DELIVERY
productVariantIds 234567,9876543,5432167 No The settings can be different for specific products. This only needs to be passed if you're using Custom settings or Placement filtering.

Retrieves all timeslots for the provided date and method.

Example response body:

[{
    "to": "11:00",
    "from": "10:00",
    "formatted": "10:00 - 11:00",
    "disabled": true,
    "soldOut": false
}, {
    "to": "12:00",
    "from": "11:00",
    "formatted": "11:00 - 12:00",
    "disabled": true,
    "soldOut": false
}, {
    "to": "13:00",
    "from": "12:00",
    "formatted": "12:00 - 13:00",
    "disabled": true,
    "soldOut": false
}]

Each time slot is an object with 5 properties:

  • from and to - Start and end of the time slot formatted as HH:MM
  • formatted - Time slot formatted based on the shop's locale for both display and value. This value must be attached to the order for Buunto's backend to parse the date correctly.
  • disabled - true when the option should be disabled. For example when it's past the preparation time cutoff.
  • soldOut - When using the order limit feature this value turns true when the limit has been reached for that time slot.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.