Delete Theme File

Delete a specific theme's doc file using theme's unique identifier.

🔒

Requires write_themes access scope. More access scope

The Delete Theme File API allows developers to delete a specific documentation file from a theme in your Shoplazza store. It provides a way to remove unwanted or outdated template files, snippet files, or other document types from your theme's structure.

This API is especially useful for:

  1. Removing deprecated or unused template files to clean up your theme.
  2. Deleting outdated snippet files that are no longer needed.
  3. Managing theme file organization by eliminating unnecessary documentation files.
  4. Maintaining a lean theme structure by removing obsolete components.

Request Parameters

Public Request Parameters

📘

Path Parameters

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

Body Parameters

Parameter

Type

Required

Description

Example

type

string

No

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

Defaults to assets.

'layout'

location

string

No

The path location of the file to delete within the theme. Defaults to 'a.js'.

'templates/custom.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!