Skip to content

Restore a build (deprecated)

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

Deprecated: use the route that makes a theme use a version. Makes the theme use one of its builds, named by its deployment ID or version ID, and returns the older list of builds. It answers 202. Needs the deploy:storefront scope.

Required scopes: deploy:storefront

id
required
string

The theme ID.

deploymentId
required
string

The deployment ID or the version ID of the build.

storeRef
required
string

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

Media typeapplication/json
Array<object>
object
error
required

Why the build failed, or null.

string
nullable
created_at
required

When the build was created, as an ISO 8601 timestamp.

string format: date-time
build_finished_at
required

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

string format: date-time
nullable
id
required

The deployment or version ID.

string
status
required

The deployment’s status.

string
current
required

Whether the theme uses this build.

boolean
serving
required

Whether the storefront serves this build now.

boolean
restorable
required

Whether the build can be used.

boolean

Example generated

[
{
"error": "example",
"created_at": "2026-04-15T12:00:00Z",
"build_finished_at": "2026-04-15T12:00:00Z",
"id": "example",
"status": "example",
"current": true,
"serving": true,
"restorable": true
}
]

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"
}

The request conflicts with the resource’s current state.

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"
}