Rename Theme File

🔒

Requires write_themes access scope. More access scope

The Rename Theme File API allows developers to modify the name of an existing documentation file within a specific theme in the Shoplazza store.

This API is especially useful for:

  1. Modifying existing template files' name

Request Parameters

Public Request Parameters

📘

Path Parameters

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

Body Parameters

Parameter

Type

Required

Description

Example

doc

object

Yes

The document object containing update details

{...}

doc.type

string

Yes

The type of file.
• Possible values:
- layout
- templates
- sections
- snippets
- assets
- config
- locales

'layout'

doc.location

string

Yes

The path location of the file to update within the theme

'templates/custom.liquid'

doc.new_location

string

Yes

The new location to replace in the specified file

'templates/newcustom.liquid'

Response Explanation

Public Response Parameters

📘

Successful Response

ParameterTypeExampleDescription
codestring"success"Status code of the response
messagestring"OK"Descriptive message of the response

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!