Get Theme DocTree

Retrieve details of a specific theme's doc-tree using its unique identifier.

🔒

Requires write_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

📘

Path Parameters

ParameterTypeRequiredExampleDescription
theme_idstringYes1500021b-88ed-4750-bbc5-97ec98351dc0Theme's unique identifier.

Response Explanation

Public Response Parameters

📘

Successful Response

ParameterTypeExampleDescription
codestring"success"Status code of the response
messagestring"OK"Descriptive message of the response
data.layoutsarray[object][{...}]Array of layout files
data.templatesarray[object][{...}]Array of template files
data.sectionsarray[object][{...}]Array of section files
data.snippetsarray[object][{...}]Array of snippet files
data.assetsarray[object][{...}]Array of asset files
data.configsarray[object][{...}]Array of configuration files
data.localesarray[object][{...}]Array of localization files

File Object Structure (applies to all arrays)

ParameterTypeExampleDescription
idstring"file_123"Unique identifier for the file
locationstring"templates/product.liquid"Relative path to the file in the theme

Error Response

FieldTypeExampleDescription
codestringInvalidParameterError http message
messagestring``Error message

API Structure Overview

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