Promote the test catalog to live (meters and products)
Copies the store’s test catalog into live by external_id: each selected test item is matched to the live item with the same key and written as that kind’s keyed upsert (POST /v1/meters, POST /v1/products); a keyed test item without a live match is created with its key. Test is the source for every field it sets; promote never clears a metadata key only live has (conflict), and live items without a test counterpart are not listed and never touched. A test item without a key is needs_key, with ranked candidates and a proposed_external_id: give both sides the same key, then promote again. Archived test items are included only when live has an item with the same key, and a paired meter’s archive state follows test’s.
Every item reports one result; the real run writes only created, updated and unchanged items. Before its first write the real run checks every write together in one rolled-back transaction (one dependency layer at a time above the batch limit) and writes nothing when one fails, unless force is true. The check runs within the time budget too: until it is done a page has no items and a next_cursor, and validation.checked_batches says how far it got. Then the run writes only what it checked: an item changed after the check is not_written (changed_since_check). Items run meters first, then products, then the meters test archived (a meter’s archive is part of its own write, after the products that may stop pricing it), and pages end after a time budget: follow next_cursor with the same select and dry_run until it is null. Every run and item is recorded under run_id, dry runs included.
Requires products:write and meters:write when meters are promoted. Answers 503test_environment_unavailable when the test environment can’t be reached; try again later.
POST
/
v1
/
catalog
/
promote
Promote the test catalog to live (meters and products).
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_runtrue. 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 400reference_not_found (details.field, details.key) before anything runs.
Show child attributes
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 400invalid_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.
Show child attributes
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.
Show child attributes
validation
object | null
required
On the real run’s first page: how its writes were checked before the first one. Null otherwise.
Show child attributes
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.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Creem","colors":{"primary":"#FFBE98","light":"#FFBE98","dark":"#B09CFB"},"logo":{"light":"https://mintcdn.com/creem/-AIVGXbrCJu_8i70/logo/light.svg?fit=max\u0026auto=format\u0026n=-AIVGXbrCJu_8i70\u0026q=85\u0026s=686f06f43a3d7e4c0456e22de64c8bae","dark":"https://mintcdn.com/creem/-AIVGXbrCJu_8i70/logo/dark.svg?fit=max\u0026auto=format\u0026n=-AIVGXbrCJu_8i70\u0026q=85\u0026s=7c9135ca8b2365d6ec3728dc087f694d"},"favicon":"https://mintcdn.com/creem/-AIVGXbrCJu_8i70/favicon.svg?fit=max\u0026auto=format\u0026n=-AIVGXbrCJu_8i70\u0026q=85\u0026s=92df9cacbac6c8f17dbeb2d8b6befb93","navbar":{"links":[{"href":"https://creem.io/contact","label":"Support"},{"href":"https://docs.creem.io/llms.txt","label":"llms.txt"},{"href":"https://docs.creem.io/llms-full.txt","label":"llms-full.txt"}],"primary":{"type":"button","label":"Creem","href":"https://creem.io"}},"footer":{"socials":{"x":"https://x.com/creem_io","linkedin":"https://www.linkedin.com/company/creemio"}},"seo":{"metatags":{"twitter:site":"@creem_io","og:site_name":"Creem Documentation","keywords":"merchant of record, payment api, saas billing, subscription management, global payments, MoR, affiliate program, affiliate marketing, referral program"},"indexing":"all"},"integrations":{"posthog":{"apiKey":"phc_placeholder_gabriel_will_provide","apiHost":"https://us.posthog.com"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Community","icon":"discord","href":"https://discord.gg/q3GKZs92Av"},{"anchor":"Blog","icon":"newspaper","href":"https://creem.io/blog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"creem","hasAudioNarration":false,"actualSubdomain":"creem","customDomains":["docs.creem.io"],"gitSource":{"type":"github","owner":"armitage-labs","repo":"creem","deployBranch":"main","contentDirectory":"packages/docs","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6b088b3491ec34b505a10a57","clientVersion":"0.0.4340","searchFilterCounts":[{"language":"default","tag":"Documentation","count":106},{"language":"default","tag":"API Reference","count":78},{"language":"default","tag":"Features","count":45},{"language":"default","tag":"Code","count":22},{"language":"default","tag":"Customer Credits","count":19},{"language":"default","tag":"SDKs","count":19},{"language":"default","tag":"Guides","count":18},{"language":"default","tag":"Get Started","count":12},{"language":"default","tag":"Meters","count":9},{"language":"default","tag":"AI","count":8}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":"#topbar-cta-button{color:#000000}"}]}
{"page":{"pagePath":"api-reference/endpoint/promote-catalog","slug":"/api-reference/endpoint/promote-catalog","pageMetadata":{"title":"Promote the test catalog to live (meters and products)","description":"Copies the store’s test catalog into live by `external_id`: each selected test item is matched to the live item with the same key and written as that kind’s keyed upsert (`POST /v1/meters`, `POST /v1/products`); a keyed test item without a live match is created with its key. Test is the source for every field it sets; promote never clears a `metadata` key only live has (`conflict`), and live items without a test counterpart are not listed and never touched. A test item without a key is `needs_key`, with ranked `candidates` and a `proposed_external_id`: give both sides the same key, then promote again. Archived test items are included only when live has an item with the same key, and a paired meter’s archive state follows test’s.\nEvery item reports one `result`; the real run writes only `created`, `updated` and `unchanged` items. Before its first write the real run checks every write together in one rolled-back transaction (one dependency layer at a time above the batch limit) and writes nothing when one fails, unless `force` is `true`. The check runs within the time budget too: until it is done a page has no items and a `next_cursor`, and `validation.checked_batches` says how far it got. Then the run writes only what it checked: an item changed after the check is `not_written` (`changed_since_check`). Items run meters first, then products, then the meters test archived (a meter's archive is part of its own write, after the products that may stop pricing it), and pages end after a time budget: follow `next_cursor` with the same `select` and `dry_run` until it is null. Every run and item is recorded under `run_id`, dry runs included.\nRequires `products:write` and `meters:write` when meters are promoted. Answers `503` `test_environment_unavailable` when the test environment can’t be reached; try again later.","openapi":"post /v1/catalog/promote","href":"/api-reference/endpoint/promote-catalog"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Copies the store’s test catalog into live by \", _jsx(_components.code, {\n children: \"external_id\"\n }), \": each selected test item is matched to the live item with the same key and written as that kind’s keyed upsert (\", _jsx(_components.code, {\n children: \"POST /v1/meters\"\n }), \", \", _jsx(_components.code, {\n children: \"POST /v1/products\"\n }), \"); a keyed test item without a live match is created with its key. Test is the source for every field it sets; promote never clears a \", _jsx(_components.code, {\n children: \"metadata\"\n }), \" key only live has (\", _jsx(_components.code, {\n children: \"conflict\"\n }), \"), and live items without a test counterpart are not listed and never touched. A test item without a key is \", _jsx(_components.code, {\n children: \"needs_key\"\n }), \", with ranked \", _jsx(_components.code, {\n children: \"candidates\"\n }), \" and a \", _jsx(_components.code, {\n children: \"proposed_external_id\"\n }), \": give both sides the same key, then promote again. Archived test items are included only when live has an item with the same key, and a paired meter’s archive state follows test’s.\\nEvery item reports one \", _jsx(_components.code, {\n children: \"result\"\n }), \"; the real run writes only \", _jsx(_components.code, {\n children: \"created\"\n }), \", \", _jsx(_components.code, {\n children: \"updated\"\n }), \" and \", _jsx(_components.code, {\n children: \"unchanged\"\n }), \" items. Before its first write the real run checks every write together in one rolled-back transaction (one dependency layer at a time above the batch limit) and writes nothing when one fails, unless \", _jsx(_components.code, {\n children: \"force\"\n }), \" is \", _jsx(_components.code, {\n children: \"true\"\n }), \". The check runs within the time budget too: until it is done a page has no items and a \", _jsx(_components.code, {\n children: \"next_cursor\"\n }), \", and \", _jsx(_components.code, {\n children: \"validation.checked_batches\"\n }), \" says how far it got. Then the run writes only what it checked: an item changed after the check is \", _jsx(_components.code, {\n children: \"not_written\"\n }), \" (\", _jsx(_components.code, {\n children: \"changed_since_check\"\n }), \"). Items run meters first, then products, then the meters test archived (a meter’s archive is part of its own write, after the products that may stop pricing it), and pages end after a time budget: follow \", _jsx(_components.code, {\n children: \"next_cursor\"\n }), \" with the same \", _jsx(_components.code, {\n children: \"select\"\n }), \" and \", _jsx(_components.code, {\n children: \"dry_run\"\n }), \" until it is null. Every run and item is recorded under \", _jsx(_components.code, {\n children: \"run_id\"\n }), \", dry runs included.\\nRequires \", _jsx(_components.code, {\n children: \"products:write\"\n }), \" and \", _jsx(_components.code, {\n children: \"meters:write\"\n }), \" when meters are promoted. Answers \", _jsx(_components.code, {\n children: \"503\"\n }), \" \", _jsx(_components.code, {\n children: \"test_environment_unavailable\"\n }), \" when the test environment can’t be reached; try again later.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Promote the test catalog to live (meters and products)","description":"Copies the store’s test catalog into live by `external_id`: each selected test item is matched to the live item with the same key and written as that kind’s keyed upsert (`POST /v1/meters`, `POST /v1/products`); a keyed test item without a live match is created with its key. Test is the source for every field it sets; promote never clears a `metadata` key only live has (`conflict`), and live items without a test counterpart are not listed and never touched. A test item without a key is `needs_key`, with ranked `candidates` and a `proposed_external_id`: give both sides the same key, then promote again. Archived test items are included only when live has an item with the same key, and a paired meter’s archive state follows test’s.\nEvery item reports one `result`; the real run writes only `created`, `updated` and `unchanged` items. Before its first write the real run checks every write together in one rolled-back transaction (one dependency layer at a time above the batch limit) and writes nothing when one fails, unless `force` is `true`. The check runs within the time budget too: until it is done a page has no items and a `next_cursor`, and `validation.checked_batches` says how far it got. Then the run writes only what it checked: an item changed after the check is `not_written` (`changed_since_check`). Items run meters first, then products, then the meters test archived (a meter's archive is part of its own write, after the products that may stop pricing it), and pages end after a time budget: follow `next_cursor` with the same `select` and `dry_run` until it is null. Every run and item is recorded under `run_id`, dry runs included.\nRequires `products:write` and `meters:write` when meters are promoted. Answers `503` `test_environment_unavailable` when the test environment can’t be reached; try again later.","openapi":"post /v1/catalog/promote","href":"/api-reference/endpoint/promote-catalog"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/creem/ff82c2fd59431fcd/scripts/generate-api-docs.js"],"openApiReferenceData":{"operation":{"operationId":"promoteCatalog","x-speakeasy-name-override":"promote","summary":"Promote the test catalog to live (meters and products).","description":"Copies the store’s test catalog into live by `external_id`: each selected test item is matched to the live item with the same key and written as that kind’s keyed upsert (`POST /v1/meters`, `POST /v1/products`); a keyed test item without a live match is created with its key. Test is the source for every field it sets; promote never clears a `metadata` key only live has (`conflict`), and live items without a test counterpart are not listed and never touched. A test item without a key is `needs_key`, with ranked `candidates` and a `proposed_external_id`: give both sides the same key, then promote again. Archived test items are included only when live has an item with the same key, and a paired meter’s archive state follows test’s.\nEvery item reports one `result`; the real run writes only `created`, `updated` and `unchanged` items. Before its first write the real run checks every write together in one rolled-back transaction (one dependency layer at a time above the batch limit) and writes nothing when one fails, unless `force` is `true`. The check runs within the time budget too: until it is done a page has no items and a `next_cursor`, and `validation.checked_batches` says how far it got. Then the run writes only what it checked: an item changed after the check is `not_written` (`changed_since_check`). Items run meters first, then products, then the meters test archived (a meter's archive is part of its own write, after the products that may stop pricing it), and pages end after a time budget: follow `next_cursor` with the same `select` and `dry_run` until it is null. Every run and item is recorded under `run_id`, dry runs included.\nRequires `products:write` and `meters:write` when meters are promoted. Answers `503` `test_environment_unavailable` when the test environment can’t be reached; try again later.","parameters":["32074f72-c5ce-45ed-9f39-4ee86791489e"],"requestBody":"da5bf94a-295a-4cd4-8bdc-08d17d0515a8","responses":{"200":"09814693-1fe1-4ae1-8b2f-6ad6699e4b93","400":"bd54e5a1-73d5-4969-abd2-2f9de25543ea","401":"31ffc485-ee54-4860-b9ba-17e82370e9b8","403":"325f73b8-3207-41aa-861b-2a1ed8b11b25","404":"1bbc889f-bc48-48cd-becb-def5fd318ce6","503":"b221bf5f-da4f-482e-8a6d-69825a186df6"},"tags":["Catalog"],"security":["6d41aa80-cba4-4eca-b9d8-240a273aa824"],"method":"post","type":"path","servers":["31665feb-482b-4353-8ac5-f6916acb7a8f","6c07f73e-92c3-48a8-87dd-e830da7c99ad"],"path":"/v1/catalog/promote","baseUrlOptions":["https://api.creem.io","https://test-api.creem.io"],"title":"Promote the test catalog to live (meters and products).","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"32074f72-c5ce-45ed-9f39-4ee86791489e":{"name":"dry_run","required":false,"in":"query","description":"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.","schema":{"type":"boolean","isRequired":false,"description":"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.","uniqueKey":"","typeLabel":"boolean"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"select":{"type":"object","description":"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.","properties":{"meters":{"oneOf":[{"type":"string","description":"`\"all\"` for every test meter, or a list of test meter ids. Leave it out to promote no meters (a product’s meters are still read to resolve its usage prices).","enum":["all"],"uniqueKey":"select.meters.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"array","items":{"type":"string","uniqueKey":"select.meters.oneOf.1.items.[INDEX]","typeLabel":"string"},"description":"`\"all\"` for every test meter, or a list of test meter ids. Leave it out to promote no meters (a product’s meters are still read to resolve its usage prices).","maxItems":1000,"uniqueKey":"select.meters.oneOf.1","typeLabel":"string[]"}],"uniqueKey":"select.meters","typeLabel":"enum\u003cstring> | string[]"},"products":{"oneOf":[{"type":"string","description":"`\"all\"` for every test product, or a list of test product ids. Leave it out to promote no products.","enum":["all"],"uniqueKey":"select.products.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"array","items":{"type":"string","uniqueKey":"select.products.oneOf.1.items.[INDEX]","typeLabel":"string"},"description":"`\"all\"` for every test product, or a list of test product ids. Leave it out to promote no products.","maxItems":1000,"uniqueKey":"select.products.oneOf.1","typeLabel":"string[]"}],"uniqueKey":"select.products","typeLabel":"enum\u003cstring> | string[]"}},"uniqueKey":"select","typeLabel":"object"},"cursor":{"oneOf":[{"type":"string","description":"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`.","uniqueKey":"cursor.oneOf.0","typeLabel":"string"},{"type":"null","description":"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`.","uniqueKey":"cursor.oneOf.1","typeLabel":"null"}],"uniqueKey":"cursor","typeLabel":"string | null"},"force":{"type":"boolean","description":"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`.","uniqueKey":"force","typeLabel":"boolean"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"select":{"meters":"all","products":"all"},"cursor":"\u003cstring>","force":true}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"09814693-1fe1-4ae1-8b2f-6ad6699e4b93":{"description":"The page’s items, also when some of them are `conflict`, `failed` or `blocked`.","content":{"application/json":{"schema":{"type":"object","properties":{"run_id":{"type":"string","description":"The run (`cprun_…`), the same on every page of it.","isRequired":true,"uniqueKey":"run_id","typeLabel":"string"},"dry_run":{"type":"boolean","description":"`true` on a dry run: nothing was written.","isRequired":true,"uniqueKey":"dry_run","typeLabel":"boolean"},"summary":{"type":"object","description":"One count per result for this page’s items; every result always present.","required":["created","updated","unchanged","needs_key","conflict","failed","blocked","not_written"],"properties":{"created":{"type":"integer","isRequired":true,"uniqueKey":"summary.created","typeLabel":"integer"},"updated":{"type":"integer","isRequired":true,"uniqueKey":"summary.updated","typeLabel":"integer"},"unchanged":{"type":"integer","isRequired":true,"uniqueKey":"summary.unchanged","typeLabel":"integer"},"needs_key":{"type":"integer","isRequired":true,"uniqueKey":"summary.needs_key","typeLabel":"integer"},"conflict":{"type":"integer","isRequired":true,"uniqueKey":"summary.conflict","typeLabel":"integer"},"failed":{"type":"integer","isRequired":true,"uniqueKey":"summary.failed","typeLabel":"integer"},"blocked":{"type":"integer","isRequired":true,"uniqueKey":"summary.blocked","typeLabel":"integer"},"not_written":{"type":"integer","isRequired":true,"uniqueKey":"summary.not_written","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"summary","typeLabel":"object"},"items":{"description":"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.","type":"array","items":{"type":"object","properties":{"kind":{"type":"string","description":"`meter` or `product`.","isRequired":true,"uniqueKey":"\\items.items.[INDEX].kind","typeLabel":"string"},"test_id":{"type":"string","isRequired":true,"uniqueKey":"\\items.items.[INDEX].test_id","typeLabel":"string"},"live_id":{"oneOf":[{"type":"string","description":"The live item: the one with the same `external_id`, or the one the write created (in a dry run an id that is never stored). Null when there is none.","isRequired":true,"uniqueKey":"\\items.items.[INDEX].live_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The live item: the one with the same `external_id`, or the one the write created (in a dry run an id that is never stored). Null when there is none.","isRequired":true,"uniqueKey":"\\items.items.[INDEX].live_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"\\items.items.[INDEX].live_id","typeLabel":"string | null"},"result":{"type":"string","description":"One of `created`, `updated`, `unchanged`, `needs_key`, `conflict`, `failed`, `blocked`, `not_written`. More values may be added. The real run writes only `created`, `updated` and `unchanged` items. `not_written` is an item this run could write but didn't, with the reason in `error.code`: `archived_not_in_live` (archived in test, and live has no item with its key), `promote_check_failed` (the check failed for another item and `force` wasn't sent), `changed_since_check` (its write isn't the one the run checked; promote again).","isRequired":true,"uniqueKey":"\\items.items.[INDEX].result","typeLabel":"string"},"write_result":{"type":"object","additionalProperties":true,"description":"On `created`, `updated` and `unchanged`: the `write_result` of the item’s upsert (`POST /v1/products`, `POST /v1/meters`), with promote’s warnings: `reference_planned` for a usage price naming a meter the same promote creates, `possible_rename` for a keyed item without a live match that has same-name live items (see `candidates`), `feature_type_not_promoted` for product features promote doesn’t copy yet (`file`).","uniqueKey":"\\items.items.[INDEX].write_result","typeLabel":"object"},"candidates":{"description":"On `needs_key`, and on a keyed item without a live match (`possible_rename`): live items of the same kind with the same name (ignoring case and spacing) that no test item is paired with, ranked: same billing type first, then active before archived, then closest price. Never preselected.","type":"array","items":{"type":"object","properties":{"live_id":{"type":"string","description":"The live item’s id.","isRequired":true,"uniqueKey":"\\items.items.[INDEX].candidates.items.[INDEX].live_id","typeLabel":"string"},"external_id":{"oneOf":[{"type":"string","description":"The live item’s `external_id`: the key to propose when the merchant picks this candidate. Null when it has none (then the test item’s id is proposed).","isRequired":true,"uniqueKey":"\\items.items.[INDEX].candidates.items.[INDEX].external_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The live item’s `external_id`: the key to propose when the merchant picks this candidate. Null when it has none (then the test item’s id is proposed).","isRequired":true,"uniqueKey":"\\items.items.[INDEX].candidates.items.[INDEX].external_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"\\items.items.[INDEX].candidates.items.[INDEX].external_id","typeLabel":"string | null"},"name":{"type":"string","isRequired":true,"uniqueKey":"\\items.items.[INDEX].candidates.items.[INDEX].name","typeLabel":"string"},"status":{"type":"string","description":"`active` or `archived`.","isRequired":true,"uniqueKey":"\\items.items.[INDEX].candidates.items.[INDEX].status","typeLabel":"string"},"differences":{"description":"The fields that differ from the test item (products: `price`, `currency`, `billing_type`, `billing_period`, `status`; meters: `event_name`, `aggregation`, `unit_label`, `status`). Shown, never matched on.","type":"array","items":{"type":"string","uniqueKey":"\\items.items.[INDEX].candidates.items.[INDEX].differences.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"\\items.items.[INDEX].candidates.items.[INDEX].differences","typeLabel":"string[]"},"price":{"type":"integer","description":"Products only.","uniqueKey":"\\items.items.[INDEX].candidates.items.[INDEX].price","typeLabel":"integer"},"currency":{"type":"string","description":"Products only.","uniqueKey":"\\items.items.[INDEX].candidates.items.[INDEX].currency","typeLabel":"string"},"billing_type":{"type":"string","description":"Products only.","uniqueKey":"\\items.items.[INDEX].candidates.items.[INDEX].billing_type","typeLabel":"string"},"billing_period":{"type":"string","description":"Products only.","uniqueKey":"\\items.items.[INDEX].candidates.items.[INDEX].billing_period","typeLabel":"string"}},"required":["live_id","external_id","name","status","differences"],"uniqueKey":"\\items.items.[INDEX].candidates.items.[INDEX]","typeLabel":"object"},"uniqueKey":"\\items.items.[INDEX].candidates","typeLabel":"object[]"},"proposed_external_id":{"type":"string","description":"On `needs_key` for an item without `external_id`: the test item’s id, the key to propose when no candidate with a key is picked.","uniqueKey":"\\items.items.[INDEX].proposed_external_id","typeLabel":"string"},"feature_candidates":{"description":"On `needs_key` for a matched product: its test features that need the same `external_id` on both sides before promote writes the product.","type":"array","items":{"type":"object","properties":{"test_feature_id":{"type":"string","isRequired":true,"uniqueKey":"\\items.items.[INDEX].feature_candidates.items.[INDEX].test_feature_id","typeLabel":"string"},"type":{"type":"string","description":"The feature type: `customerCredits`, `licenseKey` or `custom`.","isRequired":true,"uniqueKey":"\\items.items.[INDEX].feature_candidates.items.[INDEX].type","typeLabel":"string"},"description":{"type":"string","isRequired":true,"uniqueKey":"\\items.items.[INDEX].feature_candidates.items.[INDEX].description","typeLabel":"string"},"proposed_external_id":{"type":"string","description":"The key to write on both features: the test feature’s own `external_id` when it has one, else the picked live feature’s `external_id` when it has one, else the test feature’s id.","isRequired":true,"uniqueKey":"\\items.items.[INDEX].feature_candidates.items.[INDEX].proposed_external_id","typeLabel":"string"},"candidates":{"description":"Live features of the same type nothing else matched; may be empty.","type":"array","items":{"type":"object","properties":{"live_feature_id":{"type":"string","isRequired":true,"uniqueKey":"\\items.items.[INDEX].feature_candidates.items.[INDEX].candidates.items.[INDEX].live_feature_id","typeLabel":"string"},"external_id":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"\\items.items.[INDEX].feature_candidates.items.[INDEX].candidates.items.[INDEX].external_id.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"\\items.items.[INDEX].feature_candidates.items.[INDEX].candidates.items.[INDEX].external_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"\\items.items.[INDEX].feature_candidates.items.[INDEX].candidates.items.[INDEX].external_id","typeLabel":"string | null"},"description":{"type":"string","isRequired":true,"uniqueKey":"\\items.items.[INDEX].feature_candidates.items.[INDEX].candidates.items.[INDEX].description","typeLabel":"string"}},"required":["live_feature_id","external_id","description"],"uniqueKey":"\\items.items.[INDEX].feature_candidates.items.[INDEX].candidates.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"\\items.items.[INDEX].feature_candidates.items.[INDEX].candidates","typeLabel":"object[]"}},"required":["test_feature_id","type","description","proposed_external_id","candidates"],"uniqueKey":"\\items.items.[INDEX].feature_candidates.items.[INDEX]","typeLabel":"object"},"uniqueKey":"\\items.items.[INDEX].feature_candidates","typeLabel":"object[]"},"error":{"type":"object","description":"On `conflict` and `failed`.","required":["status","code","message"],"properties":{"status":{"type":"integer","description":"The status the item’s own write answers (`409` for a guard).","isRequired":true,"uniqueKey":"\\items.items.[INDEX].error.status","typeLabel":"integer"},"code":{"oneOf":[{"type":"string","description":"The stable error code, for example `usage_price_in_use`, `license_keys_issued`, `meter_in_use`, `live_metadata_not_in_test`, `reference_not_found`, `file_location_invalid`. More codes may be added.","isRequired":true,"uniqueKey":"\\items.items.[INDEX].error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"The stable error code, for example `usage_price_in_use`, `license_keys_issued`, `meter_in_use`, `live_metadata_not_in_test`, `reference_not_found`, `file_location_invalid`. More codes may be added.","isRequired":true,"uniqueKey":"\\items.items.[INDEX].error.code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"\\items.items.[INDEX].error.code","typeLabel":"string | null"},"message":{"type":"string","isRequired":true,"uniqueKey":"\\items.items.[INDEX].error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"\\items.items.[INDEX].error.details","typeLabel":"object"}},"uniqueKey":"\\items.items.[INDEX].error","typeLabel":"object"},"blocked_by":{"type":"object","description":"On `blocked`: the item it depends on.","required":["kind","test_id"],"properties":{"kind":{"type":"string","description":"The kind of the item this one waits for (`meter`).","isRequired":true,"uniqueKey":"\\items.items.[INDEX].blocked_by.kind","typeLabel":"string"},"test_id":{"type":"string","isRequired":true,"uniqueKey":"\\items.items.[INDEX].blocked_by.test_id","typeLabel":"string"}},"uniqueKey":"\\items.items.[INDEX].blocked_by","typeLabel":"object"}},"required":["kind","test_id","live_id","result"],"uniqueKey":"\\items.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"\\items","typeLabel":"object[]"},"validation":{"oneOf":[{"type":"object","description":"On the real run’s first page: how its writes were checked before the first one. Null otherwise.","required":["scope","batches","checked_batches","passed","written"],"properties":{"scope":{"type":"string","description":"`selection`: every write was checked in one rolled-back transaction. `per_layer`: the selection is above the batch limit, so each dependency layer (meters, then products) was checked on its own, in batches of the limit; a usage price naming a meter of another batch is then checked as a reference by key only, and a meter test archived is checked in the batch of the products that price it in live, so a product that stops pricing it releases it first.","isRequired":true,"uniqueKey":"validation.oneOf.0.scope","typeLabel":"string"},"batches":{"type":"integer","description":"How many rolled-back batches the check runs.","isRequired":true,"uniqueKey":"validation.oneOf.0.batches","typeLabel":"integer"},"checked_batches":{"type":"integer","description":"How many of them ran so far. The check goes on over pages within the time budget: until it equals `batches`, a page answers `next_cursor` and no items, and nothing is written.","isRequired":true,"uniqueKey":"validation.oneOf.0.checked_batches","typeLabel":"integer"},"passed":{"oneOf":[{"type":"boolean","description":"Whether every write passed the check; null while batches are left.","isRequired":true,"uniqueKey":"validation.oneOf.0.passed.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether every write passed the check; null while batches are left.","isRequired":true,"uniqueKey":"validation.oneOf.0.passed.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"validation.oneOf.0.passed","typeLabel":"boolean | null"},"written":{"oneOf":[{"type":"boolean","description":"Whether the run writes: `true` when the check passed or `force` was sent; null while batches are left. When `false`, nothing was written: an item the check refused is `conflict` or `failed`, every other write `not_written` (`promote_check_failed`).","isRequired":true,"uniqueKey":"validation.oneOf.0.written.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether the run writes: `true` when the check passed or `force` was sent; null while batches are left. When `false`, nothing was written: an item the check refused is `conflict` or `failed`, every other write `not_written` (`promote_check_failed`).","isRequired":true,"uniqueKey":"validation.oneOf.0.written.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"validation.oneOf.0.written","typeLabel":"boolean | null"}},"isRequired":true,"uniqueKey":"validation.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"validation.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"validation","typeLabel":"object | null"},"next_cursor":{"oneOf":[{"type":"string","description":"Send it as `cursor` with the same `select` and `dry_run` to go on; null when the run is complete.","isRequired":true,"uniqueKey":"next_cursor.oneOf.0","typeLabel":"string"},{"type":"null","description":"Send it as `cursor` with the same `select` and `dry_run` to go on; null when the run is complete.","isRequired":true,"uniqueKey":"next_cursor.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"next_cursor","typeLabel":"string | null"}},"required":["run_id","dry_run","summary","items","validation","next_cursor"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"run_id":"\u003cstring>","dry_run":true,"summary":{"created":123,"updated":123,"unchanged":123,"needs_key":123,"conflict":123,"failed":123,"blocked":123,"not_written":123},"items":[{"kind":"\u003cstring>","test_id":"\u003cstring>","live_id":"\u003cstring>","result":"\u003cstring>","write_result":{},"candidates":[{"live_id":"\u003cstring>","external_id":"\u003cstring>","name":"\u003cstring>","status":"\u003cstring>","differences":["\u003cstring>"],"price":123,"currency":"\u003cstring>","billing_type":"\u003cstring>","billing_period":"\u003cstring>"}],"proposed_external_id":"\u003cstring>","feature_candidates":[{"test_feature_id":"\u003cstring>","type":"\u003cstring>","description":"\u003cstring>","proposed_external_id":"\u003cstring>","candidates":[{"live_feature_id":"\u003cstring>","external_id":"\u003cstring>","description":"\u003cstring>"}]}],"error":{"status":123,"code":"\u003cstring>","message":"\u003cstring>","details":{}},"blocked_by":{"kind":"\u003cstring>","test_id":"\u003cstring>"}}],"validation":{"scope":"\u003cstring>","batches":123,"checked_batches":123,"passed":true,"written":true},"next_cursor":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"bd54e5a1-73d5-4969-abd2-2f9de25543ea":{"description":"Bad request, and nothing ran. Besides validation errors of the request: `live_only`: called on the test API (promote runs on live); `reference_not_found`: a test id in `select` the test store doesn’t have (`details.field`, `details.key`); `invalid_cursor`: a cursor not issued for this `select` and `dry_run`, or older than 24 hours.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"31ffc485-ee54-4860-b9ba-17e82370e9b8":{"description":"Unauthorized - Invalid or missing API key","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"325f73b8-3207-41aa-861b-2a1ed8b11b25":{"description":"Forbidden: the API key or access token lacks `products:write`, or `meters:write` for a selection with meters. Nothing was read or written.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"1bbc889f-bc48-48cd-becb-def5fd318ce6":{"description":"Not Found - Resource does not exist","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"b221bf5f-da4f-482e-8a6d-69825a186df6":{"description":"Service unavailable (`test_environment_unavailable`): the test environment can’t be reached. Nothing was written; try again later.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"6d41aa80-cba4-4eca-b9d8-240a273aa824":{"ApiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for authentication. You can find your API key in the Creem dashboard under Settings > API Keys.","scopes":[],"schemeName":"ApiKey"}}},"servers":{"31665feb-482b-4353-8ac5-f6916acb7a8f":{"url":"https://api.creem.io","description":"Production — live API for processing real transactions and data.","x-speakeasy-server-id":"prod"},"6c07f73e-92c3-48a8-87dd-e830da7c99ad":{"url":"https://test-api.creem.io","description":"Test — sandbox API for development and testing with no real charges.","x-speakeasy-server-id":"test"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for authentication. You can find your API key in the Creem dashboard under Settings > API Keys.","scopes":[],"schemeName":"ApiKey"},"schema":{"title":"x-api-key","type":"string","description":"API key for authentication. You can find your API key in the Creem dashboard under Settings > API Keys.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKey","name":"x-api-key"}],"title":"ApiKey"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"creem","siteName":"Creem","title":"Promote the test catalog to live (meters and products) - Creem","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-26T18:47:44.772Z","originalFileLocation":"api-reference/endpoint/promote-catalog.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Copies the store’s test catalog into live by external_id: each selected test item is matched to the live item with the same key and written as that kind’s keyed upsert (POST /v1/meters, POST /v1/products); a keyed test item without a live match is created with its key. Test is the source for every field it sets; promote never clears a metadata key only live has (conflict), and live items without a test counterpart are not listed and never touched. A test item without a key is needs_key, with ranked candidates and a proposed_external_id: give both sides the same key, then promote again. Archived test items are included only when live has an item with the same key, and a paired meter’s archive state follows test’s. Every item reports one result; the real run writes only created, updated and unchanged items. Before its first write the real run checks every write together in one rolled-back transaction (one dependency layer at a time above the batch limit) and writes nothing when one fails, unless force is true. The check runs within the time budget too: until it is done a page has no items and a next_cursor, and validation.checked_batches says how far it got. Then the run writes only what it checked: an item changed after the check is not_written (changed_since_check). Items run meters first, then products, then the meters test archived (a meter\u0026#x27;s archive is part of its own write, after the products that may stop pricing it), and pages end after a time budget: follow next_cursor with the same select and dry_run until it is null. Every run and item is recorded under run_id, dry runs included. Requires products:write and meters:write when meters are promoted. Answers 503 test_environment_unavailable when the test environment can’t be reached; try again later.\">\u003cmeta data-mint-head name=\"keywords\" content=\"merchant of record, payment api, saas billing, subscription management, global payments, MoR, affiliate program, affiliate marketing, referral program\">\u003cmeta data-mint-head name=\"application-name\" content=\"Creem\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Promote the test catalog to live (meters and products) - Creem\">\u003cmeta data-mint-head property=\"og:description\" content=\"Copies the store’s test catalog into live by external_id: each selected test item is matched to the live item with the same key and written as that kind’s keyed upsert (POST /v1/meters, POST /v1/products); a keyed test item without a live match is created with its key. Test is the source for every field it sets; promote never clears a metadata key only live has (conflict), and live items without a test counterpart are not listed and never touched. A test item without a key is needs_key, with ranked candidates and a proposed_external_id: give both sides the same key, then promote again. Archived test items are included only when live has an item with the same key, and a paired meter’s archive state follows test’s. Every item reports one result; the real run writes only created, updated and unchanged items. Before its first write the real run checks every write together in one rolled-back transaction (one dependency layer at a time above the batch limit) and writes nothing when one fails, unless force is true. The check runs within the time budget too: until it is done a page has no items and a next_cursor, and validation.checked_batches says how far it got. Then the run writes only what it checked: an item changed after the check is not_written (changed_since_check). Items run meters first, then products, then the meters test archived (a meter\u0026#x27;s archive is part of its own write, after the products that may stop pricing it), and pages end after a time budget: follow next_cursor with the same select and dry_run until it is null. Every run and item is recorded under run_id, dry runs included. Requires products:write and meters:write when meters are promoted. Answers 503 test_environment_unavailable when the test environment can’t be reached; try again later.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Creem Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.creem.io/api-reference/endpoint/promote-catalog\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://creem.mintlify.site/_mintlify/api/og/v2?division=Catalog\u0026amp;title=Promote+the+test+catalog+to+live+%28meters+and+products%29\u0026amp;description=Copies+the+store%E2%80%99s+test+catalog+into+live+by+%60external_id%60%3A+each+selected+test+item+is+matched+to+the+live+item+with+the+same+key+and+written+as+that+kind%E2%80%99s+key\u0026amp;theme=19d74014ebb4a0780d75c372\u0026amp;signature=3a193988f303c7bc065948cf6e82550ce43db58a3decf904acb59948de086b45\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Promote the test catalog to live (meters and products) - Creem\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Copies the store’s test catalog into live by external_id: each selected test item is matched to the live item with the same key and written as that kind’s keyed upsert (POST /v1/meters, POST /v1/products); a keyed test item without a live match is created with its key. Test is the source for every field it sets; promote never clears a metadata key only live has (conflict), and live items without a test counterpart are not listed and never touched. A test item without a key is needs_key, with ranked candidates and a proposed_external_id: give both sides the same key, then promote again. Archived test items are included only when live has an item with the same key, and a paired meter’s archive state follows test’s. Every item reports one result; the real run writes only created, updated and unchanged items. Before its first write the real run checks every write together in one rolled-back transaction (one dependency layer at a time above the batch limit) and writes nothing when one fails, unless force is true. The check runs within the time budget too: until it is done a page has no items and a next_cursor, and validation.checked_batches says how far it got. Then the run writes only what it checked: an item changed after the check is not_written (changed_since_check). Items run meters first, then products, then the meters test archived (a meter\u0026#x27;s archive is part of its own write, after the products that may stop pricing it), and pages end after a time budget: follow next_cursor with the same select and dry_run until it is null. Every run and item is recorded under run_id, dry runs included. Requires products:write and meters:write when meters are promoted. Answers 503 test_environment_unavailable when the test environment can’t be reached; try again later.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://creem.mintlify.site/_mintlify/api/og/v2?division=Catalog\u0026amp;title=Promote+the+test+catalog+to+live+%28meters+and+products%29\u0026amp;description=Copies+the+store%E2%80%99s+test+catalog+into+live+by+%60external_id%60%3A+each+selected+test+item+is+matched+to+the+live+item+with+the+same+key+and+written+as+that+kind%E2%80%99s+key\u0026amp;theme=19d74014ebb4a0780d75c372\u0026amp;signature=3a193988f303c7bc065948cf6e82550ce43db58a3decf904acb59948de086b45\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Creem\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FFBE98\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.creem.io/api-reference/endpoint/promote-catalog\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoint/promote-catalog.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.creem.io/#organization\",\"name\":\"Creem\",\"url\":\"https://docs.creem.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/creem/-AIVGXbrCJu_8i70/logo/light.svg?fit=max\u0026auto=format\u0026n=-AIVGXbrCJu_8i70\u0026q=85\u0026s=686f06f43a3d7e4c0456e22de64c8bae\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.creem.io#website\",\"name\":\"Creem\",\"url\":\"https://docs.creem.io\",\"publisher\":{\"@id\":\"https://docs.creem.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.creem.io/api-reference/endpoint/promote-catalog#webpage\",\"url\":\"https://docs.creem.io/api-reference/endpoint/promote-catalog\",\"name\":\"Promote the test catalog to live (meters and products)\",\"description\":\"Copies the store’s test catalog into live by external_id: each selected test item is matched to the live item with the same key and written as that kind’s keyed upsert (POST /v1/meters, POST /v1/products); a keyed test item without a live match is created with its key. Test is the source for every field it sets; promote never clears a metadata key only live has (conflict), and live items without a test counterpart are not listed and never touched. A test item without a key is needs_key, with ranked candidates and a proposed_external_id: give both sides the same key, then promote again. Archived test items are included only when live has an item with the same key, and a paired meter’s archive state follows test’s. Every item reports one result; the real run writes only created, updated and unchanged items. Before its first write the real run checks every write together in one rolled-back transaction (one dependency layer at a time above the batch limit) and writes nothing when one fails, unless force is true. The check runs within the time budget too: until it is done a page has no items and a next_cursor, and validation.checked_batches says how far it got. Then the run writes only what it checked: an item changed after the check is not_written (changed_since_check). Items run meters first, then products, then the meters test archived (a meter's archive is part of its own write, after the products that may stop pricing it), and pages end after a time budget: follow next_cursor with the same select and dry_run until it is null. Every run and item is recorded under run_id, dry runs included. Requires products:write and meters:write when meters are promoted. Answers 503 test_environment_unavailable when the test environment can’t be reached; try again later.\",\"dateModified\":\"2026-11-26T18:47:44.772Z\",\"isPartOf\":{\"@id\":\"https://docs.creem.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.creem.io/api-reference/endpoint/promote-catalog#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.creem.io/api-reference/endpoint/promote-catalog#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Catalog\",\"item\":\"https://docs.creem.io/api-reference/endpoint/validate-catalog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Promote the test catalog to live (meters and products)\",\"item\":\"https://docs.creem.io/api-reference/endpoint/promote-catalog\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.creem.io/api-reference/endpoint/promote-catalog#apireference\",\"headline\":\"Promote the test catalog to live (meters and products)\",\"name\":\"Promote the test catalog to live (meters and products)\",\"description\":\"Copies the store’s test catalog into live by external_id: each selected test item is matched to the live item with the same key and written as that kind’s keyed upsert (POST /v1/meters, POST /v1/products); a keyed test item without a live match is created with its key. Test is the source for every field it sets; promote never clears a metadata key only live has (conflict), and live items without a test counterpart are not listed and never touched. A test item without a key is needs_key, with ranked candidates and a proposed_external_id: give both sides the same key, then promote again. Archived test items are included only when live has an item with the same key, and a paired meter’s archive state follows test’s. Every item reports one result; the real run writes only created, updated and unchanged items. Before its first write the real run checks every write together in one rolled-back transaction (one dependency layer at a time above the batch limit) and writes nothing when one fails, unless force is true. The check runs within the time budget too: until it is done a page has no items and a next_cursor, and validation.checked_batches says how far it got. Then the run writes only what it checked: an item changed after the check is not_written (changed_since_check). Items run meters first, then products, then the meters test archived (a meter's archive is part of its own write, after the products that may stop pricing it), and pages end after a time budget: follow next_cursor with the same select and dry_run until it is null. Every run and item is recorded under run_id, dry runs included. Requires products:write and meters:write when meters are promoted. Answers 503 test_environment_unavailable when the test environment can’t be reached; try again later.\",\"url\":\"https://docs.creem.io/api-reference/endpoint/promote-catalog\",\"mainEntityOfPage\":{\"@id\":\"https://docs.creem.io/api-reference/endpoint/promote-catalog#webpage\"},\"dateModified\":\"2026-11-26T18:47:44.772Z\",\"publisher\":{\"@id\":\"https://docs.creem.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.creem.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Creem\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Creem\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/endpoint/promote-catalog.md","siteName":"Creem","nav":{"global":{"anchors":[{"anchor":"Community","icon":"discord","href":"https://discord.gg/q3GKZs92Av"},{"anchor":"Blog","icon":"newspaper","href":"https://creem.io/blog"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/introduction"}]},{"tab":"API Reference","groups":[{"group":"API Documentation","icon":"book","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"Error Handling","href":"/api-reference/error-codes"}]},{"group":"Checkout","icon":"shopping-cart","pages":[{"title":"Creates a new checkout session","openapi":"post /v1/checkouts","href":"/api-reference/endpoint/create-checkout"},{"title":"Retrieve a checkout session","openapi":"get /v1/checkouts","href":"/api-reference/endpoint/get-checkout"}]},{"group":"Product","icon":"box","pages":[{"title":"Creates a product, or updates the one with the same external_id","openapi":"post /v1/products","href":"/api-reference/endpoint/create-product"},{"title":"Get a product by ID","openapi":"get /v1/products/{id}","href":"/api-reference/endpoint/get-product"},{"title":"List all products","openapi":"get /v1/products/search","href":"/api-reference/endpoint/search-products"},{"title":"Update a product","openapi":"patch /v1/products/{id}","href":"/api-reference/endpoint/update-product"},{"title":"Archive a product","openapi":"delete /v1/products/{id}","href":"/api-reference/endpoint/archive-product"},{"title":"List the price versions of a product","openapi":"get /v1/products/{id}/prices","href":"/api-reference/endpoint/list-product-prices"}]},{"group":"Product Groups","icon":"layer-group","pages":[{"title":"Create a product group","openapi":"post /v1/product-groups","href":"/api-reference/endpoint/create-product-group"},{"title":"List product groups","openapi":"get /v1/product-groups","href":"/api-reference/endpoint/list-product-groups"},{"title":"Retrieve a product group","openapi":"get /v1/product-groups/{id}","href":"/api-reference/endpoint/get-product-group"},{"title":"Update a product group","openapi":"patch /v1/product-groups/{id}","href":"/api-reference/endpoint/update-product-group"},{"title":"Delete a product group","openapi":"delete /v1/product-groups/{id}","href":"/api-reference/endpoint/delete-product-group"},{"title":"Add a product to a product group","openapi":"post /v1/product-groups/{id}/products","href":"/api-reference/endpoint/add-product-to-product-group"},{"title":"Remove a product from a product group","openapi":"delete /v1/product-groups/{id}/products/{product_id}","href":"/api-reference/endpoint/remove-product-from-product-group"}]},{"group":"Catalog","icon":"list-check","pages":[{"title":"Validate a batch of catalog writes together, without writing anything","description":"Runs every item as its own write would run with `?dry_run=true`, but all of them in one database transaction that is always rolled back, so the batch is checked as a whole: an item may name a resource another item of the batch creates (a product's usage price naming a new meter by `meter_external_id`), and every check, uniqueness rule and guard runs against what the earlier items would have written. Items run in dependency order (meters, products, product groups, discounts) and are answered in the order of the request. Without `id` an item runs as the keyed upsert of its kind (`POST /v1/products`, `POST /v1/meters`) with the same body; with `id` it runs as that resource's `PATCH` with `PATCH`'s rules, which is meant for a migrator adopting an existing resource (giving it an `external_id`). Requires `products:write` and the write scope of every kind in the batch (`meters:write` for meters). Nothing is written and nothing is triggered. A batch that passes can still fail when it is applied, if the catalog changes in between; validate it again right before applying it.","openapi":"post /v1/catalog/validate","href":"/api-reference/endpoint/validate-catalog"},{"title":"Promote the test catalog to live (meters and products)","openapi":"post /v1/catalog/promote","href":"/api-reference/endpoint/promote-catalog"}]},{"group":"Files","icon":"file","pages":[{"title":"Upload a file","description":"Request an upload for a file of any type up to 5 GB, with its SHA-256. Post the file to `upload_url` with `upload_fields` before `expires_at`, then confirm it with `POST /v1/files/{id}/confirm`. Storage refuses bytes that do not match `sha256`, files are private, and buyers always download them as attachments.","openapi":"post /v1/files","href":"/api-reference/endpoint/create-file-upload"},{"title":"Confirm an uploaded file","openapi":"post /v1/files/{id}/confirm","href":"/api-reference/endpoint/confirm-file-upload"}]},{"group":"Customer","icon":"users","pages":[{"title":"Retrieve a customer","openapi":"get /v1/customers","href":"/api-reference/endpoint/get-customer"},{"title":"Update a customer","openapi":"patch /v1/customers","href":"/api-reference/endpoint/update-customer"},{"title":"List all customers","openapi":"get /v1/customers/list","href":"/api-reference/endpoint/list-customers"},{"title":"Generate Customer Links","openapi":"post /v1/customers/billing","href":"/api-reference/endpoint/create-customer-billing"}]},{"group":"Transactions","icon":"receipt","pages":[{"title":"Get a transaction by ID","openapi":"get /v1/transactions","href":"/api-reference/endpoint/get-transaction"},{"title":"List all transactions","openapi":"get /v1/transactions/search","href":"/api-reference/endpoint/get-transactions"},{"title":"Refund a payment","openapi":"post /v1/refunds","href":"/api-reference/endpoint/refund-payment"}]},{"group":"Affiliate","icon":"users","pages":[{"title":"List all affiliates","openapi":"get /v1/affiliates","href":"/api-reference/endpoint/list-affiliates"},{"title":"Retrieve an affiliate","openapi":"get /v1/affiliates/{id}","href":"/api-reference/endpoint/retrieve-affiliate"},{"title":"List affiliate commissions","openapi":"get /v1/affiliates/{id}/commissions","href":"/api-reference/endpoint/list-affiliate-commissions"},{"title":"Create an affiliate invitation","openapi":"post /v1/affiliates/invites","href":"/api-reference/endpoint/create-affiliate-invite"},{"title":"List affiliate invitations","openapi":"get /v1/affiliates/invites","href":"/api-reference/endpoint/list-affiliate-invites"}]},{"group":"License","icon":"key","pages":[{"title":"Validates a license key or instance","openapi":"post /v1/licenses/validate","href":"/api-reference/endpoint/validate-license"},{"title":"Activates a license key","openapi":"post /v1/licenses/activate","href":"/api-reference/endpoint/activate-license"},{"title":"Deactivate a license key instance","openapi":"post /v1/licenses/deactivate","href":"/api-reference/endpoint/deactivate-license"},{"title":"List license instances","openapi":"get /v1/licenses/{id}/instances","href":"/api-reference/endpoint/list-license-instances"}]},{"group":"Discount Code","icon":"tag","pages":[{"title":"Creates a discount, or updates the one with the same external_id","openapi":"post /v1/discounts","href":"/api-reference/endpoint/create-discount-code"},{"title":"Update a discount","openapi":"patch /v1/discounts/{id}","href":"/api-reference/endpoint/update-discount-code"},{"title":"Delete a discount","openapi":"delete /v1/discounts/{id}/delete","href":"/api-reference/endpoint/delete-discount-code"},{"title":"Retrieve discount","openapi":"get /v1/discounts","href":"/api-reference/endpoint/get-discount-code"},{"title":"Search discounts","openapi":"get /v1/discounts/search","href":"/api-reference/endpoint/search-discounts"}]},{"group":"Subscription","icon":"repeat","pages":[{"title":"Retrieve a subscription","openapi":"get /v1/subscriptions","href":"/api-reference/endpoint/get-subscription"},{"title":"List all subscriptions","openapi":"get /v1/subscriptions/search","href":"/api-reference/endpoint/search-subscriptions"},{"title":"Update a subscription","openapi":"post /v1/subscriptions/{id}","href":"/api-reference/endpoint/update-subscription"},{"title":"Upgrade a subscription to a different product","openapi":"post /v1/subscriptions/{id}/upgrade","href":"/api-reference/endpoint/upgrade-subscription"},{"title":"Pause a subscription","openapi":"post /v1/subscriptions/{id}/pause","href":"/api-reference/endpoint/pause-subscription"},{"title":"Resume a subscription","openapi":"post /v1/subscriptions/{id}/resume","href":"/api-reference/endpoint/resume-subscription"},{"title":"Cancel a subscription","openapi":"post /v1/subscriptions/{id}/cancel","href":"/api-reference/endpoint/cancel-subscription"}]},{"group":"Splits","icon":"arrows-split-up-and-left","pages":[{"title":"Create a split","openapi":"post /v1/splits","href":"/api-reference/endpoint/create-split"},{"title":"List all splits","openapi":"get /v1/splits","href":"/api-reference/endpoint/list-splits"},{"title":"Retrieve a split","openapi":"get /v1/splits/{id}","href":"/api-reference/endpoint/retrieve-split"},{"title":"Delete a split","openapi":"delete /v1/splits/{id}","href":"/api-reference/endpoint/delete-split"}]},{"group":"Stats","icon":"chart-line","pages":[{"title":"Get store metrics summary","openapi":"get /v1/stats/summary","href":"/api-reference/endpoint/get-stats-summary"}]},{"group":"Customer Credits","icon":"coins","pages":[{"title":"Create a customer credits account","openapi":"post /v1/customer-credits/accounts","href":"/api-reference/endpoint/create-credits-account"},{"title":"List customer credits accounts","openapi":"get /v1/customer-credits/accounts","href":"/api-reference/endpoint/list-credits-accounts"},{"title":"Retrieve a customer credits account","openapi":"get /v1/customer-credits/accounts/{id}","href":"/api-reference/endpoint/get-credits-account"},{"title":"Get account balance","openapi":"get /v1/customer-credits/accounts/{id}/balance","href":"/api-reference/endpoint/get-credits-account-balance"},{"title":"List account entries","openapi":"get /v1/customer-credits/accounts/{id}/entries","href":"/api-reference/endpoint/list-credits-entries"},{"title":"Credit an account","openapi":"post /v1/customer-credits/accounts/{id}/credit","href":"/api-reference/endpoint/credit-account"},{"title":"Debit an account","openapi":"post /v1/customer-credits/accounts/{id}/debit","href":"/api-reference/endpoint/debit-account"},{"title":"Reverse a transaction","openapi":"post /v1/customer-credits/accounts/{id}/reverse","href":"/api-reference/endpoint/reverse-credits-transaction"},{"title":"Freeze an account","openapi":"post /v1/customer-credits/accounts/{id}/freeze","href":"/api-reference/endpoint/freeze-credits-account"},{"title":"Unfreeze an account","openapi":"post /v1/customer-credits/accounts/{id}/unfreeze","href":"/api-reference/endpoint/unfreeze-credits-account"},{"title":"Close an account","openapi":"post /v1/customer-credits/accounts/{id}/close","href":"/api-reference/endpoint/close-credits-account"},{"title":"Post a transaction","openapi":"post /v1/customer-credits/transactions","href":"/api-reference/endpoint/post-credits-transaction"},{"title":"Retrieve a transaction","openapi":"get /v1/customer-credits/transactions/{id}","href":"/api-reference/endpoint/get-credits-transaction"},{"title":"Reverse a transaction","openapi":"post /v1/customer-credits/transactions/{id}/reverse","href":"/api-reference/endpoint/reverse-credits-transaction-by-id"},{"title":"List transactions by reference","openapi":"get /v1/customer-credits/transactions","href":"/api-reference/endpoint/list-credits-transactions"}]},{"group":"Moderation","icon":"shield-check","pages":[{"title":"Screen a prompt","openapi":"post /v1/moderation/prompt","href":"/api-reference/endpoint/screen-prompt"}]},{"group":"Webhooks","icon":"webhook","pages":[{"title":"List webhook endpoints","openapi":"get /v1/webhooks","href":"/api-reference/endpoint/list-webhooks"},{"title":"Create a webhook endpoint","openapi":"post /v1/webhooks","href":"/api-reference/endpoint/create-webhook"},{"title":"Retrieve a webhook endpoint","openapi":"get /v1/webhooks/{id}","href":"/api-reference/endpoint/get-webhook"},{"title":"Update a webhook endpoint","openapi":"patch /v1/webhooks/{id}","href":"/api-reference/endpoint/update-webhook"},{"title":"Delete a webhook endpoint","openapi":"delete /v1/webhooks/{id}","href":"/api-reference/endpoint/delete-webhook"},{"title":"Retrieve a webhook signing secret","openapi":"get /v1/webhooks/{id}/secret","href":"/api-reference/endpoint/get-webhook-secret"},{"title":"List pending events for a CLI webhook endpoint","openapi":"get /v1/webhooks/{id}/events/pending","href":"/api-reference/endpoint/list-pending-webhook-events"},{"title":"Acknowledge a CLI webhook event","openapi":"post /v1/webhooks/{id}/events/{event_id}/ack","href":"/api-reference/endpoint/acknowledge-webhook-event"}]}]}]},"basePath":"","title":"Promote the test catalog to live (meters and products) - Creem","deploymentId":"dpl_EtLmMeZHkKGqAjV1DiX4ZXCriDj3","buildId":"dpl_EtLmMeZHkKGqAjV1DiX4ZXCriDj3","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CWRF67qg.js","snippetPresets-BR8BoZAC.js","utils-D5WEoDBM.js","style-to-object-BY3JEAdk.js","utils-B79vXYXV.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-C59iNs-S.js","conditional-requirements-CFM0id0Q.js","cloneDeep-455jK_K_.js","_Uint8Array-BEecbuUl.js","isObject-FP1Yky1u.js","ApiExamples-CFRHL52q.js","usePlaygroundInputsStore-Caip2xMX.js","shallow-BS-qcxmX.js","isEqual-CEpbaqh9.js","CodeSnippets-B-R0FAqw.js","CodeSnippet-Bkkti1IB.js","use-playground-group-access-BLvLSz8w.js","Page-UFatEFaf.js","api-description-markdown-Cny85OC3.js","DynamicMarkdown-Czhs88Hc.js","SectionHeading-B08KBUKT.js","MethodPill-D8OvWg5y.js","getPastedJson-tB5m0_yh.js","Check2Icon-CeP__a4S.js","axios-CsQoIw0U.js","Markdown-LI7DSqeK.js","AssistantPageLink-bYxdsqKl.js","dist-DXTH2WLA.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}