Skip to main content
POST
Promote the test catalog to live (meters and products).

Authorizations

x-api-key
string
header
required

API key for authentication. You can find your API key in the Creem dashboard under Settings > API Keys.

Query Parameters

dry_run
boolean

Send true to preview: every item runs as its upsert’s dry run and is rolled back, so nothing is written in live (no row, no event, no Stripe call). The answer has the same shape as the real run’s, with write_result.dry_run true. Page a dry run with cursor like a real run.

Body

application/json
select
object

What to promote, per kind (meters, products; product groups and discounts come later): "all" or a list of test ids. Omit select to promote everything; a kind left out of a sent select is not promoted. A test id the test store doesn’t have answers 400 reference_not_found (details.field, details.key) before anything runs.

cursor
string | null

Null (or omitted) on a run’s first call, then the next_cursor of the previous answer, with the same select and the same dry_run. A cursor is valid for 24 hours; any other cursor answers 400 invalid_cursor.

force
boolean

Real run only. Before its first write, promote checks every write of the selection together in one rolled-back transaction; when one fails, nothing is written and the answer’s validation.written is false. Send true to write anyway: each write still runs its own checks, and an item whose write is refused is a conflict or failed item. Defaults to false.

Response

The page’s items, also when some of them are conflict, failed or blocked.

run_id
string
required

The run (cprun_…), the same on every page of it.

dry_run
boolean
required

true on a dry run: nothing was written.

summary
object
required

One count per result for this page’s items; every result always present.

items
object[]
required

This page’s items: meters, then products, then the meters test archived, each in test id order. Every item comes once per run. Empty on a page that only ran the check.

validation
object | null
required

On the real run’s first page: how its writes were checked before the first one. Null otherwise.

next_cursor
string | null
required

Send it as cursor with the same select and dry_run to go on; null when the run is complete.