Last updated
Last updated
The goal of this guide is to illustrate how you would create
for a theoretical customer "ABC Brand" which all locations and sites will be published under
that will be used to customize the header, footer, and style used on the Store Locator page and each Location Page
for each location which will be set to locations.abcbrand.com/location-slug/
site that will be setup to be hosted under locations.abcbrand.com/
Note: Each instance of our platform is configured with a "directory depth" that is used to specify what the URLs will look like for each of the Sites. In the below example, it is set to 1
which would allow you to publish sites under /example-location-slug/
Using the
POST /api/v2/businesses/
The returned business.id
will be used in later requests
You will use the returned theme.id
in later requests
POST /api/v2/sites/
PUT /api/v2/themes/:theme_id/
For each location, we will be creating a location and a location page (site)
POST /api/v2/locations/
You will use the returned location.id
in the next request
POST /api/v2/sites/
POST /api/v2/sites/
The returned site.id
will be used in later requests
In step 1, the site that was created has a blank home page. So we will now update the home page to add the store locator. This will also override the default location page (site) content that would normally show for that theme_id
GET /api/v2/pages/?site_id=:site_id
PUT /api/v2/pages/:page_id/
A with header and footer and location page content is added here
See
Assign the theme_id
from above to that . We will leave this Site as unpublished as it is only used as a template.
For more details on site override view
and also pass the location_url
which is used to link to the location page from the store locator.
under the same location_url from above and using the business_id
, location_id
, and theme_id
from previous requests.
We will then publish a Store Locator under locations.abcbrand.com
and we will pass /lp/
as the base_directory
which is a special method to support rendering the store locator under the root domain.
We will (there should only be one) and use it's page.id
to update the content in the next step. The home page will be the one with the path
set to /
(slash)
Start to finish examples of creating everything you need for location pages and a store locator