createCategories¶
Request Method: POST
Description: Create a new Category or set of Categories.
URL: https://api.iovox.com:444/Categories?v=3&method=createCategories
The following parameters can be sent in the querystring
Parameter | Description | Default Value | Data Type | Mandatory |
v | API version to use | INTEGER | YES |
Payload:¶
The following XML payload must be sent with an createCategories request:
<?xml version="1.0" encoding="utf-8"?>
<request>
<category>
<parent_category_id>1</parent_category_id>
<category_id>10</category_id>
<label>Location</label>
<value>London</value>
</category>
<category>
....
</category>
</request>
Payload Description¶
Node Name | Description | Default Value | Data Type | Mandatory |
category>parent_category_id | The ID of the Parent Category to attach to. For example, adding London to the parent Category for UK. This is only required if you want to create a subcategory you will need to add a parent_category_id which exist already and a not empty value. | STRING | NO | |
category>category_id | Category ID of the category we want to create | STRING | YES | |
category>label | The Label of the Top Category where we want to attach the new Category to. | STRING | YES | |
category>value | The Value of the Category we want to create. | STRING | YES |
Result¶
Error Result¶
HTTP Code | Error String | Resolution |
400 | API Version Empty | Add a value for the v parameter in the query string |
400 | API Version Invalid | Correct v parameter |
400 | Request Method must be POST. x attempted | Switch request method x to POST |
400 | XML Empty | Add xml to the request body |
400 | XML parse error. x at line y, column z | Correct XML at point x on line y, column z |
400 | Request Empty | Add at least one node to the request |
400 | Category ID x of y Empty | Add the Category ID for the Category x (item) of y (total) |
400 | Category ID x of y already exist | Correct the Category ID for the Category x (item) of y (total) |
400 | Parent ID x of y Empty | Add the Parent ID for the Category x (item) of y (total) |
400 | Parent ID x of y does not exist | Correct the Parent ID for the Category x (item) of y (total) |
400 | Label x of y Empty | Add the Label for the Category x (item) of y (total) |
400 | Label x of y does not exist | Correct the Label for the Category x (item) of y (total) |
400 | Value x of y Empty | Add the Value for the Category x (item) of y (total) |
500 | Internal Server Error | Retry later |