Gallery Platform API
Reference

Restore a publication version

Stages a past version as the publication's working draft (non-destructive — save to make it current). Does not change whether it is published.

POST
/gallery/publications/{id}/restore-version

Stages a past version as the publication's working draft (non-destructive — save to make it current). Does not change whether it is published.

Authorization

bearerAuth publications:update
AuthorizationBearer <token>

A gallery API key, sent as Authorization: Bearer gpk_… (or the x-api-key header).

In: header

Scope: publications:update

Path Parameters

id*string

The publication id.

Header Parameters

Idempotency-Key?string

Optional. Send a unique key per logical operation to make retries safe: a retry with the same key replays the stored success for 14 days instead of re-running the write. Reusing a key with a different body returns 400.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Restore a past version into the record's working draft.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

{  "id": "string",  "title": "string",  "subtitle": "string",  "publisher": "string",  "isbn": "string",  "editor": "string",  "author": "string",  "page_count": -9007199254740991,  "publication_year": -9007199254740991,  "dimensions_text": "string",  "inventory_number": "string",  "description": "string",  "stock_quantity": -9007199254740991,  "availability_state": "available",  "cover_image_path": "string",  "published_at": "string",  "visibility": "public",  "show_price_publicly": true,  "price_cents": -9007199254740991,  "currency": "string",  "metadata": {    "property1": "string",    "property2": "string"  },  "created_at": "string",  "updated_at": "string",  "save_state": "new"}