I am new to using an API. I was having a problem logging in but solved that from reading comments on this support page. I now get a ‘404’ error so I think I must be getting the link construction wrong. My code constructs the URL as:
https://api.routexl.com/tour,locations=[{“address”:“Warehouse”,“lat”:“53.7665244”,“lng”:"-0.3304322"},{“address”:“Benenden C of E Primary School, Benenden Road, Beneden, Cranbrook, TN17 4EH”,“lat”:“51.0655159”,“lng”:“0.5790961”},{“address”:“Goudhurst and Kilndown Primary School, Beaman Close, Cranbrook Road, Goudhurst, TN17 1DZ”,“lat”:“51.1141263”,“lng”:“0.4680623”},{“address”:“Warehouse”,“lat”:“53.7665244”,“lng”:"-0.3304322"}]
I then send it using Excel VBA with this code:
Dim oHttp As Object
Set oHttp = CreateObject(“MSXML2.ServerXMLHTTP”)
Call oHttp.Open(“POST”, fn, False)
If (authUser <> vbNullString) Then
oHttp.setRequestHeader “Content-Type”, “application/json”
oHttp.setRequestHeader “Accept”, “application/json”
oHttp.setRequestHeader “Authorization”, “Basic " + _
EncodeBase64(authUser & “:” & authPass)
End If
Call oHttp.send(”")
httpGET = oHttp.responseText
Set oHttp = Nothing
and get the return message as:
404 Page Not Foundbody{margin:0;padding:30px;font:12px/1.5 Helvetica,Arial,Verdana,sans-serif;}h1{margin:0;font-size:48px;font-weight:normal;line-height:48px;}strong{display:inline-block;width:65px;}404 Page Not Found
The page you are looking for could not be found. Check the address bar to ensure your URL is spelled correctly. If all else fails, you can visit our home page at the link below.
Visit the Home PageI would be grateful for any help.
Thank you