Automatically Extracting Text with OCR from Field Captured Images
Route4Me’s OCR (optical character recognition) tool allows you to automatically extract text from uploaded images.
Description
This tool makes the route planning process faster and easier. Let’s say you have a printed sheet of contacts and addresses you need to transfer to Route4Me. If you have a lot of contacts, all that information would take a long time to type up manually.
But with our OCR tool, all you need to do is scan the sheet, and our software does the rest. The information will be transferred automatically. Piece of cake.
This tool is also helpful for when you’re out in the field. For example, when a new prospect hands you a business card, you can use it to quickly record their contact information. A business card is easy to lose – so why chance it?
Overall, you can use our OCR tool to make managing your business data much simpler.
Solution
Create an Optimization
Let’s choose the Single Driver Round Trip option for this use case. Here are the parameters for an optimization problem:
Parameter | Type | Description | HTTP method |
---|---|---|---|
api_key | string | API KEY of the user | GET |
redirect | integer | if equal to 1, will be redirected, if 0 - not | GET |
addresses | array | Valid JSON array of Address objects. Click here to see the JSON Schema | POST |
parameters | Route Parameters | Valid JSON string of RouteParameters object. Click here to see the JSON Schema | POST |
The addresses on the map will appear as below:

You can create a new optimization for this use case example. From the cUrl example bellow you can see that:
- The endpoint for this task is https://www.route4me.com/api.v4/optimization_problem.php
- input data is stored in the file single_driver_round_trip_data.json
Parameter | Type | Description |
---|---|---|
api_key | string | API KEY of the user |
input data | POST data | Valid JSON object string. Click here to see the JSON Schema |
You can expect an Optimization problem (see link), which has generated a route already.
View Optimization Details
The endpoint: https://www.route4me.com/api.v4/optimization_problem.php
HTTP Parameters
Attribute | Type | Description | HTTP method |
---|---|---|---|
api_key | string | API KEY of the user | GET |
optimization_problem_id | string | Optimization problem ID | GET |
See sample RESPONSE JSON data here
The system will send a RESPONSE with an array of the addresses, which belongs to one round-trip route.
Details Of The Optimized Route
Details of your optimized route are available.
The endpoint: https://www.route4me.com/api.v4/route.php
HTTP Parameters
Attribute | Type | Description | HTTP method |
---|---|---|---|
api_key | string | API KEY of the user | GET |
route_id | string | Route ID | GET |
route_path_output | string | If equal to 'Poitns', you'll get an array of the path points to next address | GET |
See sample RESPONSE JSON data here
- Note
- In the RESPONSE you can see the array of the fields path_to_next. Those will be used to draw routes on a map, exactly as they are generated by the Route4Me API.
Upload An Image As A Note To An Address
You can uplod an image to a route destination as a note and Route4Me will automatically extract the text from it.
Let’s add notes to the addresses selected on the map below:

We’ll add this image with addresses on it.

The endpoint: https://www.route4me.com/actions/addRouteNotes.php
HTTP Parameters (see JSON schema here)
Attribute | Type | Description | HTTP method |
---|---|---|---|
api_key | string | API KEY of the user | GET |
route_id | string | Route ID | GET |
address_id | intenger | Address ID | GET |
dev_lat | double | Device location latitude | GET |
dev_lng | double | Device location longitude | GET |
strFilename | string | A file name to be uploaded | POST |
device_type | string | Device type. ENUM("web", "iphone", "ipad", "android_phone", "android_tablet") | GET |
strUpdateType | string | File type. ENUM("DRIVER_IMG", "VEHICLE_IMG", "ADDRESS_IMG", "CSV_FILE", "XLS_FILE", "ANY_FILE") | GET |
You’ll get this API response:
Get Extracted Text From A Destination
You can retrieve an uploaded note and see extracted text from the custom field "OCR_Fulltext".
The endpoint: https://www.route4me.com/api.v4/address.php
HTTP Parameters
Attribute | Type | Description | HTTP method |
---|---|---|---|
api_key | string | API KEY of the user | GET |
route_id | string | Route ID | GET |
route_destination_id | intenger | Route destionation ID | GET |
notes | intenger | If equal to 1, the notes will be returned in the response | GET |
See sample RESPONSE JSON data here
Pay attention to this parameter:
Upload Another Image As A Note To An Address
Let’s upload this image to a second address:

The endpoint and parameters for this are the same as they were in the previous topic Upload An Image As A Note To An Address
See sample RESPONSE JSON data here
Pay attention to this parameter:
Get Extracted Text From An Uploaded Image
The endpoint and parameters for this are the same as they were in the previous topic Get Extracted Text From A Destination.
See sample RESPONSE JSON data here
Pay attention to this parameter: