Get Theme 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:

  1. Inspecting the files and assets of a theme.
  2. Managing or modifying theme components programmatically.
  3. Analyzing the organization of the theme for customization or debugging.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

NameTypeRequiredDescriptionExample
theme_idstringYesThe unique ID of the theme for which the doctree is requested.1500021b-88ed-4750-bbc5-97ec98351dc0

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Successful Response

FieldTypeDescriptionExample
layoutarrayArray of layout files included in the theme. Each object contains the id and location.See below for nested fields.
layout.idstringUnique identifier for the layout file.af02b274-2ac3-4f2f-af8f-d4430abfff9f
layout.locationstringPath or location of the layout file.theme.liquid
templatesarrayArray of template files included in the theme. Each object contains the id and location.See below for nested fields.
templates.idstringUnique identifier for the template file.ce95ad88-5f4a-4cbc-8180-4c3e5d0caf8b
templates.locationstringPath or location of the template file.404.liquid
sectionsarrayArray of section files included in the theme. Each object contains the id and location.See below for nested fields.
sections.idstringUnique identifier for the section file.bf7065ed-c498-4d44-be04-03900db3e80e
sections.locationstringPath or location of the section file.accessories_list.liquid
snippetsarrayArray of snippet files included in the theme. Each object contains the id and location.See below for nested fields.
snippets.idstringUnique identifier for the snippet file.e026b4a2-9063-4bcd-8ff4-022e4dca804e
snippets.locationstringPath or location of the snippet file.accessories_list_css.liquid
assetsarrayArray of asset files included in the theme. Each object contains the id and location.See below for nested fields.
assets.idstringUnique identifier for the asset file.eca9db3a-18e6-4dee-b8f2-60da7d589302
assets.locationstringPath or location of the asset file.theme.css
configarrayArray of configuration files included in the theme. Each object contains the id and location.See below for nested fields.
config.idstringUnique identifier for the configuration file.429e1998-6ec0-45b4-b6f5-42182cf05fac
config.locationstringPath or location of the configuration file.settings_data.json
localesarrayArray of localization files included in the theme. Each object contains the id and location.See below for nested fields.
locales.idstringUnique identifier for the localization file.8e966bb3-d02c-497e-b3a4-3090c76fc19a
locales.locationstringPath 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.

FieldTypeExampleDescription
errorString "store is not active"Indicates an error encountered during the process

Error Detail

Status CodeMessagePossible ReasonExample Response
400Bad RequestInvalid input format or request structure (e.g., missing required fields or incorrect data types).Bad Request
UnauthorizedThe request is missing valid authentication credentials or the credentials provided are invalid.Unauthorized

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!