Business Delivery Zones Model

ActionMethodResourceDescription
Get allGET/business/:business_id/deliveryzonesGet all delivery zones.
GetGET/business/:business_id/deliveryzones/:deliveryzone_idGet delivery zone with id business_id and deliveryzone_id.
Create POST/business/:business_id/deliveryzonesCreate a delivery zone with business_id.
Update PUT/business/:business_id/deliveryzones/:deliveryzone_idUpdate delivery zone with business_id and deliveryzone_id.
Delete DELETE/business/:business_id/deliveryzones/:deliveryzone_idDelete delivery zone with business_id and deliveryzone_id.

The business model is composed of the following attributes:

AttributeTypeRequiredDescriptionWhereable
namestringno, required to create.The zone's name.Yes
typeintegerno, required to create.The zone's type.
1 for radio.
2 for polygon.
3 for dropdown.
4 for everywhere
Yes
addressstringnoThe zone's address.Yes
datajsonnoThe zone's data for zone.No
dropdown_option_idintegernoThe zone's dropdown option, if zone is type 3.Yes
pricefloatno, required to create.The zone's price.Yes
minimumfloatno, required to create.The zone's minimum purshase.Yes
schedulejsonno, required to create.The zone's schedule. (e.g. LINK TO REFERENCE)No
enabledbooleannoThe zone's status.Yes
businessesarraynoBusiness IDs for delivery zone share

📘

Restrictions for Delivery zones

  • Users level 0 (Type: administrator) can create, update and remove any delivery zone from any existing business in the project.
  • Users level 2 (Type: business owner) can create, update and remove any delivery zone from any business related to this user.

Share Delivery Zones

To share a Delivery Zone from one business to others, you need to send the attribute businesses with an array of business IDs.
This will create a new zone to the businesses shared to.

Delivery zone type

There are 4 different ways to make delivery areas, making more versatile and comfortable for the users depending on their needs. These are shown below:

Type NameType valueDescription
Radio1Radio type, shows the maximum delivery distance from a specific point. This works in kilometers by default but you can convert the input to miles.
Polygon2Polygon type, creates an area based on several coordinates (minimum three).
Dropdown3Normally used with neighborhoods or zones.
Everywhere4Normally used to fast-setup a store