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
Parameter | Description | Default Value | Data Type | Mandatory |
v | API version to use | INTEGER | YES |
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 Name | Description | Default Value | Data Type | Mandatory |
link_id | The Link ID to apply the category to | STRING | YES | |
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 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. | INTEGER | YES | |
category_id | The ID of the category to be attached (retrievable by the Categories method getCategoryID) | INTEGER | YES | |
label | The label of the category to be attached | STRING | YES | |
value | The label of the category to be attached | 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 PUT. x attempted | Switch request method x to PUT |
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 link to the request |
400 | Link ID x of y Empty | Add link_id x (item) of y (total) |
400 | Link ID x of y does not exist | Correct link_id x (item) of y (total) |
400 | Category ID x of y Empty | Add category_id x (item) of y (total) |
400 | Category ID x of y not an integer | Correct category_id x (item) of y (total) |
400 | Label x of y Empty | Correct label x (item) of y (total) |
400 | Category ID x already attached to link y | Correct category_id and label combination x (item) of y (total) or delete it from the xml. |
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) |
500 | Internal Server Error | Retry later |