24/7 Support: 800.608.6482

Navigation


Option_Insert

This function inserts a new option into a product attribute.

Request Parameters

store_code Type:
String
Title:
Store Code
Store code to run the function against. Found in the Miva Admin under Settings > Store Details
function Type:
String
Title:
Option_Insert
The name of the function being executed
product_id Type:
Number
Title:
Product Id
The id number of the product receiving the option
attribute_id Type:
Number
Title:
Attribute Id
The id number of the attribute receiving the option
code Type:
String
Title:
Option Code
Option code
prompt Type:
String
Title:
Option Prompt
Name of the option prompt
image Type:
String
Title:
Option Image
Filepath for the option image
price Type:
Number
Title:
Option Retail Price
The price of the option
cost Type:
Number
Title:
Option Cost
The cost of the option
weight Type:
Number
Title:
Option Weight
The weight of the option
default Type:
Boolean
Title:
Option Default
Boolean value indicating if the inserted option is the default selection for the product attribute

Response Parameters

success Type:
Boolean
Title:
Status Response
Boolean value indicating if the api request was successful

Example Request

Example Response

Copyright © 1997 – 2026 Miva®, Miva Merchant®, MivaPay Vault®, Camp Miva®, Miva Connect®, Vexture℠, Miva, Inc. All Rights Reserved.