Read a catalog
get_catalogReturn an existing catalog as a DSL document — its pages, grids and the product ids on every page — plus pages: EVERY real page with the zero-based index that edit_catalog ops take, its kind, collection label and what is on it. Page indexes are the ones in pages, not positions in document.pages: the document folds a collection that spills over several pages into one entry, so it can be shorter than the catalog. Also blocks (EVERY content block on each page, keyed or not, with ids such as "p1-text-2" and the html a text block holds), chrome (header, footer and page styling) and productCell: the listing design every product tile renders, as blocks with ids (photos, details text with its fields and sizes, shapes), where it lives (how many tiles inherit the catalog default versus carrying their own), and which products deviate. It is where edit_catalog's indexes and ids come from; the catalog id comes from list_catalogs. Anything the DSL cannot express is listed under unsupported rather than omitted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| catalogId | Yes | Catalog id, as returned by list_catalogs |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | Yes | Every real page, with the index edit_catalog ops take | |
| blocks | No | The content blocks on each page, with their ids | |
| chrome | No | Header, footer and page styling | |
| design | No | Title, page size, price format and branding, as update_catalog changes them | |
| document | Yes | The catalog as a foldsquare.catalog/v1 document | |
| catalogId | Yes | ||
| productCell | No | The listing design every product tile renders, as blocks with ids | |
| unsupported | No | What the document cannot express |