Skip to main content
PATCH
Update a product group

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.

Path Parameters

id
string
required

The product group ID

Query Parameters

dry_run
boolean

Send true to preview the write: the request runs as it would and is rolled back, so nothing is written. The answer is the one the real call would give: the same status (201 for a create) and errors, and the product group with write_result.dry_run true. The id of a product group a dry run would create is never stored: a GET of it answers 404. A product id or external_id that names no product of the store is a reference_not_found warning (path, key) instead of a 400: on a create that entry is left out of the answer, and on an update the stored members stay as they are. false or no parameter is a real call; any other value answers 400.

Body

application/json
name
string

The name of the product group, 3 to 255 characters.

description
string | null

A description of the product group. Send null to clear it.

external_id
string | null

Your own key for this product group. Unique per store, case-sensitive; 1 to 255 characters: letters, digits, _, -, . and :. A key another group of your store uses answers 409 with code external_id_taken. Omit it to leave the key unchanged; send null to clear it.

Example:

"pro-plans"

products
object[]

The complete ordered list of the group, each product named by exactly one of id or external_id: products it does not contain are removed, and its order is the display order. Omit it to leave the members unchanged.

Maximum array length: 100
upgrades_enabled
boolean

Whether customers can switch between the products of this group.

upgrade_behavior
enum<string> | null

How a switch between the products of this group is billed. Send null to clear it.

Available options:
proration-charge-immediately,
proration-charge,
proration-none
upsells_enabled
boolean

Whether the products of this group are offered as checkout upsells.

is_active
boolean

Whether the product group is active. Stored and returned; it does not yet stop upgrades or upsells.

Response

The updated product group

id
string
required

Unique identifier for the object.

mode
enum<string>
required

String representing the environment.

Available options:
test,
prod,
sandbox
object
string
required

String representing the object's type. Objects of the same type share the same value.

Example:

"product_group"

name
string
required

The name of the product group.

description
string | null
required

A description of the product group.

external_id
string | null
required

Your own key for this product group, or null when it has none.

products
object[]
required

The products in the group, in display order. A product is in one group at a time.

upgrades_enabled
boolean
required

Whether customers can switch between the products of this group.

upgrade_behavior
enum<string> | null
required

How a switch between the products is billed, or null for the default.

Available options:
proration-charge-immediately,
proration-charge,
proration-none
upsells_enabled
boolean
required

Whether the products of this group are offered as checkout upsells.

is_active
boolean
required

Whether the product group is active. Stored and returned; it does not yet stop upgrades or upsells.

created_at
string<date-time>
required

Creation date of the product group.

Example:

"2023-01-01T00:00:00Z"

updated_at
string<date-time>
required

Last updated date of the product group.

Example:

"2023-01-01T00:00:00Z"

write_result
object
required

What this write did and should tell you.