Skip to content

AttributeTemplateAttributeList_Load_Query#


Description#

This function loads a list of attributes and attribute options from an Attribute Template.

Request Parameters#

Parameter
Type Description
AttributeTemplate_id Number The id number of the attribute template being loaded
count Number Maximum lines of data allowed to be returned in the response. This limit is used to prevent excessive amounts of data return
filter String A string for filtering returned data
offset Number Used with the Count parameter for paginating results of large datasets. Default 0 is no offset.
sort String The order for sorting returned data

Response Parameters#

Parameter
Type Description
success Number 1 indicating a successful request.
0 indicating an unsuccessful request
id Number Response id
attemp_id Number Attribute template id
default_id Number The default_id of the attribute template attribute list
disporder Number Number indicating display order position for the attribute option
code String Attribute Template attribute code
type String Attribute 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
options Object Attribute Template Attribute Options
options.id Number The id number of the option
options.attemp_id Number The id number of the attribute template
options.attmpat_id Number The id number of the attribute option in the attribute template
options.disporder Number Number indicating display order position for the attribute option
options.code String Attribute option code
options.prompt String Name of the attribute option prompt
options.price Number Attribute option price
options.cost Number The cost of the attribute option
options.weight Number The weight of the attribute option
options.image String Filepath for the attribute option image
options.default_opt Boolean Boolean value indicating if the attribute option is the default selection for the Attribute Template

Example Request#

{
    "Store_Code": "{{Store_Code}}",
    "Miva_Request_Timestamp": "{{$timestamp}}",
    "Function": "AttributeTemplateAttributeList_Load_Query",
    "AttributeTemplate_ID": 1,
    "Filter": [],
    "Sort": "disporder",
    "Offset": 0,
    "Count": 42
}

Example Response#

{
    "success": 1,
    "data": {
        "data": [
            {
                "id": 1,
                "attemp_id": 1,
                "default_id": 0,
                "disporder": 1,
                "code": "Size_att",
                "type": "select",
                "prompt": "size",
                "price": 0.0,
                "cost": 0.0,
                "weight": 0.0,
                "required": false,
                "inventory": true,
                "image": "",
                "options": [
                    {
                        "id": 1,
                        "attemp_id": 1,
                        "attmpat_id": 1,
                        "disporder": 1,
                        "code": "SM",
                        "prompt": "small",
                        "price": 0.0,
                        "cost": 0.0,
                        "weight": 0.0,
                        "image": "",
                        "default_opt": false
                    },
                    {
                        "id": 2,
                        "attemp_id": 1,
                        "attmpat_id": 1,
                        "disporder": 2,
                        "code": "MED",
                        "prompt": "medium",
                        "price": 0.0,
                        "cost": 0.0,
                        "weight": 0.0,
                        "image": "",
                        "default_opt": false
                    },
                    {
                        "id": 3,
                        "attemp_id": 1,
                        "attmpat_id": 1,
                        "disporder": 3,
                        "code": "LG",
                        "prompt": "large",
                        "price": 0.0,
                        "cost": 0.0,
                        "weight": 0.0,
                        "image": "",
                        "default_opt": false
                    },
                    {
                        "id": 4,
                        "attemp_id": 1,
                        "attmpat_id": 1,
                        "disporder": 4,
                        "code": "XL",
                        "prompt": "x-large",
                        "price": 0.0,
                        "cost": 0.0,
                        "weight": 0.0,
                        "image": "",
                        "default_opt": false
                    }
                ]
            }
        ],
        "start_offset": 0,
        "total_count": 5
    }
}

Error Responses#

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