For the web server in front of the firms' websites: answers a page request with the site's built index.html, its head filled in for the firm found by the address. The firm is the one whose verified domain is `host`, or else the one whose slug is `slug`. The head holds the title, description, Open Graph tags, schema.org `MovingCompany` data and a `<script id="firm" type="application/json">` block with the firm's `key`, `slug`, `base` (the path its pages sit under: empty on its own domain, else `/` and its slug), `name`, `live`, public `config`, `photos` (each slot's photo paths by width) and `job_types` (the types offered online, as `GET /v1/config` gives them). An unknown address or a suspended firm is answered with a plain not found page.
Parameters
hoststring, in the query
The host the visitor asked for; its case, port and trailing dot are ignored.
slugstring, in the query
The firm's slug, from an address such as `app.<domain>/<slug>`.
This server has no built site (`SITE_INDEX` is not set).
GET/v1/site/firm
A firm's website data
The `<script id="firm">` block `GET /v1/site/shell` puts in a page's head, as JSON, for the firm found by the address in the same way; it needs no built site. The website's local development server starts from it. An unknown address or a suspended firm is not found.
Parameters
hoststring, in the query
The host the visitor asked for; its case, port and trailing dot are ignored.
Needs the settings.write permission. An empty `domain` when none is set.
Response 200 · SiteDomain
Done.
domainstring, required
txt_namestring, required
The DNS name of the TXT record that proves the domain is the firm's, e.g. `_doroutes.www.example.co.uk`.
txt_valuestring, required
The value the TXT record must hold.
verifiedboolean, required
site_urlstring, required
The address the website is served at now, e.g. `https://www.example.co.uk` once the domain is verified, else under the DoRoutes address with the firm's slug.
Needs the settings.write permission. Marks the domain verified when its TXT record `txt_name` holds `txt_value`; the website is then served at it. 409 when another firm has verified the same domain.
Needs the settings.write permission. A JPEG, PNG or WebP file of at most 10 MB and 40 megapixels, checked by its content. It is turned upright by its EXIF orientation, its metadata is dropped, and it is stored as WebP at 1600, 960 and 480 px wide (never wider than it is). It replaces any photo already in the slot. A transparent background is kept.
Response 200 · object
Done.
photoSitePhoto, required
idstring, required
slotstring, required
urlsobject, required
The API path of the photo at each width, by width (`1600`, `960`, `480`).
Needs the settings.write permission. Records who confirmed the privacy and cookie notices and when; the website is then live. 400 while either notice is empty. Confirming again records the new confirmation; editing the notices later keeps the website live.
Needs the settings.write permission. The notices written from DoRoutes' template with the business's name, address, email and phone as they are now, and Google reCAPTCHA when it is on. Nothing is saved: the business edits them and saves them as `site_privacy_notice` and `site_cookie_notice`.