Products > Options > optionsCreate
Commerce APIProductsOptionsoptionsCreate
optionsCreate
POST:options.json

Description

Create one or multiple options.

Permission bit: "options.create"

Topic: Options

Arguments

data: [OptionCreate!]!

Main argument for mutations.


shop_id: String!

Unique shop identifier. See also: Unique Identifiers

Example: "sh_EQzGqWoY"


Data Argument Fields

id: String!

A unique human-readable option identifier

Example: "size"

Valid when: id matches regexp pattern: ^[0-9a-z_]+$

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


meta: String

Metadata of the option

Example: "color"

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


name: String!

Name of the option

Example: "Size"

Valid when: name is not empty

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


values: [OptionValueCreate!]!

Option values


Result

[Option!]

Preview (typescript)

Loading module