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
…| Variation | Request | See it | |
|---|---|---|---|
| As data | harbour-kitchen/sections | Example page | Response |
| Styled | harbour-kitchen/sections?format=styled | Example page | Response |
| Only under Main Menu | harbour-kitchen/sections?heading=Main%20Menu | Example page | Response |
Options
| Option | What it does |
|---|---|
name | Only these sections (see Chosen sections). |
heading | Only the sections under these headings. |
| Option | Values | What it does |
|---|---|---|
format | json (default), styled | json 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.