Publish a subscription product from test to production environment. This is a one-way, first-publish-only operation.
POST /v1/actions/subscription-product/publish-product
Authentication: API Key
Do not include the X-Environment header for this endpoint. Publishing is always one-way from test to production.
Request Body
| Field | Type | Required | Description |
|---|
id | string | Yes | Product ID (PROD_xxx format) |
Example Request
await client.subscriptionProducts.publish({
id: "PROD_3F7H2J5L8N1Q4S6U",
});
Only the first publish is supported. Once a product has a production version, this endpoint returns an error. To update a published product, use the Update Product endpoint in the production environment.
Error Responses
| Status | Condition |
|---|
400 | Product has no test version |
400 | Test version is not active |
400 | Product already has a production version |
404 | Product not found |