I am testing Here Maps Batch Geocode functionality.
Using Postman, I can submit a batch request as documented:
POST https://batch.geocoder.ls.hereapi.com/6.2/jobs?apiKey={apiKey}
&indelim=%7C
&outdelim=%7C
&action=run
&outcols=displayLatitude,displayLongitude,locationLabel,houseNumber,street,district,city,postalCode,county,state,country
&outputcombined=false
With body:
recId|searchText|country
0001|Lehargasse 7, 1070 Vienna, Austria|AUT
I get the following response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:SearchBatch xmlns:ns2="http://www.navteq.com/lbsp/Search-Batch/1">
<Response>
<MetaInfo>
<RequestId>zcnz4RB0JtU8qeWqP49jLuVnS81SHBz6</RequestId>
</MetaInfo>
<Status>accepted</Status>
<TotalCount>0</TotalCount>
<ValidCount>0</ValidCount>
<InvalidCount>0</InvalidCount>
<ProcessedCount>0</ProcessedCount>
<PendingCount>0</PendingCount>
<SuccessCount>0</SuccessCount>
<ErrorCount>0</ErrorCount>
</Response>
</ns2:SearchBatch>
But when I try to read the status by doing GET https://batch.geocoder.ls.hereapi.com/6.2/jobs/zcnz4RB0JtU8qeWqP49jLuVnS81SHBz6?apiKey={apiKey}&action=status
I get the following response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:SearchBatch xmlns:ns2="http://www.navteq.com/lbsp/Search-Batch/1">
<Response>
<MetaInfo>
<RequestId>zcnz4RB0JtU8qeWqP49jLuVnS81SHBz6</RequestId>
</MetaInfo>
<Status>completed</Status>
<JobStarted>2023-07-16T07:56:23.000Z</JobStarted>
<JobFinished>2023-07-16T07:56:25.000Z</JobFinished>
<TotalCount>1</TotalCount>
<ValidCount>1</ValidCount>
<InvalidCount>0</InvalidCount>
<ProcessedCount>1</ProcessedCount>
<PendingCount>0</PendingCount>
<SuccessCount>0</SuccessCount>
<ErrorCount>1</ErrorCount>
</Response>
</ns2:SearchBatch>
The request is executed but ends in error, I tried with other addresses, different number of addresses and they all end in error.
I can't find in the docs how to read the error message for single address so I can debug it.
Here Maps Batch Geocode is only available for the old developer apps. Its new version based on the Geocoding and Search API is under our internal testing phase and will be released soon. If you are using the app from the platform portal we recommend you wait for its next version.
Besides that, its batch processing is optimized for large batch jobs and there is a penalty for executing small jobs, such as those having less than 10 addresses. And as a general rule, a batch job should have either more than 100 addresses or be submitted at least 10 minutes after the previous job was submitted. Under no circumstances should a batch job be submitted more often than once a minute.
So if you are testing it, please make sure you are sending more records in the request payload, and do not send the request too frequently.