Created by potrace 1.16, written by Peter Selinger 2001-2019

Miva Developer Docs

This function inserts a new attribute option into an attribute template.


Description#

This function inserts a new attribute option into an attribute template.

Request Parameters#

Parameter Type Required Description
AttributeTemplate_id Number The id number of the attribute template
AttributeTemplateattribute_id Number The id number of the attribute template attribute
code String Yes Attribute Template attribute code to be inserted
prompt String Yes The prompt to be offered for selecting the inserted attribute
image String No Filepath for attribute image option
price Number No The price of the attribute option
cost Number No The cost of the attribute option
weight Number No The weight of the attribute option
default Boolean No Boolean value indicating if the attribute option is the default selection for the Attribute Template

Response Parameters#

Parameter Type Description
success Number 1 indicating a successful request.
0 indicating an unsuccessful request.

Example Request#

{
    "Store_Code": "{{Store_Code}}",
    "Miva_Request_Timestamp": "{{$timestamp}}",
    "Function": "AttributeTemplateOption_Insert",
    "AttributeTemplate_ID": 1,
    "AttributeTemplateAttribute_ID": 1,
    "Code": "XL",
    "Prompt": "x-large",
    "Image": "",
    "Price": 10.0,
    "Cost": 20.0,
    "Weight": 1.0,
    "Default": 0
}

Example Response#

{
    "success": 1
}

Error Responses#

Error Code Error Message Error Description
MER-UTL-QUOTES-00032 Attribute template not found Attribute template not found