Get Theme File Versions(All File)

🔒

Requires read_themes access scope. More access scope

The List Theme File Versions API allows developers to retrieve all versions of a theme file, including its metadata and content.

This API is especially useful for:

  1. Reviewing historical versions of a theme files
  2. Reverting to previous file versions

Request Parameters

Public Request Parameters

📘

Path Parameters

ParameterTypeRequiredDescriptionExample
theme_idstringYesUnique identifier of the theme"theme_123456789"

Response Explanation

Public Response Parameters

📘

Successful Response

ParameterTypeExampleDescription
codestring"success"Status code of the response
messagestring"OK"Descriptive message of the response
data.versionsarray of object[{...}]Detailed version object

Version Object

ParameterTypeExampleDescription
idstring"version_987654321"Unique version identifier
versionstring"2"Version number
created_atstring"2025-01-01T00:00:00Z"Timestamp when version was created
theme_idstring"theme_123456789"Parent theme ID
typestring"template"File type (layout/template/section/etc.)
locationstring"templates/product.liquid"Relative path to the file
updated_atstring"2025-01-01T00:05:00Z"Timestamp when version was last updated

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!