Skip to content

List theme versions

GET
/stores/{storeRef}/themes/{id}/versions
curl --request GET \
--url https://apibase.ecomweb.app/api/v1/stores/example/themes/example/versions \
--header 'x-api-key: <x-api-key>'

Returns the theme’s 100 newest versions, newest first, of every kind: catalog releases, builds of your code and links to your own site. Each says whether it is the one in use, whether the storefront serves it, and whether it can be used. A key with only the deploy:storefront scope can call this route.

Required scopes: read:settings or deploy:storefront

id
required
string

The theme ID.

storeRef
required
string

The store’s ref, as returned by GET /stores.

Media typeapplication/json
Array<object>
object
kind
required

release: a catalog release. build: a deployment of your code. link: your own site.

string
Allowed values: release build link
created_at
required

When the version was added, as an ISO 8601 timestamp.

string format: date-time
created_by
required

ID of the user who added it, or null.

string
nullable
unusable_reason

Why the version cannot be used. Only when usable is false.

string
Allowed values: build_failed build_in_progress build_pruned release_withdrawn hosting_not_in_plan
release

The catalog release. Only for a release.

object
theme_id
required

The catalog theme ID.

string
version
required

The release version.

string
build

The build. Only for a build.

object
error
required

Why the build failed, or null.

string
nullable
build_finished_at
required

When the build ended, as an ISO 8601 timestamp, or null.

string format: date-time
nullable
build_seconds
required

How long the build took, in seconds, or null.

number
nullable
deployment_id
required

Deployment ID.

string
status
required

The deployment’s status.

string
artifact
required

source or prebuilt: what was uploaded.

string
link

The linked site. Only for a link.

object
allowed_origins
required

Extra origins the site is served from.

Array<string>
url
required

The site address.

string
status

Deprecated: use build.status. Only for a build.

string
error

Deprecated: use build.error. Only for a build.

string
nullable
restorable

Deprecated: use usable. Only for a build.

boolean
id
required

Version ID.

string
label
required

A short name for the version.

string
current
required

Whether the theme uses this version.

boolean
serving
required

Whether the store’s storefront serves this version now.

boolean
usable
required

Whether the version can be used now. See unusable_reason when it cannot.

boolean

Example

[
{
"kind": "release",
"unusable_reason": "build_failed"
}
]

The key is missing, invalid, revoked or expired.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The resource does not exist in this store.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}