Get Theme File Versions(Single File)

🔒

Requires write_themes access scope. More access scope

The List Theme File Versions API allows developers to fetch the version history of a specific documentation file within a theme query by type and location.

This API is especially useful for:

  1. Tracking changes to critical theme files over time
  2. Rolling back to previous versions if needed

Request Parameters

Public Request Parameters

📘

Path Parameters

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

Query Parameters

ParameterTypeRequiredDescriptionExample
typestringNoThe type of file to retrieve versions for (e.g., 'assets', 'layout', 'template'). Defaults to 'layout''template'
locationstringNoThe path location of the file within the theme. Defaults to 'theme.liquid''sections/header.liquid'

Response Explanation

Public Response Parameters

📘

Successful Response

ParameterTypeExampleDescription
codestring"200"The response status code
messagestring"Success"The response message
data.versionsarray[...]Array of version objects containing file version details

Version Object

ParameterTypeExampleDescription
idstring"version_123456789"Unique identifier for this version
versionstring"1.2.3"Version number
created_atstring"2025-06-15T10:30:00Z"Timestamp when this version was created
theme_idstring"theme_123456789"ID of the theme this version belongs to
typestring"layout"Type of the file
locationstring"theme.liquid"Path location of the file
updated_atstring"2025-06-15T10:30:00Z"Timestamp when this 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!