Qrable · Your price list on your own website

All sections

Every section as one simple list, without the headings. Handy for developers who lay the menu out their own way, such as tabs or cards.

Use it

The snippet always keeps headings, so this one is for code. A few lines of JavaScript on your page (add ?format=styled for your Qrable look):

<script src="…/app/plugins/satori-manifest/build/js/price-list-element.js" defer></script>
<div id="menu"></div>
<script>
	fetch( '…/wp-json/satori-manifest/v1/manifests/harbour-kitchen/sections?format=styled' )
		.then( ( r ) => r.json() )
		.then( ( sections ) => {
			document.getElementById( 'menu' ).append( ManifestPriceList.render( sections ) );
		} );
</script>

See it on an example restaurant website →

For developers

GET…
VariationRequestSee it
As dataharbour-kitchen/sectionsExample pageResponse
Styledharbour-kitchen/sections?format=styledExample pageResponse
Only under Main Menuharbour-kitchen/sections?heading=Main%20MenuExample pageResponse

Options

OptionWhat it does
nameOnly these sections (see Chosen sections).
headingOnly the sections under these headings.
OptionValuesWhat it does
formatjson (default), styledjson gives the data only. styled gives the same data plus the look the client set up in Qrable: style (colours, fonts and CSS for every part), each heading's and section's own css, allergen icons and the allergen key. Always JSON.

What comes back

An array of sections in page order; the X-WP-Total header gives the count. Each section says which heading it sits under (null when none), and _links.self is its own address.

[
  {
    "id": "s_e95e615f",
    "title": "Breakfast",
    "description": "Served until 2pm daily…",
    "icon": null,
    "image": null,
    "items": [ … ],
    "heading": { "id": "s_03334e1c", "title": "Main Menu" },
    "_links": { "self": […], "up": […] }
  },
  …
]

Live response

Pick a variation above, then switch between the plain JSON and the styled JSON.