Batch job‎ > ‎

Batch job download data

After the execution of the batch-job the data can be downloaded with the action download and the request-Id or the batch-job-name.

A batch job can contain three different tasks:
- Geocoding of addresses (geocoding) 
- Assigning customer addresses to destination addresses (routing) 
- Creation of the maps (map_creation)

The results of the batch jobs can be downloaded separately or in full.
This is done via the HTTP-GET-call to the batch job requestId/batch-job-name and the associated parameters:

action=download

Example:
https://maps1.locr.com/batch-processing/job_v2.php?action=download&request_id=<RequestId>

The result is a compressed zip file, containing all available data and can be stored locally.

Parameters to specify the download data:

download_only=<Parameter>

Parameter

Description

maps    

Get back all generated maps (JPEG-files) as Zip-File.

customer_addresses_not_geocoded

Download all imperfect customer addresses, that can't be geocoded

shop_addresses_not_geocoded

Download all imperfect destination addresses, that can't be geocoded

customer_addresses_geocoded

Download all geocoded customer addresses

shop_addresses_geocoded

Download all geocoded destination addresses

customer_addresses_all

Download all customer addresses

Download additional information like Geocodes (Latitude/Longitude) / Distance / Driving Time. [chargeable] *

shop_addresses_all

Download all destination addresses.

Download additional Information like Geocodes (Latitude/Longitude) / Distance / Driving Time. [chargeable] *

configuration    

Download configuration file.


Example:
https://maps1.locr.com/batch-processing/job_v2.php?action=download&request_id=<RequestId>& download_only=maps
https://maps1.locr.com/batch-processing/job_v2.php?action=download&request_id=<RequestId>& download_only=customer_addresses_geocoded

*Note: All addresses information is available to download for free! For additional information Distance, Driving Time or Geocodes additional cost can apply!

Additional information for parameter [
chargeable]*:
- customer_addresses_geocoded
- shop_addresses_geocoded
- customer_addresses_all
- shop_addresses_all

Parameter

Description

add_lat_long=1

Adds Geocodes (latitude / longitude) to the address export file

add_driving_time=1

Adds Driving Time to the address export file

add_distance=1

Adds Distance to the address export file

distance_unit=m|km|ft|mi (default: m)

Specifies which unit the distance information is to be exported in. (m = meter, km = kilometer, ft = feet, mi = miles)



To download the first 20 addresses for free for review or approval, use the additional parameter:

download_test_datasets=1

Download all addresses with additional information:

Downloading all addresses with additional geo-information (Geocodes, Distance or Dirving Time) must be confirmed with a token as the additional geo-information is chargeable.

Start HTTP-GET-Call:
https://maps1.locr.com/batch-processing/job_v2.php?action=download&request_id=<RequestId>& download_only=customer_addresses_all&add_lat_long=1

Sample for URL response:
<BatchProcessing>
    <Response>
        <MetaInfo>
            <RequestId>4fec2eb23a16880b77000000<
/RequestId>
            <Name>jobname</Name>
            <Created>2012-06-01 12:00:00</Created>
        </MetaInfo>
        <TokenRequired>12345678901234567890</
TokenRequired>
    </Response>
</BatchProcessing>

Token: 
12345678901234567890

HTTP-GET URL to start a complete maps production:
https://maps1.locr.com/batch-processing/job_v2.php?action=download&request_id=<RequestId>& download_only=customer_addresses_all&add_lat_long=1&token=12345678901234567890


The following parameters are optional
  • download_file_start
  • download_file_limit 
With these parameters a large number of addresses can be divided into smaller files for download. The starting value of an address file and the number of data, that should be included in one file, can be defined. This helps to reduce the download time for the data-files.
Example:
https://maps1.locr.com/batch-processing/job_v2.php?action=download&request_id=<RequestId>& download_only=maps&download_file_start=1& download_file_limit=10000


Error message:
Example request :
<?xml version="1.0" encoding="utf-8"?>
<Error type="PermissionError" subtype="ContractViolated">
    <Details>permanently prohibited</Details>
</Error>
Comments