Skip to content

AttributeTemplateattribute_Update#


Description#

This function updates an attribute in an existing attribute template.

Request Parameters#

Parameter
Type Description
AttributeTemplateattribute_id Number The id number of the attribute template attribute being updated
code String Attribute Template attribute code
type String Attribute selector type
prompt String The prompt offered for selecting the attribute
price Number The price of the attribute
cost Number The cost of the attribute
weight Number The weight of the attribute
required Boolean Boolean value indicating if selecting the product attribute is required for purchase
inventory Boolean Boolean value indicating if the product attribute is recorded in inventory
image String Filepath for Attribute Image
default Boolean Boolean value indicating if the attribute 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": "beta",
    "Function": "AttributeTemplateAttribute_Update",
    "AttributeTemplateAttribute_ID": 2,
    "Code": "shirt_color",
    "Prompt": "Shirt Color",
    "Image": "",
    "Type": "select",
    "Price": 10.0,
    "Cost": 20.0,
    "Weight": 1.0,
    "Default": 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