patch https://{shopdomain}.myshoplaza.com/openapi/2022-01/themes//publish
Requires
write_themes
access scope. More access scope
The Publish Theme API sets a theme as the currently active or published theme for the store. Only one theme can be active at any given time, and using this API will replace the current active theme with the specified theme.
This API is especially useful for:
- Programmatically activating a newly created or modified theme.
- Automating the theme publishing process for store updates.
Request Parameters
Public Request Parameters
Path Parameters
Name | Type | Description | Example |
---|---|---|---|
theme_id | string | The unique ID of the theme to be published. | 1500021b-88ed-4750-bbc5-97ec98351dc0 |
Response Explanation
Public Response Parameters
Successful Response
Field | Type | Description | Example |
---|---|---|---|
id | string | The unique ID of the theme. | 1500021b-88ed-4750-bbc5-97ec98351dc0 |
merchant_theme_id | string | The merchant-specific ID of the theme. | b3cb6968-2288-4b7e-afcb-62a1b1fa3e4c |
theme_version_id | string | The version ID of the theme. | 16978 |
name | string | The name of the theme. | Wind |
locale | string | The locale of the theme. | en-US |
published | string | Indicates whether the theme is published (1 for yes, 0 for no). | 1 |
status | string | The status of the theme. | 1 |
updated_at | string | Timestamp when the theme was last updated. | 1735010885 |
publish_time | string | Timestamp when the theme was published. | 1735010885 |
price | array | Pricing information for the theme. | [] |
revoke_publish_id | string | ID used to revoke publishing, if applicable. | "" |
Error Response
Error responses in the API can be represented using two different fields: errors
and error
. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.
Field | Type | Example | Description |
---|---|---|---|
error | String | "store is not active" | Indicates an error encountered during the process |
Error Detail
Status Code | Message | Possible Reason | Example Response |
---|---|---|---|
400 | Bad Request | Invalid input format or request structure (e.g., missing required fields or incorrect data types). | Bad Request |
Unauthorized | The request is missing valid authentication credentials or the credentials provided are invalid. | Unauthorized |