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

ParameterDescriptionDefault ValueData TypeMandatory
vAPI version to use INTEGERYES

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 NameDescriptionDefault ValueData TypeMandatory
node_idNode ID to identify the Node by STRINGYES
node_nameName of the Node STRINGYES
node_typeThe type of Node STRINGYES
node_dateA 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 DATEDATETIMENO
node>link_idID 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 STRINGYES
node>link_nameName of the Link STRINGYES
node>link_typeThe type of Link STRINGYES
node>link_dateA 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:00CURRENT DATE/TIMEDATETIMENO
node>rule_template_nameThe Name of the template we want to assign to the link. STRINGNO
node>contact>display_nameThe Display Name of the Contact we want to assign to the link. STRINGNO
node>contact>first_nameThe First Name of the Contact we want to assign to the link. STRINGNO
node>contact>last_nameThe Last Name of the Contact we want to assign to the link. STRINGNO
node>contact>emailThe Email of the Contact we want to assign to the link. STRINGNO
node>contact>mobile_phoneThe Phone of the Contact we want to assign to the link. STRINGNO
node>assign_voxnumber>methodThe method we want to use for assign a voxnumber. Possible Values: BY AREA, BY VOXNUMBER, BY POSTCODE STRINGNO
node>assign_voxnumber>voxnumber_iddThe idd of the voxnumber we want to apply. E.G: 44 INTEGERYES for assign By AREA
node>assign_voxnumber>area_codeThe area code of the voxnumber we want to apply. E.G: 020 for LONDON INTEGERYES for assign By AREA
node>assign_voxnumber>full_voxnumberThe full voxnumber we want to apply. E.G: 44203558656. This voxnumber must be in your account. INTEGERYES for assign By VoxNumber
node>assign_voxnumber>voxnumber_cityThe VoxNumber's associated city name. STRINGNO

node>assign_voxnumber>voxnumber_country

The VoxNumber's associated country name. List of supported countries for Postcode search STRINGYES for assign By Postcode
node>assign_voxnumber>postcodeThe full postcode you are searching for. STRINGYES 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.
Ex. If the fallback_area_distance is set to 20, the VoxNumber attached can be 15Kms away from the postcode, but not 25Kms.

0

NUMBER
(in Kilometers)

NO
node>link>categories>category>category_idCategory ID of the category we want to add to the Link. STRINGNO
node>link>categories>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 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. STRINGNO
node>link>categories>category>valueThe Value of the category we want to apply. STRINGNO

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
400Link ID x of y EmptyAdd link_id for Link x (item) of y (total)
400Link ID x of y already existsCorrect the link_id for Link x (item) of y (total)
400Link Name x is already attached to Node yCorrect link name x so that it is unique within the links attached to Node y
400Node ID x of y EmptyAdd node_id for link x (item) of y (total)
400Node ID x of y does not existCorrect node_id for link x (item) of y (total)
400Link Name x of y EmptyAdd link_name for link x (item) of y (total)
400Link Type x of y EmptyAdd link_type for link x (item) of y (total)
400Link Date x of y InvalidCorrect link_date for link x (item) of y (total)
400Click to Call Status x of y InvalidCorrect click_to_call status for link x (item) of y (total)
400Duplicate Link Name x for Node y in the XMLCorrect link name so that it is unique within the links attached to Node y
400Method x of y EmptyAdd method x (item) of y (total) to the request
400Method x of y InvalidCorrect method x (item) of y (total) to be "BY AREA" or "BY VOXNUMBER"
400VoxNumber IDD x of y EmptyAdd voxnumber_idd x (item) of y (total)
400VoxNumber IDD x of y InvalidCorrect voxnumber_idd x (item) of y (total)
400Voxnumber x of y EmptyAdd an existing voxnumber to request x (item) of y (total) or change method
400Voxnumber x of y is not an IntegerCorrect the full voxnumber to request x (item) of y (total) or change method
400Duplicate Voxnumber ReceivedCorrect the duplicated full voxnumber in the XML
400Area Code x of y EmptyAdd a correct area code to request x (item) of y (total) or change method
400Area Code x of y not an integerCorrect the area code request x (item) of y (total) or change method
400Insufficient VoxNumbers available in Area Code x and Voxnumber IDD yBuy 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.
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)
400Category Id x of y EmptyAdd the Category ID for the Category x (item) of y (total)
400Value x of y EmptyAdd the Value for the Category x (item) of y (total)
400Multiple matches for Sound Label (x) Sound Group: (y,z)Specify the sound group (y,z) for this sound label (x)
400There is no VoxNumber available in your account for this Postcode or the fallback areaExtra numbers need to be purchased in this area.
400The country x is not supported for Postcode searchChoose a supported country of use an other "method".
400Postcode x does not exist in country id yChange the postcode for an existing one.
500Internal Server ErrorRetry later

Success Result

HTTP/1.1 201 Created