Schema clone endpoint

Schema cloning creates a complete copy of a venue schema: the full seating layout, all sections, rows and seats, seat metadata and coordinates, and pricing zones (copied as templates, not with the same IDs). Use it to create variations of an existing layout, set up similar venues quickly, or duplicate a schema for testing.

Cloning is asynchronous. Initiating a clone returns an operation UUID immediately; the actual copy runs in the background and you poll a result endpoint until it finishes.

Authentication

Both endpoints belong to the private Booking API and require the X-API-Key header with your Secret API key:

X-API-Key: {organizationToken}

The Secret API key is available in the Editor admin panel (Organization Details, “Secret API key”) and is also returned by the Editor login response as user.organizationToken for organization administrators. Treat it as an opaque string and send the value as-is.

Step 1 - Initiate the clone

POST /api/private/v2.0/schemas/clone/{id}
Parameter In Required Description
id path yes Numeric ID of the schema to clone.

The response body is the UUID of the clone operation:

curl -X POST \
  "https://booking.seatmap.pro/api/private/v2.0/schemas/clone/1001" \
  -H "X-API-Key: ${ORG_TOKEN}"
# 200
# "123e4567-e89b-12d3-a456-426614174000"
Status Meaning
200 Clone started; body contains the operation UUID.
403 Your organization has no access to this schema.
404 Schema not found.

Step 2 - Poll the result

GET /api/private/v2.0/schemas/clone/result/{uuid}
Parameter In Required Description
uuid path yes Operation UUID returned by the clone initiation call.
curl "https://booking.seatmap.pro/api/private/v2.0/schemas/clone/result/123e4567-e89b-12d3-a456-426614174000" \
  -H "X-API-Key: ${ORG_TOKEN}"

While the clone is still running:

{
  "uuid": "123e4567-e89b-12d3-a456-426614174000",
  "state": "IN_PROCESS",
  "schemaId": 1001,
  "newSchemaId": null
}

When it completes:

{
  "uuid": "123e4567-e89b-12d3-a456-426614174000",
  "state": "DONE",
  "schemaId": 1001,
  "newSchemaId": 1002
}

newSchemaId is the ID of the cloned schema — use it for all subsequent API calls against the copy.

Operation states

state Meaning
CREATED Operation registered, copying has not started yet.
IN_PROCESS Copying is in progress — keep polling.
DONE Terminal. The clone is ready; read newSchemaId.
ERROR Terminal. The clone failed; retry the initiation call.

Recommended polling interval: 2-5 seconds for typical schemas.

Polling snippet

async function cloneSchema(schemaId, orgToken, baseUrl = 'https://booking.seatmap.pro') {
  const headers = { 'X-API-Key': orgToken };

  const startRes = await fetch(`${baseUrl}/api/private/v2.0/schemas/clone/${schemaId}`, {
    method: 'POST',
    headers,
  });
  if (!startRes.ok) throw new Error(`Clone initiation failed: ${startRes.status}`);
  const operationUuid = await startRes.json();

  const deadline = Date.now() + 60_000;
  while (Date.now() < deadline) {
    const res = await fetch(`${baseUrl}/api/private/v2.0/schemas/clone/result/${operationUuid}`, {
      headers,
    });
    if (!res.ok) throw new Error(`Clone result poll failed: ${res.status}`);
    const result = await res.json();
    if (result.state === 'DONE') return result.newSchemaId;
    if (result.state === 'ERROR') throw new Error(`Clone ${operationUuid} failed`);
    await new Promise((resolve) => setTimeout(resolve, 3_000));
  }
  throw new Error(`Clone ${operationUuid} did not complete in time`);
}

Notes

  • The clone is a fully independent schema: edits to the copy never affect the source.
  • Pricing zones are copied as templates; price assignments to a specific event are not carried over.
  • The authentication, initiation, and polling flow shown above is exercised by our cross-product end-to-end test suite.

See also

Type a feature, setting, endpoint or SDK method.