Version: 202506
Update theme file
PATCH/openapi/2025-06/themes/:theme_id/doc
Replace the whole content of the specified file. Changes to the default theme's files take effect on the storefront immediately; every change is recorded in the file's version history.
Request
Path Parameters
theme_id stringrequired
Theme's unique identifier
- application/json
- Body
- Example
Bodyrequired
doc objectrequired
The file to update, containing its type, location, and new content
typestringrequired
The type of file: layout, templates, sections, snippets, assets, config, locales, blocks
locationstringrequired
Location
contentstringrequired
Content
json
{
"doc": {
"type": "string",
"location": "string",
"content": "string"
}
}
Responses
- 200
OK
- application/json
- Schema
- Example
Schema
codestring
error code
messagestring
error message
data object
object
json
{
"code": "string",
"message": "string",
"data": {}
}