Skip to content

Themes

Themes and theme files. Every example sets SOOQUNA_TOKEN from the environment; see authentication. Responses are from a test store, cut to two items per list.

Endpoint Method Path
Add a theme from the library POST /themes
List themes GET /themes
Upload a theme (.zip) POST /themes/upload
Get a theme GET /themes/{id}
Rename a theme PATCH /themes/{id}
Duplicate a theme POST /themes/{id}/duplicate
Publish a theme POST /themes/{id}/publish
Delete a theme DELETE /themes/{id}
Download a theme as a .zip GET /themes/{id}/download
List a theme’s files GET /themes/{id}/files
Read a theme file GET /themes/{id}/file
Write a theme file PUT /themes/{id}/file
Open a file in the code editor GET /themes/{id}/code/file
Save a file with conflict detection PUT /themes/{id}/code/file
Delete a theme file DELETE /themes/{id}/code/file
Rename a theme file POST /themes/{id}/code/rename
List a file’s saved versions GET /themes/{id}/code/versions
Read a saved version of a file GET /themes/{id}/code/versions/{vid}
Restore a saved version of a file POST /themes/{id}/code/versions/{vid}/restore
List what uses a file GET /themes/{id}/references
Run the theme check POST /themes/{id}/check
Check unsaved content of a file POST /themes/{id}/check/file
Upload a theme asset POST /themes/{id}/assets
List restore points GET /themes/{id}/snapshots
Create a restore point POST /themes/{id}/snapshots
Restore the theme to a restore point POST /themes/{id}/snapshots/{sid}/restore
Add an alternate template POST /themes/{id}/templates

POST /themes · Scope: write_themes

Terminal window
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"library_key": "sahil"}'
Response 201
{
"created_at": "2026-10-18T09:30:00Z",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000046",
"latest_version": "1.1.0",
"library_key": "sahil",
"library_version": "1.1.0",
"name": "Sahil",
"role": "unpublished",
"source": "library",
"update_available": false,
"updated_at": "2026-10-18T09:30:00Z",
"version": 1
}

GET /themes · Scope: read_themes

Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/themes" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"
Response 200
{
"data": [
{
"created_at": "2026-10-18T09:30:00Z",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000046",
"latest_version": "1.1.0",
"library_key": "sahil",
"library_version": "1.1.0",
"name": "Sahil",
"role": "unpublished",
"source": "library",
"update_available": false,
"updated_at": "2026-10-18T09:30:00Z",
"version": 1
}
]
}

POST /themes/upload · Scope: write_themes

Send the .zip as the body with Content-Type: application/zip.

Terminal window
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/upload" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/zip" \
--data-binary @sahil-eid.zip

GET /themes/{id} · Scope: read_themes

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"
Response 200
{
"created_at": "2026-10-18T09:30:00Z",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000046",
"latest_version": "1.1.0",
"library_key": "sahil",
"library_version": "1.1.0",
"name": "Sahil",
"role": "unpublished",
"source": "library",
"update_available": false,
"updated_at": "2026-10-18T09:30:00Z",
"version": 1
}

PATCH /themes/{id} · Scope: write_themes

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X PATCH "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-f0c3-73c2-8be6-b02e03b23165" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Sahil (Eid)"}'

POST /themes/{id}/duplicate · Scope: write_themes

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-0753-74ce-894f-8a6cfd2e290d/duplicate" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"

POST /themes/{id}/publish · Scope: write_themes

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-a154-7e3e-8469-fb60de553c57/publish" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"

DELETE /themes/{id} · Scope: write_themes

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X DELETE "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-f0c3-73c2-8be6-b02e03b23165" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"

GET /themes/{id}/download · Scope: read_themes

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-31fa-74d9-8a75-bfa9d5956a52/download" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-o sahil.zip

GET /themes/{id}/files · Scope: read_themes

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/files" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"
Response 200
{
"data": [
{
"modified": false,
"path": "assets/back-in-stock.js",
"sha": "07e1262d2e58cfd08fed9525b25e911db869ebc3f5a2db854d86b6da7f5601fd",
"size": 2415,
"updated_at": "2026-10-18T09:30:00Z"
},
{
"modified": false,
"path": "assets/base.css",
"sha": "9b083fbe7035e7b32638a76653a84152e7a88fdfb7fe7e22061550a27a9981db",
"size": 50265,
"updated_at": "2026-10-18T09:30:00Z"
}
]
}

GET /themes/{id}/file · Scope: read_themes

Parameter In Description
id path The resource’s ID.
path query For example templates/index.json.
Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/file?path=templates%2Findex.json" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"

PUT /themes/{id}/file · Scope: write_themes

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X PUT "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-475c-7384-8181-3e210a78239d/file" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"path": "snippets/eid-banner.liquid",
"content": "<p class=\"eid\">{{ '\''eid.banner'\'' | t }}</p>"
}'

GET /themes/{id}/code/file · Scope: read_themes

Parameter In Description
id path The resource’s ID.
path query For example sections/header.liquid.
Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-b6c1-7e31-8320-3f947513bbf5/code/file?path=sections%2Fheader.liquid" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"

PUT /themes/{id}/code/file · Scope: write_themes

Pass the base_sha you read; a newer save by someone else gets 409 with their content.

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X PUT "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-b6c1-7e31-8320-3f947513bbf5/code/file" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"path": "snippets/eid-banner.liquid",
"content": "<p class=\"eid\">{{ '\''eid.banner'\'' | t }}</p>",
"create": true
}'

DELETE /themes/{id}/code/file · Scope: write_themes

Parameter In Description
id path The resource’s ID.
path query For example snippets/eid-banner.liquid.
Terminal window
curl -X DELETE "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-b6c1-7e31-8320-3f947513bbf5/code/file?path=snippets%2Feid-banner.liquid" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"

POST /themes/{id}/code/rename · Scope: write_themes

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-fbe3-7f5b-852a-2375f6d83ee9/code/rename" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"path": "snippets/eid-banner.liquid",
"new_path": "snippets/eid-strip.liquid"
}'

GET /themes/{id}/code/versions · Scope: read_themes

Parameter In Description
id path The resource’s ID.
path query For example sections/header.liquid.
Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-393e-7637-8f04-ca12cb4555cb/code/versions?path=sections%2Fheader.liquid" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"

GET /themes/{id}/code/versions/{vid} · Scope: read_themes

Parameter In Description
id path The resource’s ID.
vid path The vid ID.
Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-037f-7e2a-8fcd-53d495e53d24/code/versions/0193a1b2-bef5-7711-8060-c0f60de80743" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"

POST /themes/{id}/code/versions/{vid}/restore · Scope: write_themes

Parameter In Description
id path The resource’s ID.
vid path The vid ID.
Terminal window
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-73b7-7430-8bcd-96c8863373e8/code/versions/0193a1b2-ae62-7575-8ba3-32f821888101/restore" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"path": "sections/header.liquid"}'

GET /themes/{id}/references · Scope: read_themes

Parameter In Description
id path The resource’s ID.
target query For example snippets/product-card.liquid.
Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/references?target=snippets%2Fproduct-card.liquid" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"
Response 200
{
"data": [
{
"line": 10,
"path": "sections/featured-collection.liquid",
"text": "<li>{% render 'product-card', product: product, sizes: '(min-width: 990px) 25vw, 50vw' %}</li>"
},
{
"line": 25,
"path": "sections/main-collection.liquid",
"text": "<li>{% render 'product-card', product: product, sizes: '(min-width: 990px) 25vw, 50vw', eager: eager %}</li>"
}
]
}

POST /themes/{id}/check · Scope: write_themes

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/check" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"
Response 200
{
"problems": [
{
"line": 40,
"message": "<img> without width and height causes layout shift",
"path": "layout/theme.liquid",
"severity": "warning"
}
]
}

POST /themes/{id}/check/file · Scope: write_themes

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-9296-7481-870c-298744417c48/check/file" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"path": "snippets/eid-banner.liquid", "content": "{% if %}"}'

POST /themes/{id}/assets · Scope: write_themes

Send the file as the body; name it with ?name=.

Parameter In Description
id path The resource’s ID.
name query For example logo.svg.
Terminal window
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-d586-7e30-865b-b5d523c2ea11/assets?name=logo.svg" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: image/svg+xml" \
--data-binary @logo.svg

GET /themes/{id}/snapshots · Scope: read_themes

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/snapshots" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"
Response 200
{"data": []}

POST /themes/{id}/snapshots · Scope: write_themes

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-e506-7f8e-88e5-d91e7fbd9ecb/snapshots" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Before Ramadan banner"}'

POST /themes/{id}/snapshots/{sid}/restore · Scope: write_themes

Parameter In Description
id path The resource’s ID.
sid path The sid ID.
Terminal window
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-3713-7414-8ee8-0537214a9614/snapshots/0193a1b2-07ea-7a69-8f04-e63849649165/restore" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"

POST /themes/{id}/templates · Scope: write_themes

Copies the default template of the type (or from) to <type>.<suffix>.json.

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c29b-7faf-8b58-bd82cdfa2e75/templates" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"type": "product", "suffix": "gift"}'

Was this page helpful?