Locations

Get eligible delivery location

POST https://api-us.zapiet.com/v1.0/delivery/locations

This endpoint will return the nearest eligible delivery location based on the customer's location and shopping cart.

Query Parameters

NameTypeDescription

shop*

string

The merchant's myshopify.com store url.

Request Body

NameTypeDescription

shoppingCart

array

The customer's shopping cart.

geoSearchQuery

string

10001

{
	"id": 433,
	"external_id": "72950677728"
	"distance": null,
	"driving_distance": null,
	"company_name": "Apple",
	"address_line_1": "767 5th Ave",
	"address_line_2": null,
	"city": "New York",
	"postal_code": "10153",
	"region": "New York",
	"country": "United States",
	"latitude": 40.7638414,
	"longitude": -73.9729718,
	"timezone": "America\/New_York",
	"custom_attribute_1": null,
	"custom_attribute_2": null,
	"custom_attribute_3": null,
	"delivery": {
		"flip_blackout_dates": false,
		"blackouts": ["2023-11-21", "2023-11-28"],
		"monday": {
			"blackout_dates": ["2023-11-21", "2023-11-28"],
			"breakpoint": "14:00",
			"useBreakpoint": false,
			"before": {
				"value": 24,
				"format": "days"
			},
			"after": {
				"value": 24,
				"format": "days"
			},
			"slots": {
				"enabled": true,
				"slots": [{
					"id": 831969,
					"day_of_week": "monday",
					"from": "10:15",
					"until": "12:45",
					"limited": true,
					"limit": 12
				}, {
					"id": 831970,
					"day_of_week": "monday",
					"from": "12:00",
					"until": "14:00",
					"limited": true,
					"limit": 10
				}, {
					"id": 831971,
					"day_of_week": "monday",
					"from": "13:00",
					"until": "14:00",
					"limited": true,
					"limit": 10
				}]
			}
		},
		"tuesday": {
			"blackout_dates": ["2023-11-21", "2023-11-28"],
			"breakpoint": "14:00",
			"useBreakpoint": false,
			"before": {
				"value": 24,
				"format": "days"
			},
			"after": {
				"value": 24,
				"format": "days"
			},
			"slots": {
				"enabled": true,
				"slots": [{
					"id": 2406,
					"day_of_week": "tuesday",
					"from": "10:45",
					"until": "12:30",
					"limited": true,
					"limit": 15
				}, {
					"id": 402219,
					"day_of_week": "tuesday",
					"from": "12:00",
					"until": "14:00",
					"limited": true,
					"limit": 6
				}, {
					"id": 402220,
					"day_of_week": "tuesday",
					"from": "13:00",
					"until": "14:00",
					"limited": true,
					"limit": 10
				}]
			}
		},
		"wednesday": {
			"blackout_dates": ["2020-11-21", "2020-11-28"],
			"breakpoint": "14:00",
			"useBreakpoint": false,
			"before": {
				"value": 24,
				"format": "days"
			},
			"after": {
				"value": 24,
				"format": "days"
			},
			"slots": {
				"enabled": true,
				"slots": [{
					"id": 2407,
					"day_of_week": "wednesday",
					"from": "10:00",
					"until": "12:00",
					"limited": true,
					"limit": 10
				}, {
					"id": 846035,
					"day_of_week": "wednesday",
					"from": "11:00",
					"until": "12:00",
					"limited": true,
					"limit": 10
				}, {
					"id": 402221,
					"day_of_week": "wednesday",
					"from": "12:00",
					"until": "14:00",
					"limited": true,
					"limit": 10
				}, {
					"id": 402222,
					"day_of_week": "wednesday",
					"from": "13:00",
					"until": "14:00",
					"limited": true,
					"limit": 10
				}]
			}
		},
		"thursday": {
			"blackout_dates": ["2023-11-21", "2023-11-28"],
			"breakpoint": "14:00",
			"useBreakpoint": false,
			"before": {
				"value": 24,
				"format": "days"
			},
			"after": {
				"value": 24,
				"format": "days"
			},
			"slots": {
				"enabled": true,
				"slots": [{
					"id": 2408,
					"day_of_week": "thursday",
					"from": "10:00",
					"until": "12:00",
					"limited": true,
					"limit": 10
				}, {
					"id": 402223,
					"day_of_week": "thursday",
					"from": "12:00",
					"until": "14:00",
					"limited": true,
					"limit": 10
				}, {
					"id": 402224,
					"day_of_week": "thursday",
					"from": "13:00",
					"until": "14:00",
					"limited": true,
					"limit": 10
				}]
			}
		},
		"friday": {
			"blackout_dates": ["2023-11-21", "2023-11-28"],
			"breakpoint": "14:00",
			"useBreakpoint": false,
			"before": {
				"value": 24,
				"format": "days"
			},
			"after": {
				"value": 24,
				"format": "days"
			},
			"slots": {
				"enabled": true,
				"slots": [{
					"id": 2409,
					"day_of_week": "friday",
					"from": "10:00",
					"until": "12:00",
					"limited": true,
					"limit": 10
				}, {
					"id": 402225,
					"day_of_week": "friday",
					"from": "12:00",
					"until": "14:00",
					"limited": true,
					"limit": 10
				}, {
					"id": 402226,
					"day_of_week": "friday",
					"from": "13:00",
					"until": "14:00",
					"limited": true,
					"limit": 10
				}]
			}
		},
		"saturday": {
			"blackout_dates": ["2023-11-21", "2023-11-28"],
			"breakpoint": "14:00",
			"useBreakpoint": false,
			"before": {
				"value": 24,
				"format": "days"
			},
			"after": {
				"value": 24,
				"format": "days"
			},
			"slots": {
				"enabled": true,
				"slots": [{
					"id": 2410,
					"day_of_week": "saturday",
					"from": "10:00",
					"until": "12:00",
					"limited": true,
					"limit": 10
				}, {
					"id": 402227,
					"day_of_week": "saturday",
					"from": "12:00",
					"until": "14:00",
					"limited": true,
					"limit": 10
				}, {
					"id": 402228,
					"day_of_week": "saturday",
					"from": "13:00",
					"until": "14:00",
					"limited": true,
					"limit": 10
				}]
			}
		},
		"sunday": {
			"blackout_dates": ["2023-11-21", "2023-11-28"],
			"breakpoint": "14:00",
			"useBreakpoint": false,
			"before": {
				"value": 24,
				"format": "days"
			},
			"after": {
				"value": 24,
				"format": "days"
			},
			"slots": {
				"enabled": true,
				"slots": [{
					"id": 2411,
					"day_of_week": "sunday",
					"from": "10:00",
					"until": "12:00",
					"limited": true,
					"limit": 10
				}, {
					"id": 402229,
					"day_of_week": "sunday",
					"from": "12:00",
					"until": "14:00",
					"limited": true,
					"limit": 10
				}, {
					"id": 402230,
					"day_of_week": "sunday",
					"from": "13:00",
					"until": "14:00",
					"limited": true,
					"limit": 10
				}]
			}
		}
	},
	"current_time": "2024-02-13 08:54:24"
}

Location available

{
  "geoSearchQuery": "10001",
  "shoppingCart": [
    {
      "variant_id": 9226255761451,
      "product_id": 852798275627,
      "quantity": 1
    }
  ]
}

Location not available

{
    "error": {
        "code": "NO_LOCATIONS_FOUND",
        "message": "No locations were found based upon the provided parameters."
    }
}

Last updated