createLinksFull¶
Request Method: POST
Description: Create a new Link or group of links from an existing node id with Category data, Rule Template, Contact details and assign a voxnumber.
URL: https://api.voxanalytics.com:444/Links?v=3&method=createLinksFull
The following parameters must 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 createNodes request:
<?xml version="1.0" encoding="utf-8"?>
<request>
<node>
<node_id>PB2</node_id>
<node_name>Peter Business</node_name>
<node_type>Business</node_type>
<links>
<link>
<link_id>Mark Business</link_id>
<link_name>Mark Business</link_name>
<link_type>Magazine</link_type>
<link_date>22-03-2011</link_date>
<rule_template_name>Call Mark</rule_template_name>
<!-- any For more information how to get the rules_variables go to getVariableRulesOfTemplate API method -->
<rules_variable>
<rule>
<rule_id>1</rule_id>
<rule_type>call</rule_type>
<rule_label>Call</rule_label>
<contact>
<contact_id>1</contact_id>
<business_phone>449789122233</business_phone>
<!-- any other fields from createContacts API method -->
</contact>
<caller_message>
<sound_files>
<sound_file>Sound Group 1|Sound File 1</sound_file>
</sound_files>
</caller_message>
<called_message>
<sound_files>
<sound_file>Sound Group 1|Sound File 2</sound_file>
<sound_file>Sound Group 2|Sound File 3</sound_file>
</sound_files>
</called_message>
</rule>
</rules_variable>
<assign_voxnumber>
<method>BY AREA</method>
<voxnumber_idd>44</voxnumber_idd>
<area_code>20</area_code>
</assign_voxnumber>
<categories>
<category>
<parent_category_id>1</parent_category_id>
<category_id>1</category_id>
<value>London</value>
</category>
<category>
....
</category>
</categories>
</link>
<link>
.......
</link>
</links>
</node>
</request>
Payload Description¶
The following parameters can be sent in the querystring
Node Name | Description | Default Value | Data Type | Mandatory |
node_id | Node ID to identify the Node by | STRING | YES | |
node_name | Name of the Node | STRING | YES | |
node_type | The type of Node | STRING | YES | |
node_date | A reference date to be stored alongside the Node. Node date format is YYYY-MM-DD HH:MM:SS with hours, minutes and seconds being optional. Hours, minutes and seconds defaults to 00:00:00. | CURRENT DATE | DATETIME | NO |
node>link_id | ID to identify the Link by in future API requests. Keyword AUTOINCREMENT() can be used here to set this to 1 greater than the total number of Links in account | STRING | YES | |
node>link_name | Name of the Link | STRING | YES | |
node>link_type | The type of Link | STRING | YES | |
node>link_date | A reference date to be stored alongside the Node. Node date format is YYYY-MM-DD HH:MM:SS with hours, minutes and seconds being optional. Hours, minutes and seconds defaults to 00:00:00 | CURRENT DATE/TIME | DATETIME | NO |
node>rule_template_name | The Name of the template we want to assign to the link. | STRING | NO | |
node>contact>display_name | The Display Name of the Contact we want to assign to the link. | STRING | NO | |
node>contact>first_name | The First Name of the Contact we want to assign to the link. | STRING | NO | |
node>contact>last_name | The Last Name of the Contact we want to assign to the link. | STRING | NO | |
node>contact>email | The Email of the Contact we want to assign to the link. | STRING | NO | |
node>contact>mobile_phone | The Phone of the Contact we want to assign to the link. | STRING | NO | |
node>assign_voxnumber>method | The method we want to use for assign a voxnumber. Possible Values: BY AREA, BY VOXNUMBER, BY POSTCODE | STRING | NO | |
node>assign_voxnumber>voxnumber_idd | The idd of the voxnumber we want to apply. E.G: 44 | INTEGER | YES for assign By AREA | |
node>assign_voxnumber>area_code | The area code of the voxnumber we want to apply. E.G: 020 for LONDON | INTEGER | YES for assign By AREA | |
node>assign_voxnumber>full_voxnumber | The full voxnumber we want to apply. E.G: 44203558656. This voxnumber must be in your account. | INTEGER | YES for assign By VoxNumber | |
node>assign_voxnumber>voxnumber_city | The VoxNumber's associated city name. | STRING | NO | |
node>assign_voxnumber>voxnumber_country | The VoxNumber's associated country name. List of supported countries for Postcode search | STRING | YES for assign By Postcode | |
node>assign_voxnumber>postcode | The full postcode you are searching for. | STRING | YES for assign By Postcode | |
node>assign_voxnumber>fallback_area_distance | If there is no VoxNumber available for the exact postcode, the fallback distance will return the closest within the range. | 0 | NUMBER | NO |
node>link>categories>category>category_id | Category ID of the category we want to add to the Link. | STRING | NO | |
node>link>categories>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 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. | STRING | NO | |
node>link>categories>category>value | The Value of the category we want to apply. | STRING | NO |
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 | Link ID x of y Empty | Add link_id for Link x (item) of y (total) |
400 | Link ID x of y already exists | Correct the link_id for Link x (item) of y (total) |
400 | Link Name x is already attached to Node y | Correct link name x so that it is unique within the links attached to Node y |
400 | Node ID x of y Empty | Add node_id for link x (item) of y (total) |
400 | Node ID x of y does not exist | Correct node_id for link x (item) of y (total) |
400 | Link Name x of y Empty | Add link_name for link x (item) of y (total) |
400 | Link Type x of y Empty | Add link_type for link x (item) of y (total) |
400 | Link Date x of y Invalid | Correct link_date for link x (item) of y (total) |
400 | Click to Call Status x of y Invalid | Correct click_to_call status for link x (item) of y (total) |
400 | Duplicate Link Name x for Node y in the XML | Correct link name so that it is unique within the links attached to Node y |
400 | Method x of y Empty | Add method x (item) of y (total) to the request |
400 | Method x of y Invalid | Correct method x (item) of y (total) to be "BY AREA" or "BY VOXNUMBER" |
400 | VoxNumber IDD x of y Empty | Add voxnumber_idd x (item) of y (total) |
400 | VoxNumber IDD x of y Invalid | Correct voxnumber_idd x (item) of y (total) |
400 | Voxnumber x of y Empty | Add an existing voxnumber to request x (item) of y (total) or change method |
400 | Voxnumber x of y is not an Integer | Correct the full voxnumber to request x (item) of y (total) or change method |
400 | Duplicate Voxnumber Received | Correct the duplicated full voxnumber in the XML |
400 | Area Code x of y Empty | Add a correct area code to request x (item) of y (total) or change method |
400 | Area Code x of y not an integer | Correct the area code request x (item) of y (total) or change method |
400 | Insufficient VoxNumbers available in Area Code x and Voxnumber IDD y | Buy more VoxNumbers in area x for Voxnumber IDD y or remove some requests until the required amount falls beneath the number available in account. Bare in mind that it counts as well the full voxnumbers. |
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 | Category Id x of y Empty | Add the Category ID 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) |
400 | Multiple matches for Sound Label (x) Sound Group: (y,z) | Specify the sound group (y,z) for this sound label (x) |
400 | There is no VoxNumber available in your account for this Postcode or the fallback area | Extra numbers need to be purchased in this area. |
400 | The country x is not supported for Postcode search | Choose a supported country of use an other "method". |
400 | Postcode x does not exist in country id y | Change the postcode for an existing one. |
500 | Internal Server Error | Retry later |