Get Businesses List

This API endpoint is used to get all businesses.

🚧

User Level Restrictions

Get business depends on the level of the user that makes the request:

  • User level 0 (Type: Administrator) response contains all existing business in the project.
  • User level 2 (Type: Business Owner) with mode:dashboard for the editor, contains all business related to this user, also can get all business existing by using a location or dropdownoption according to this data.
  • Another type of user can get all business existing by using a location or dropdownoption according to this data as if they were users level 3 (Type: Client/Customer)
  • type,params=zones and location is required if the search is not dashboard mode 1 for delivery , 2 for pick-up or 3 for eatin.

Note: mode:dashboard only works with user level 0 or 2.

Search by position

This kind of search does not require authorization and the parameters must be built including type, location: lat, lng and params=zones as shown in the following example:

  • https://apiv4.ordering.co/v400/en/demo/business?type=1&location=40.7539143,-73.9810162&params=zones,name,slug

To check the Business model and learn more about attributes that can be used as params, please check this link #business-model

Search by dropdown

This kind of search does not require authorization and the parameters must be built including type, dropdownoption and params=zones as shown in the following example:

  • https://apiv4.ordering.co/v400/en/demo/business?type=1&dropdownoption=1&params=zones,name,slug

To check the Business model and learn more about the attributes that can be used as params, please check this link #business-model

Using Ordering SDK

// get as customer
const response = await ordering.businesses().parameters(parameters).get();

//With mode dashboard
const response = await ordering.businesses().asDashboard().get();
Language
Authentication
Header
Click Try It! to start a request and see the response here!