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

ParameterDescriptionDefault ValueData TypeMandatory
vAPI version to use
INTEGERYES

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 NameDescriptionDefault ValueData TypeMandatory
category>parent_category_idThe 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.

STRINGNO
category>category_idCategory ID of the category we want to create
STRINGYES
category>labelThe Label of the Top Category where we want to attach the new Category to.
STRINGYES
category>valueThe Value of the Category we want to create.
STRINGYES

Result

Error Result

HTTP CodeError StringResolution
400API Version EmptyAdd a value for the v parameter in the query string
400API Version InvalidCorrect v parameter
400Request Method must be POST. x attemptedSwitch request method x to POST
400XML EmptyAdd xml to the request body
400XML parse error. x at line y, column zCorrect XML at point x on line y, column z
400Request EmptyAdd at least one node to the request
400Category ID x of y EmptyAdd the Category ID for the Category x (item) of y (total)
400Category ID x of y already existCorrect the Category ID for the Category x (item) of y (total)
400Parent ID x of y EmptyAdd the Parent ID for the Category x (item) of y (total)
400Parent ID x of y does not existCorrect the Parent ID for the Category x (item) of y (total)
400Label x of y EmptyAdd the Label for the Category x (item) of y (total)
400Label x of y does not existCorrect the Label for the Category x (item) of y (total)
400Value x of y EmptyAdd the Value for the Category x (item) of y (total)
500Internal Server ErrorRetry later

Success Result

HTTP/1.1 201 Created