Skip to content

Option_Insert#


Description#

This function inserts a new option into a product attribute.

Request Parameters#

Parameter
Type Description
attribute_id
edit_attribute
attribute_code
Number
String
String
The id number of the attribute
The code of the attribute
The code of the attribute
product_id
Edit_Product
Product_Code
Product_SKU
Number
String
String
String
ID Number of product
Product code string
Product code string
Product SKU string
code String Option code
prompt String Name of the option prompt
image String Filepath for the option image
price Number The price of the option
cost Number The cost of the option
weight Number The weight of the option
default Boolean Boolean value indicating if the inserted option is the default selection for the product attribute

Response Parameters#

Parameter
Type Description
success Boolean Boolean value indicating if the api request was successful

Example Request#

{
    "Store_Code": "{{Store_Code}}",
    "Miva_Request_Timestamp": "{{$timestamp}}",
    "Function": "Option_Insert",
    "Product_ID": 1,
    "Attribute_ID": 6,
    "Code": "red",
    "Prompt": "Red",
    "Image": "",
    "Price": 0.0,
    "Cost": 0.0,
    "Weight": 0.0,
    "Default": 0
}

Example Response#

{
    "success": 1
}