get https://{shopdomain}.myshoplaza.com/openapi/2022-01/themes//doctree
Requires
read_themes
access scope. More access scope
The Get Theme Doctree API retrieves the structural details of a theme, including its layouts, templates, sections, snippets, assets, configuration files, and locales. This allows developers to analyze the theme's structure and contents programmatically.
This API is especially useful for:
- Inspecting the files and assets of a theme.
- Managing or modifying theme components programmatically.
- Analyzing the organization of the theme for customization or debugging.
Request Parameters
Public Request Parameters
Name | Type | Required | Description | Example |
---|---|---|---|---|
theme_id | string | Yes | The unique ID of the theme for which the doctree is requested. | 1500021b-88ed-4750-bbc5-97ec98351dc0 |
Response Explanation
Public Response Parameters
Successful Response
Field | Type | Description | Example |
---|---|---|---|
layout | array | Array of layout files included in the theme. Each object contains the id and location . | See below for nested fields. |
layout.id | string | Unique identifier for the layout file. | af02b274-2ac3-4f2f-af8f-d4430abfff9f |
layout.location | string | Path or location of the layout file. | theme.liquid |
templates | array | Array of template files included in the theme. Each object contains the id and location . | See below for nested fields. |
templates.id | string | Unique identifier for the template file. | ce95ad88-5f4a-4cbc-8180-4c3e5d0caf8b |
templates.location | string | Path or location of the template file. | 404.liquid |
sections | array | Array of section files included in the theme. Each object contains the id and location . | See below for nested fields. |
sections.id | string | Unique identifier for the section file. | bf7065ed-c498-4d44-be04-03900db3e80e |
sections.location | string | Path or location of the section file. | accessories_list.liquid |
snippets | array | Array of snippet files included in the theme. Each object contains the id and location . | See below for nested fields. |
snippets.id | string | Unique identifier for the snippet file. | e026b4a2-9063-4bcd-8ff4-022e4dca804e |
snippets.location | string | Path or location of the snippet file. | accessories_list_css.liquid |
assets | array | Array of asset files included in the theme. Each object contains the id and location . | See below for nested fields. |
assets.id | string | Unique identifier for the asset file. | eca9db3a-18e6-4dee-b8f2-60da7d589302 |
assets.location | string | Path or location of the asset file. | theme.css |
config | array | Array of configuration files included in the theme. Each object contains the id and location . | See below for nested fields. |
config.id | string | Unique identifier for the configuration file. | 429e1998-6ec0-45b4-b6f5-42182cf05fac |
config.location | string | Path or location of the configuration file. | settings_data.json |
locales | array | Array of localization files included in the theme. Each object contains the id and location . | See below for nested fields. |
locales.id | string | Unique identifier for the localization file. | 8e966bb3-d02c-497e-b3a4-3090c76fc19a |
locales.location | string | Path or location of the localization file. | ar-SA.json |
Error Response
Error responses in the API can be represented using two different fields: errors
and error
. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.
Field | Type | Example | Description |
---|---|---|---|
error | String | "store is not active" | Indicates an error encountered during the process |
Error Detail
Status Code | Message | Possible Reason | Example Response |
---|---|---|---|
400 | Bad Request | Invalid input format or request structure (e.g., missing required fields or incorrect data types). | Bad Request |
Unauthorized | The request is missing valid authentication credentials or the credentials provided are invalid. | Unauthorized |