post
https://demo.inhousedelivery.cloud/v1/locations
Creates a new location (store) where delivery orders will be dispatched from.
Request Parameters
Creating a location can be done through either passing the full request payload for the location and address details or by simply passing a Google place id where the backend retrieves all the necessary details directly from the Google API.
Below is an example payload for creating a new location manually
{
"name": "Pizza Diego - Carlsbad",
"phone": "17204075299",
"timezone": "America/Los_Angeles",
"distance_unit": "mile",
"description": "Best pizza in town",
"address": {
"address": "1639 S Ocean Hwy, Oceanside, CA, 92054 USA",
"goo_place_id": "ChIJVaKie19V2YARB_XEqie-H9o",
"address_line_1": "1639 S Ocean Hwy",
"address_line_2": "",
"city": "Oceanside",
"state": "CA",
"zipcode": "92054",
"country": "USA",
"lat": 32.799676,
"lng": -117.1546
}
}
Below is an example payload for creating a new location by passing a Google place id.
{
"goo_place_id": "ChIJVaKie19V2YARB_XEqie-H9o"
}
| payload property | type | description |
|---|---|---|
| name | string | location name |
| phone | string | phone number of the location in e.164 format. e.g. 17204075299 |
| timezone | string | timezone of the location |
| goo_place_id | string | Google Place ID of the location |
| distance_unit | string | possible values are mile or kms depending on the distance unit observed in the country of that location |
| address | object | represents the full address details including google place id as well as lat / lng values of the location |
