Sign Customiser

Navigation

Dark mode

Customisers

duplicate_customiser

write

Duplicate customiser

Copy page

Start a new customiser from an existing one, for example to try changes without touching the live one.

Overview

Copies one customiser of the connected Store into the same Store, with every option, size, font, price list, form, label, colour scheme and language. The copy is named name, or "Copy of" and the source name when name is omitted. It is live only when the source is live and the plan has room for one more live customiser; otherwise it is inactive. The source does not change and no product is created. It requires the customisers:write scope and an idempotency_key, and supports dry_run.

Permission

Requires thecustomisers:writepermission. A connection without it answersinsufficient_scopenaming the permission to approve.

Annotations

readOnlyHintfalse
destructiveHintfalse
idempotentHinttrue
openWorldHinttrue

Prerequisites

  • A customiser id from list_customisers.
  • A merchant has connected this store and approved the customisers:write scope.

Side effects

  • Creates one customiser, a copy of the source, which can be live on the storefront.
  • Spends one unit of the store option-write budget.
  • Claims the idempotency_key for at least 24 hours.

Arguments

customiser_idintegerrequired

The id of the customiser to copy, from list_customisers.

namestring

The name of the copy. Omit it for "Copy of" and the source name.

idempotency_keystringrequired unless dry_run is true

A client-generated key unique to this logical write, such as a UUID. Required: repeating the call with the same key and the same arguments replays the original result instead of writing twice, and the same key with different arguments is an idempotency_key_conflict.

dry_runboolean

When true, the source and the name is checked and nothing is written: the result is the same verdict the apply would have reached, and a problem the apply would have raised comes back as the same tool error. Defaults to false. A dry run claims no key.

Result

The new customiser, with the fields get_customiser publishes, and its merchant admin link. A dry run returns the verdict, including will_be_active, and copies nothing.

request_idstringalways present
storeobjectalways present
store.idintegeralways present
store.namestringalways present
source_customiser_idintegeralways present
customiserobject

The new customiser, with the fields get_customiser publishes. Absent on a dry run.

idempotent_replayboolean

True when this call replayed a previously recorded response for the same idempotency_key instead of applying the write again.

dry_runboolean

Present and true only when dry_run was requested.

validboolean

Present only on a dry run, and always true: a failing dry run returns a tool error instead.

verdictobject

Present only on a dry run: the duplicate verdict, including will_be_active.

linksobject

The merchant admin page for the copy. Absent on a dry run.

links.admin_urlstringalways present

Error cases

insufficient_scope

The connection was approved without customisers:write.

pricing_model_deprecated

The source uses the withdrawn fixed-height pricing model and cannot be copied.

rate_limited

The store option-write budget is spent. Wait retry_after seconds.

resource_not_found

No customiser with that id belongs to this store, or it is deleted. Use list_customisers.

validation_failed

The name is longer than 255 characters. The pointer names it.

Copy a customiser under a new name

tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "duplicate_customiser",
    "arguments": {
      "customiser_id": 42,
      "name": "Neon sign builder (wholesale)",
      "idempotency_key": "e5f6a7b8-c9d0-4e1f-8a2b-3c4d5e6f7a8b"
    }
  }
}
result
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "structuredContent": {
      "request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t",
      "store": {
        "id": 12,
        "name": "Demo Signs"
      },
      "source_customiser_id": 42,
      "customiser": {
        "id": 43,
        "name": "Neon sign builder (wholesale)",
        "active": false,
        "pricing_model": "frame_fit",
        "sign_category": "neon"
      },
      "idempotent_replay": false,
      "links": {
        "admin_url": "https://web.signcustomiser.com/customisers/43"
      }
    }
  }
}

A customiser id from another store (error)

tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "duplicate_customiser",
    "arguments": {
      "customiser_id": 999,
      "dry_run": true
    }
  }
}
result
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "isError": true,
    "structuredContent": {
      "error": {
        "code": "resource_not_found",
        "title": "Resource not found",
        "detail": "The requested resource does not exist or does not belong to the authenticated store.",
        "recovery": "The identifier does not exist in this store. Use the matching list tool to rediscover a valid id."
      }
    }
  }
}

Type a question and press Enter. Use the arrow keys to move between the results.