Dates
Get pickup dates and times
POST
https://api.zapiet.com/v1.0/pickup/locations/:locationId/calendar
This endpoint allows you to fetch calendar rules for a specific location
Path Parameters
locationId*
string
The ID of the Zapiet location
Query Parameters
shop*
string
The myshopify.com store url
Request Body
shoppingCart
string
The contents of the customers shopping basket.
{
"minDateTime": "2021-05-13 09:00:00",
"minDate": "2021-05-13",
"maxDate": null,
"minTime": ["09", "00"],
"maxTime": ["17", "00"],
"disabled": [],
"interval": 60,
"daysOfWeek": {
"sunday": {
"min": {
"hour": "09",
"minute": "00"
},
"max": {
"hour": "17",
"minute": "00"
}
},
"monday": {
"min": {
"hour": "09",
"minute": "00"
},
"max": {
"hour": "17",
"minute": "00"
}
},
"tuesday": {
"min": {
"hour": "09",
"minute": "00"
},
"max": {
"hour": "17",
"minute": "00"
}
},
"wednesday": {
"min": {
"hour": "09",
"minute": "00"
},
"max": {
"hour": "17",
"minute": "00"
}
},
"thursday": {
"min": {
"hour": "09",
"minute": "00"
},
"max": {
"hour": "17",
"minute": "00"
}
},
"friday": {
"min": {
"hour": "09",
"minute": "00"
},
"max": {
"hour": "17",
"minute": "00"
}
},
"saturday": {
"min": {
"hour": "09",
"minute": "00"
},
"max": {
"hour": "17",
"minute": "00"
}
}
},
"timezone": "America\/New_York"
}
{
"shoppingCart": [
{
"variant_id": 9226255761451,
"product_id": 852798275627,
"quantity": 5
},
{
"variant_id": 9226255761452,
"product_id": 852798275628,
"quantity": 2
}
]
}
Minimum Date Slots
If the merchant has pickup order limits, we will return an array of time slots available for the minDate
{
"minDate": "2024-01-16",
"minDateSlots": [
{
"id": 1,
"location_id": 1,
"day_of_week": "tuesday",
"available_from": "11:30",
"available_until": "12:00",
"limited": true,
"limit": 10
},
{
"id": 2,
"location_id": 1,
"day_of_week": "tuesday",
"available_from": "12:00",
"available_until": "12:30",
"limited": true,
"limit": 10
}
}
Blackout dates
If the merchant wants to prevent customers from selecting pickup on specific dates of the year we will return an array of dates as shown below.
/**
Pickup not allowed on:
13th May 2021
25th December 2021
**/
{
"disabled": [
"2021-04-13",
"2021-11-25"
]
}
Disabled days of the week
If merchants want to prevent customers from selecting pickup on specific days of the week then we will return an array of integers.
/**
Pickup not allowed on Sunday or Monday
1: Sunday
2: Monday
3: Tuesday
4: Wednesday
5: Thursday
6: Friday
7: Saturday
**/
{
"disabled": [
1,
2
]
}
Specifically allowed pickup dates
If a merchant wants to allow pickups only on specific dates of the year we will return the available pickup dates in the disabled array. Note the first element of the array will be true
/**
Pickup is only available on:
13th May 2021
25th December 2021
**/
{
"disabled": [
true,
"2021-04-13",
"2021-11-25"
]
}
Advanced date rules
Merchants can combine both specifically allowed pickup dates and days of the week.
/**
Pickup is only available on:
Sundays
Mondays
13th May 2021
25th December 2021
**/
{
"disabled": [
true,
1,
2,
"2021-04-13",
"2021-11-25"
]
}
/**
Pickup is not available on:
Sundays
Mondays
13th May 2021
25th December 2021
**/
{
"disabled": [
1,
2,
"2021-04-13",
"2021-11-25"
]
}
Last updated