Products > Products > productsCreate
Commerce APIProductsProductsproductsCreate
productsCreate
POST:products.json

Description

Create one or multiple products.

Permission bit: "products.create"

Topic: Products

Arguments

data: [ProductCreate!]!

Main argument for mutations.


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's length doesn't exceed 250 characters


import_id: String

If product is created as a result of import process, this is import process owner ID

Example: "ta_EQzGqWoY"


import_index: Int

If product is created as a result of import process, this is import index (e.g. CSV line)

Example: 56


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

Example: ""

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


meta_title: String

SEO-friendly title of the product

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

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


tiered_pricing_mode: TieredPricingMode

How to apply tiered pricing


title: String!

The name of the product

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