Products > Products > productsModify
Commerce APIProductsProductsproductsModify
productsModify
POST:products.json

Description

Modify one product.

At the moment modification is limited to one product at a time. This restriction may be lifted in the future.

Permission bit: "products.modify"

Topic: Products

Arguments

data: [ProductModify!]!

Main argument for mutations.


ids: [String!]!

List of product ids. See also: Unique Identifiers

Example: ["pd_EQzGqWoY"]


shop_id: String!

Unique shop identifier. See also: Unique Identifiers

Example: "sh_EQzGqWoY"


Data Argument Fields

ban_countries: [String!]

List of countries, allowed or denied depending on ban mode


ban_mode: ProductBanMode

Ban mode for country-based banning


brand_id: String

A brand of the product

Example: "br_EQzGqWoY"

Valid when: brand_id matches regexp pattern: ^br_


category_ids: [String!]

A set of category resource links product belongs to


custom_fields: [CustomFieldCreate!]


field_set_id: String

Field set for this product

Example: "pf_EQzGqWoY"

Valid when: field_set_id matches regexp pattern: ^pf_


google_product_category_code: Int

Google Product Category numeric code

Example: 499938


handle: String

A human-friendly unique string for the product automatically generated from its title

Example: "ipod-nano"

Valid when: handle is not empty

Valid when: handle's length doesn't exceed 250 characters


maximum_quantity: Int

Maximum amount of items customer can buy within one order

Example: 100

Valid when: maximum_quantity is a non-negative integer


meta_description: String

Meta description for SEO purposes

Translatable

Example: ""

Valid when: meta_description's length doesn't exceed 160 characters


meta_title: String

SEO-friendly title of the product

Translatable

Example: ""

Valid when: meta_title's length doesn't exceed 60 characters


minimum_quantity: Int

Minimum amount of items customer must order to buy a product

Example: 0

Valid when: minimum_quantity is a non-negative integer


published: Boolean

Whether server thinks product is published or not (depends on server time)

Example: false


published_at: String

The date and time when the product was published or null

Example: "2014-09-04T12:23:34Z"

Timestamp (RFC 3339)


raw_content: String

Raw content of the product

Translatable

Example: "{}"

Valid when: raw_content's length doesn't exceed 100000 characters


return_mode: ProductReturnMode

What to do if customer wants to return the product


review_dimension_set_id: String

Review dimension set for this product

Example: "rs_EQzGqWoY"

Valid when: review_dimension_set_id matches regexp pattern: ^rs_


sales_channel_ids: [String!]

A set of sales channel resource links product should be included into


subscription_only: Boolean

Whether this product can only be used with a subscription or not

Example: false


subscription_plans: [SubscriptionPlanCreate!]

Available subscription plans


tags: [String!]

Product tags (can be used for organization)


tiered_pricing_mode: TieredPricingMode

How to apply tiered pricing


title: String

The name of the product

Translatable

Example: "IPod Nano - 8GB"

Valid when: title is not empty

Valid when: title's length doesn't exceed 250 characters


Result

[Product!]

Preview (typescript)

Loading module