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. |
locationId |
123456789 |
No | Optional location to resolve location-specific availability and remaining capacity. Pass this when your store uses pickup or delivery locations and the availability or order limits can differ by location. Invalid values return 400 . |
Example response body:
{
"LOCAL_DELIVERY": [{
date: "2022-10-20",
soldOut: false,
remaining: 2,
formatted: "20 October 2022"
}, {
date: "2022-10-21",
soldOut: false,
remaining: 5,
formatted: "21 October 2022"
}],
"STORE_PICKUP": [{
date: "2022-10-19",
soldOut: false,
remaining: 10,
formatted: "19 October 2022"
}, {
date: "2022-10-20",
soldOut: false,
remaining: 10,
formatted: "20 October 2022"
}, {
date: "2022-10-21",
soldOut: false,
remaining: 8,
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 .
Note: When locations are enabled for a delivery method (e.g.
LOCAL_DELIVERYorSTORE_PICKUP), the response may include location data. You can pass an optionallocationIdparameter to filter available dates and time slots for a specific location and to resolve location-specific remaining capacity.
Each date is an object with 3 properties:
date- Date with ISO formatformatted- Date formatted based on the shop's locale for both display and valuesoldOut- When using the order limit feature this value turnstruewhen the limit has been reached for that dateremaining- Optional remaining capacity for that date. This is returned when daily order limits are enabled and Buunto can resolve the correct settings for the request. If your setup uses location-specific settings or location-based daily limits, passlocationIdto receive this value.timeSlots- This property will only be shown when the parameterwithTimeSlotsistrue. It's an array listing all the time slots for that date. Please refer to theavailable_time_slotsfor more information about the format.
Example response body when withTimeSlots is true :
{
"LOCAL_DELIVERY": [{
date: "2022-10-21",
soldOut: false,
remaining: 6,
formatted: "20 October 2022",
timeSlots: [{
"to": "11:00",
"from": "10:00",
"formatted": "10:00 - 11:00",
"disabled": true,
"soldOut": false,
"remaining": 2
}, {
"to": "12:00",
"from": "11:00",
"formatted": "11:00 - 12:00",
"disabled": true,
"soldOut": false,
"remaining": 1
}]
}]
}
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. |
locationId |
123456789 |
No | Optional location to resolve location-specific availability and remaining capacity. Pass this when your store uses pickup or delivery locations and the availability or order limits can differ by location. Invalid values return 400 . |
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,
"remaining": 2
}, {
"to": "12:00",
"from": "11:00",
"formatted": "11:00 - 12:00",
"disabled": true,
"soldOut": false,
"remaining": 1,
}, {
"to": "13:00",
"from": "12:00",
"formatted": "12:00 - 13:00",
"disabled": true,
"soldOut": true,
"remaining": 0
}]
Each time slot is an object with 5 properties:
fromandto- Start and end of the time slot formatted as HH:MMformatted- 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-truewhen the option should be disabled. For example when it's past the preparation time cutoff.soldOut- When using the order limit feature this value turnstruewhen the limit has been reached for that time slot.remaining- Optional remaining capacity for that time slot. This is returned when time slot order limits are enabled and Buunto can resolve the correct settings for the request. If your setup uses location-specific settings or location-based limits, passlocationIdto receive this value.
Get the cut-off times
This end point returns the first available date and its cut-off time for each delivery method.
GET https://datepicker.buunto.com/api/v1/cut_off_times
| Parameter name | Example value | Required? | Comment |
|---|---|---|---|
shop |
shopname.myshopify.com |
Yes |
|
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": {
"firstAvailableDate": "2025-03-03",
"cutOffTime": "2025-03-01T12:00:00+00:00"
},
"STORE_PICKUP": {
"firstAvailableDate": "2025-03-01",
"cutOffTime": "2025-02-28T18:00:00+00:00"
}
}