Category_Insert
#
Description#
This function allows you to insert a category.
Request Body Parameters#
Parameter |
Type | Description |
---|---|---|
Category_Code |
String | Category Code |
Category_Name |
String | Category Name |
Category_Active |
Boolean | Defaults to True if omitted |
Category_Page_Title |
String | Category Page Title |
Category_Parent_Category |
String | Parent Category Code of Category |
Category_Alternate_Display_Page |
String | Alternate page code for when using multiple category page templates |
customfield_values |
Object | An object containing a customfields object with custom fields to update. |
Response Parameters#
Parameter |
Type | Description |
---|---|---|
success |
Boolean | Boolean value indicating if the API request was successful |
Example Request#
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "Category_Insert",
"Category_Code": "sample",
"Category_Name": "Sample Category",
"Category_Active": true,
"Category_Page_Title": "Sample Category Page Title",
"Category_Parent_Category": "",
"Category_Alternate_Display_Page": "",
"CustomField_Values": {
"customfields": {
"checkbox_CUSTOMFIELD_CODE": true,
"imageupload_CUSTOMFIELD_CODE": "graphics/en-US/somecustomfieldimage.jpg",
"text_CUSTOMFIELD_CODE": "fffff",
"textarea_CUSTOMFIELD_CODE": "ggggg",
"dropdown_CUSTOMFIELD_CODE": "bbbbb",
"multitext_CUSTOMFIELD_CODE": ["hhhhh", "iiiii"]
},
"cmp-cssui-cattitle": {
"category_title_image": "graphics/en-US/somecustomfieldimage.jpg",
},
"cmp-cssui-pchdft": {
"header": "",
"footer": ""
},
"cmp-mv-prodctgy-meta": {
"keywords": "",
"description": ""
}
}
}
Example Response#
{
"success": 1
}
Error Responses#
Error Code | Error Message | Error Description |
---|---|---|
MER-JSN-00023 | One or more parameters are invalid | Missing required parameter |