Javascript example not work


I have added the example in javascript in my code and when I run it, it gives me a url that answers an error 404. The url that is created is the following:[0][name]=1&locations[0][lat]=52.05429&locations[0][lng]=4.248618&locations[1][name]=2&locations[1][lat]=52.076892&locations[1][lng]=4.26975&locations[2][name]=3&locations[2][lat]=51.669946&locations[2][lng]=5.61852&locations[3][name]=4&locations[3][lat]=51.589548&locations[3][lng]=5.432482&locations[4][name]=5&locations[4][lat]=52.3702&locations[4][lng]=4.8951&locations[4][restrictions][ready]=10&locations[4][restrictions][due]=120

Can you help me please??


If you are getting a 404 you are probably not using POST to send the /tour request. Also note that locations should be a JSON encoded array. And, setting restrictions on the last location is not desirable. as the API considers the last location to be the finish point.

Please check the Javascript example at Github for more details.

We have tried the github example, and that is the result it gives us, error 404

We’ve double checked the github example and that works for us:


Can you share full code so we can check that?