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

Miva Developer Docs

This function updates an attribute in an existing attribute template.


Description#

This function updates an attribute in an existing attribute template.

Request Parameters#

Parameter Type Required Description
AttributeTemplateattribute_id Number The id number of the attribute template attribute being updated
code String No Attribute Template attribute code
type String No Attribute selector type. One of: checkbox, radio, text, select, memo, swatch-select
prompt String No The prompt offered for selecting the attribute
price Number No The price of the attribute
cost Number No The cost of the attribute
weight Number No The weight of the attribute
required Boolean No Boolean value indicating if selecting the product attribute is required for purchase
inventory Boolean No Boolean value indicating if the product attribute is recorded in inventory
image String No Filepath for Attribute Image

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": "AttributeTemplateAttribute_Update",
    "AttributeTemplateAttribute_ID": 2,
    "Code": "shirt_color",
    "Prompt": "Shirt Color",
    "Image": "",
    "Type": "select",
    "Price": 10.0,
    "Cost": 20.0,
    "Weight": 1.0,
    "Required": 0,
    "Inventory": 1
}

Example Response#

{
    "success": 1
}

Error Responses#

Error Code Error Message Error Description
MER-UTL-QUOTES-00032 Attribute template not found Attribute template not found
MER-ATT-JSN-00036 Unable to load attribute template attribute: One of AttributeTemplateAttribute_ID, Edit_AttributeTemplateAttribute or AttributeTemplateAttribute_Code must be specified Attribute template attribute not found