Introduction

Welcome to the Route4Me API tutorial!

You can use our API to solve a wide variety of business cases. In this tutorial, we'll be using several real-world examples to show what our API can do for you, with walk-through sample apps in many different programming languages and frameworks.

We have language bindings in the following languages: C#, VB.net, VBscript, Python, Java, PHP, Go, Perl, Curl (Windows), and Curl (Linux). Code examples can be found in the dark area to the right, and you can switch the programming language of the examples by using the tabs in the top right.

This tutorial will be updated regularly. Feel free to send any questions you might have to: suppo.[email protected][email protected].[email protected]oute4.[email protected]me.c.[email protected]om.

Helper Libraries

The following libraries are necessary for many of the examples listed in this tutorial:

HTTP Verbs

The API uses the appropriate HTTP verb for each action:

Verb Description
GET Used for retrieving resources
PUT Used for updating resources
POST Used for creating resources
DELETEUsed for deleting resources

Making Requests

POST requests must have a JSON encoded body and the following Content-Type: application/json header.

GET requests have parameters provided in the querysting.

All requests must be made over HTTPS.

Note
All GET query string parameters should be URL-encoded.

Responses

Responses are almost always JSON encoded. Only few of them are xml encoded.

As a rule, API response contains:

  • Success, a boolean indicating whether the call was successful or resulted in an error.
  • Message, an error message if the API call failed, or "Success" otherwise.
  • Response, the actual data returned by the API call.

Authentication

Every Route4Me SDK instance needs a unique API key. The API key can be retrieved from inside your Route4Me.com account. It's in the Settings tab called API.

Make sure to replace 11111111111111111111111111111111 with your API key.

You can obtain your API key by going to MyAccount –> API menu item.