attachCategoryToLink

Request Method: PUT

Description: Adds the specified category path to a link

URL: https://api.iovox.com:444/Links?v=3&method=attachCategoryToLink

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 attachCategoryToLink request:

<?xml version="1.0" encoding="utf-8"?>
<request>
     <link>
         <link_id>333</link_id>
         <parent_category_id>231</parent_category_id>
         <category_id>123</category_id>
         <value>Marketing</value>
     </link>
     <link>
         <link_id>333</link_id>
         <parent_category_id>124</parent_category_id>
         <category_id>124</category_id>
         <value>Golden</value>
     </link>
     <link>
         <link_id>444</link_id>
         <parent_category_id>200</parent_category_id>
         <category_id>230</category_id>
         <value>London</value>
     </link>
 </request>

Payload Description

Node NameDescriptionDefault ValueData TypeMandatory
link_id  The Link ID to apply the category to
STRINGYES
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 the Category ID does not exist. If you want to create a subcategory you will need to add a parent_category_id which exist already and a not empty value. If you do not want to create a new Category, label is not required.
INTEGERYES
category_idThe ID of the category to be attached (retrievable by the Categories method getCategoryID)
INTEGERYES
labelThe label of the category to be attached
STRINGYES
valueThe label of the category to be attached
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 PUT. x attemptedSwitch request method x to PUT
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 link to the request
400Link ID x of y EmptyAdd link_id x (item) of y (total)
400Link ID x of y does not existCorrect link_id x (item) of y (total)
400Category ID x of y EmptyAdd category_id x (item) of y (total)
400Category ID x of y not an integerCorrect category_id x (item) of y (total)
400Label x of y EmptyCorrect label x (item) of y (total)
400Category ID x already attached to link yCorrect category_id and label combination x (item) of y (total) or delete it from the xml.
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)
500Internal Server ErrorRetry later

Success Result

HTTP/1.1 204 No Content