Skip to content

About Theme

Access scope

Multiple access scopes needed — refer to each endpoint for access scope requirements.

The ability to design, upload, and modify themes, suitable for automated operations and custom theme development.

Theme Object

The theme object.

Properties

themeobject
Theme list.
- Hide child properties
isCurrentboolean
Whether the store is currently themed,true or false.
shopThemeNamestring
shop theme name.
createTimestring
shop theme create time (ISO 8601 format).
shopThemeIdstring
shop theme id.
updateTimestring
shop theme update time (ISO 8601 format).
statusstring
Installation status, enumeration: INIT initialization, SUCCESS install success, FAIL install fail.
bash
{
  "theme": {
    "isCurrent": "false",
    "shopThemeName": "Down",
    "createTime": "2024-18-12T08:18:49",
    "shopThemeId": "1",
    "updateTime": "2024-18-12T08:18:49",
    "status": "INIT"
  }
}

POST Add theme assets

For individual store themes, new theme assets are added.

Access scope

Requires ANY of the following access scopes: write_themes

Endpoint

POST /api/202412/themes/{theme_id}/assets 

Request Params

assetsobject
The theme assets.
- Hide child properties
codestring
Define the encoding value of the theme asset.
namestring
Create a new name for the theme asset.
urlstring
Create a new file path for the theme asset.
fileTypestring
Create a new theme asset file type.

Response Data

assetsobject
Create a new theme asset and return the asset information.
- Hide child properties
namestring
Theme asset name.
urlstring
Theme asset path, /asset_directory/asset_filename.extension.
theme_idstring
Store theme id, distinguishing the themes installed in the store.
bash
curl -X POST \ 
https://{shop}.genmystore.com/api/202412/themes/{theme_id}/assets" \ 
-H "X-Genstore-Access-Token: {access_token}" \ 
-H "Content-Type: application/json" \ 
-d '{
	"assets":{
		"code":"PAGE",
		"name":"wishlist",
		"url":"templates/cus.json",
		"fileType":"JSON 、LIQUID"
	}
}'
json
HTTP/1.1 200 OK
{
  "assets": {
    "name": "wishlist",
    "theme_id": "1938530406471172098",
    "url": "templates/cus.json"
  }
}

GET Get theme list

Get themes list.

Access scope

Requires ANY of the following access scopes: read_themes

Endpoint

GET /api/202412/decoration/themes 

Request Params

{}

Response Data

themesarray
Theme list.
- Hide child properties
isCurrentboolean
Whether the store is currently themed,true or false.
shopThemeNamestring
shop theme name.
createTimestring
shop theme create time (ISO 8601 format).
shopThemeIdstring
shop theme id.
updateTimestring
shop theme update time (ISO 8601 format).
statusstring
Installation status, enumeration: INIT initialization, SUCCESS install success, FAIL install fail.
bash
curl -X GET \ 
https://{shop}.genmystore.com/api/202412/decoration/themes" \ 
-H "X-Genstore-Access-Token: {access_token}" \
json
HTTP/1.1 200 OK
{
  "themes": [
    {
      "isCurrent": "false",
      "shopThemeName": "Down",
      "createTime": "2024-18-12T08:18:49",
      "shopThemeId": "1",
      "updateTime": "2024-18-12T08:18:49",
      "status": "INIT"
    }
  ]
}

GET Get theme assert

Retrieve store theme asset information.

Access scope

Requires ANY of the following access scopes: read_themes

Endpoint

GET /api/202412/decoration/assets/{shopThemeId} 

Request Params

assetstring
The resource address of the store theme.

Response Data

shopAssertobject
Asset Information of the store.
- Hide child properties
createTimestring
shop file create time(ISO 8601 format).
contextstring
shop file context.
updateTimestring
shop file update time(ISO 8601 format).
fileTypestring
shop file type, css、gif、js、json、liquid、sv... .
bash
curl -X GET \ 
https://{shop}.genmystore.com/api/202412/decoration/assets/{shopThemeId}" \ 
-H "X-Genstore-Access-Token: {access_token}" \
json
HTTP/1.1 200 OK
{
  "shopAssert": {
    "createTime": "2024-18-12T08:18:49",
    "context": "{\"color_scheme\":\"scheme-1\"}",
    "updateTime": "2024-18-12T08:18:49",
    "fileType": "json"
  }
}