Skip to main content
MUTATION
productsAdd(name: String, shortName: String, slug: String, categoryId: String, type: String, description: String, barcodes: [String], unitPrice: Float, salePrice: Float, compareAtPrice: Float, code: String, costPrice: Float, currency: String, mpn: String, gtin: String, requireShipping: Boolean, channels: [String], unlimitedQuantity: Boolean, saleStart: Date, saleEnd: Date, maxPerOrder: Int, maxPerCustomer: Int, isAvailable: Boolean, hideQuantity: Boolean, customFieldsData: JSON, attachment: AttachmentInput, attachmentMore: [AttachmentInput], media: [AttachmentInput], vendorId: String, uom: String, subUoms: JSON, taxType: String, taxCode: String, sku: String, externalUrl: String, source: String, status: String, productOptions: JSON, productVariants: JSON, priceRange: JSON, hasVariants: Boolean, weight: Float, weightUnit: String, dimensions: JSON, inventory: JSON, seo: JSON): Product

Arguments

name
String

Display name.

shortName
String

Short label for compact UI (cards, tags).

slug
String

URL-friendly identifier. Auto-generated from name when omitted.

categoryId
String

ProductCategory this product belongs to.

type
String

Product type / kind, e.g. product, service.

description
String

Long-form description (may contain HTML).

barcodes
[String]

Barcode values associated with this product.

unitPrice
Float

Regular unit price, in currency.

salePrice
Float

Discounted price, when on sale.

compareAtPrice
Float

Original price to show struck through next to a discounted price.

code
String

Stable code, unique within the workspace. Auto-generated when omitted.

costPrice
Float

Internal cost price, for margin reporting.

currency
String

ISO currency code for all price fields.

mpn
String

Manufacturer part number.

gtin
String

Global Trade Item Number (barcode standard).

requireShipping
Boolean

Whether this product requires physical shipping.

channels
[String]

Sales channels to publish this product to.

unlimitedQuantity
Boolean

When true, stock is not tracked. Default: false.

saleStart
Date

When salePrice becomes active.

saleEnd
Date

When salePrice expires.

maxPerOrder
Int

Maximum quantity allowed in a single order.

maxPerCustomer
Int

Maximum quantity allowed per customer overall.

isAvailable
Boolean

Whether the product can currently be purchased. Default: true.

hideQuantity
Boolean

When true, hides remaining stock count from customers.

customFieldsData
JSON

Custom field values keyed by field id. See Field.

attachment

Primary product image.

attachmentMore

Additional images.

Combined media gallery (images and other attachments).

vendorId
String

Supplying Company id, when tracked.

uom
String

Base unit of measure, e.g. piece, kg.

subUoms
JSON

Alternate units of measure with conversion factors.

taxType
String

Tax classification for this product.

taxCode
String

Tax code passed to external tax calculation.

sku
String

Stock keeping unit, separate from code.

externalUrl
String

Link to the product on an external storefront, when synced.

source
String

Origin system for imported/synced products.

status
String

Lifecycle status, e.g. active, disabled, draft. Default: active.

productOptions
JSON

Option definitions (e.g. color, size) used to generate variants, as JSON.

productVariants
JSON

Purchasable variants, each with its own price and stock, as JSON.

priceRange
JSON

Min/max price across variants, as JSON. Usually computed — set explicitly only to override.

hasVariants
Boolean

Whether this product is sold via productVariants rather than a single price.

weight
Float

Shipping weight, in weightUnit.

weightUnit
String

Unit for weight, e.g. kg, lb.

dimensions
JSON

Physical package dimensions, as JSON.

inventory
JSON

Stock tracking configuration, as JSON.

seo
JSON

SEO title, description, slug, and keywords, as JSON.

Returns

_id
String!
name
String

Display name.

shortName
String

Short label for compact UI (cards, tags).

slug
String

URL-friendly identifier.

status
String

Lifecycle status, e.g. active, disabled, draft.

code
String

Stable SKU-like code, unique within the workspace.

type
String

Product type / kind, e.g. product, service.

description
String

Long-form description (may contain HTML).

barcodes
[String]

Barcode values associated with this product.

unitPrice
Float

Regular unit price, in currency.

salePrice
Float

Discounted price, when on sale. Falls back to unitPrice when unset.

costPrice
Float

Internal cost price, for margin reporting.

currency
String

ISO currency code for all price fields.

categoryId
String

ProductCategory this product belongs to.

customFieldsData
JSON

Custom field values keyed by field id. See Field.

customFieldsDataByFieldCode
JSON

Custom field values keyed by stable field code.

createdAt
Date
updatedAt
Date
publishedAt
Date
createdBy
String
updatedBy
String
getTags
[Tag]

Resolved Tag objects for tagIds.

tagIds
[String]

Tag ids attached to this product.

attachment

Primary product image.

attachmentMore

Additional images.

media

Combined media gallery (images and other attachments).

vendorId
String

Supplying Company id, when tracked.

workspaceId
String
uom
String

Base unit of measure, e.g. piece, kg.

subUoms
JSON

Alternate units of measure with conversion factors.

vendor
taxType
String

Tax classification for this product.

taxCode
String

Tax code passed to external tax calculation.

sku
String

Stock keeping unit, separate from code.

externalUrl
String

Link to the product on an external storefront, when synced.

source
String

Origin system for imported/synced products (e.g. a connected store platform).

mpn
String

Manufacturer part number.

gtin
String

Global Trade Item Number (barcode standard).

requireShipping
Boolean

Whether this product requires physical shipping.

channels
[String]

Sales channels this product is published to.

unlimitedQuantity
Boolean

When true, stock is not tracked and the product is always orderable.

saleStart
Date

When the salePrice becomes active.

saleEnd
Date

When the salePrice expires.

maxPerOrder
Int

Maximum quantity allowed in a single order.

maxPerCustomer
Int

Maximum quantity allowed per customer overall.

isAvailable
Boolean

Whether the product can currently be purchased.

hideQuantity
Boolean

When true, hides remaining stock count from customers.

productOptions

Option definitions (e.g. color, size) used to generate productVariants.

productVariants

Purchasable variants, each with its own price and stock.

priceRange

Min/max price across productVariants, when hasVariants is true.

hasVariants
Boolean

Whether this product is sold via productVariants rather than a single price.

hasCatalogWarning
Boolean

Whether the catalog integration flagged an issue with this product (e.g. missing required field for a channel).

weight
Float

Shipping weight, in weightUnit.

weightUnit
String

Unit for weight, e.g. kg, lb.

Physical package dimensions.

Stock tracking configuration and current quantity.

SEO title, description, slug, and keywords for storefront pages.

Mutation
Response
آخر تعديل في ١١ أغسطس ٢٠٢٦