Skip to content
extensions / Commerce extension
PUT/api/projects/{project_id}/extensions/2/products/{product_id}

Update product

Updates a product for a project extension from the submitted product JSON payload.

Authentication

Requirement
Required
Credential type
Bearer API key
Scopes
Not specified

Permissions

  • API-key requests must use a key with an active connection to the target project.

Headers

NameRequiredTypeDetails
AuthorizationYesNot specified
Description: Bearer credential used to authenticate the request.

Path Parameters

NameRequiredTypeDetails
project_idYesNot specified
Description: Target project identifier.
product_idYesNot specified
Description: Target product identifier.

Query Parameters

Request Body

Schema: ProductWriteRequest

FieldRequiredTypeDetails
nameNostring
Description: Product display name. Empty names are stored as Untitled.
slugNostring
Description: URL-safe product slug. When omitted, the API generates a unique slug from the product name.
priceNonumber|string
Description: Base product price. Numeric values and numeric strings are accepted.
product_typeNostring
Description: Product behavior and configuration type. Defaults to physical.
Allowed values: physicalvariablegroupedvirtualdownloadablebundle
category_slugNostring
Description: Category slug associated with the product when the extension uses slug-based category data.
descriptionNostring
Description: Product description content.
statusNostring
Description: Publication status. Defaults to draft.
Allowed values: draftactiveunlistedarchived
is_draftNoboolean
Description: Marks an initial product as a draft. The API also treats a missing name or slug as a draft.
categoriesNoarray<integer>
Description: Category IDs to attach to the product.
Items: integer
mediaNoarray<string|object>
Description: Product media. Each item can be a URL/path string or an object containing path, url, src, or image.
Items: string|object
Item shape: path stringurl stringsrc stringimage string
media_urlsNoarray<string|object>
Description: Alias for media.
Items: string|object
Item shape: url string
imagesNoarray<string|object>
Description: Alias for media.
Items: string|object
Item shape: url string
attribute_valuesNoobject<string,JSON>
Description: Values keyed by the project's product attribute code, such as sku, color, size, quantity, or weight.
Object shape: sku stringcolor string|array<string> example attribute keysize string|array<string> example attribute keyqty integerweight number
attributesNoarray<object>
Description: Attribute definitions used to configure a variable product.
Items: object
Item shape: code stringlabel stringvalues array<string>
variantsNoarray<object>
Description: Purchasable variants for a variable product.
Items: object
Item shape: title stringsku stringprice numberqty integerenabled booleanmedia array<string|object>attribute_values object<string,JSON>
group_itemsNoarray<object>
Description: Products included by a grouped product.
Items: object
Item shape: product_id integer|stringdefault_qty integerposition integer
bundle_pricing_modeNostring
Description: Whether bundle pricing comes from its items or the product's fixed base price.
Allowed values: dynamicfixed
downloadsNoarray<object>
Description: Files delivered for a downloadable product.
Items: object
Item shape: id integer|stringtitle stringurl stringmax_downloads integerexpires_in_days integer
virtual_servicesNoarray<object>
Description: Service options offered by a virtual product.
Items: object
Item shape: label stringprice numberduration_value integerduration_unit stringlocation stringallowed_countries array<string>allowed_regions array<string>allowed_cities array<string>allowed_postal_codes array<string>all_states booleanall_cities booleanall_postal_codes boolean
metaNoobject<string,JSON>
Description: Structured product configuration metadata.
skuNostring
Description: Primary stock-keeping unit. Stored as a product attribute value.
currencyNostring
Description: Currency code stored with the product's attribute data.
weightNonumber|string
Description: Product weight stored with the product's attribute data.
stock_quantityNointeger
Description: Available stock quantity.
track_stockNoboolean
Description: Whether inventory should be tracked for this product.
backordersNoboolean
Description: Whether orders may exceed available stock.
require_shippingNoboolean
Description: Whether checkout requires shipping for this product.

Response Body

Example 200 response

json
{
  "items": [],
  "total": 1
}

Errors

Availability

Available in
v0.1.0
Available since
v0.1.0
Implementation
Available
Deprecation
Not specified
Rate limits
Not specified