action api2cart_product_variant_add { label: "ProductVariantAdd" description: "Add variant to product." provider: api2cart method: POST path: "/product.variant.add.json" encoding: json input: { type: "object" required: ["model"] properties: { attributes: { type: "array" description: "Defines variant's attributes list" items: { type: "object" properties: { attribute_name: { type: "string" } attribute_price: { type: "number" } attribute_value: { type: "string" } } } } available_for_sale: { type: "boolean" description: "Specifies the set of visible/invisible product's variants for sale" } available_for_view: { type: "boolean" description: "Specifies the set of visible/invisible product's variants for users" } barcode: { type: "string" description: "A barcode is a unique code composed of numbers used as a product identifier." } clear_cache: { type: "boolean" description: "Is cache clear required" } cost_price: { type: "number" description: "Defines new product's cost price" } country_of_origin: { type: "string" description: "The country where the inventory item was made" } created_at: { type: "string" description: "Defines the date of entity creation" } description: { type: "string" description: "Specifies variant's description" } harmonized_system_code: { type: "string" description: "Harmonized System Code. An HSC is a 6-digit identifier that allows participating countries to classify traded goods on a common basis for customs purposes" } height: { type: "number" description: "Defines product's height" } lang_id: { type: "string" description: "Language id" } length: { type: "number" description: "Defines product's length" } manage_stock: { type: "boolean" description: "Defines inventory tracking for product variant" } manufacturer: { type: "string" description: "Specifies the product variant's manufacturer" } meta_description: { type: "string" description: "Defines unique meta description of a entity" } meta_keywords: { type: "string" description: "Defines unique meta keywords for each entity" } meta_title: { type: "string" description: "Defines unique meta title for each entity" } model: { type: "string" description: "Specifies variant's model that has to be added" } name: { type: "string" description: "Defines variant's name that has to be added" } price: { type: "number" description: "Defines new product's variant price" } product_id: { type: "string" description: "Defines product's id where the variant has to be added" } quantity: { type: "number" description: "Defines product variant's quantity that has to be added" } short_description: { type: "string" description: "Defines short description" } sku: { type: "string" description: "Defines variant's sku that has to be added" } special_price: { type: "number" description: "Specifies variant's model that has to be added" } sprice_create: { type: "string" description: "Defines the date of special price creation" } sprice_expire: { type: "string" description: "Defines the term of special price offer duration" } sprice_modified: { type: "string" description: "Defines the date of special price modification" } store_id: { type: "string" description: "Add variants specified by store id" } tax_class_id: { type: "integer" description: "Defines tax classes where entity has to be added" } taxable: { type: "boolean" description: "Specifies whether a tax is charged" } url: { type: "string" description: "Defines unique product variant's URL" } warehouse_id: { type: "string" description: "This parameter is used for selecting a warehouse where you need to set/modify a product quantity." } weight: { type: "number" description: "Weight" } weight_unit: { type: "string" description: "Weight Unit" } width: { type: "number" description: "Defines product's width" } } } output: { type: "object" properties: { result: { type: "object" properties: { product_variant_id: { type: "string" } } } return_code: { type: "integer" } return_message: { type: "string" } } } }