Batch Geocoder API Developer's Guide

Tools

When submitting a job using "wget" and "cURL", check field names (e.g., &outCols=recId,…) and field delimiter in the request for both the input and the output. wget and cURL will return a "400 Bad Request" response in case there is a mistype or when the delimiter does not match the delimiter in the input file. Both wget and cURL need a content type to be specified in the header. Uploading compressed address data is currently not supported.

wget

For wget use the header
Content-Type: text/plain

Example:

wget --header="Content-Type: text/plain; charset=UTF-8" --post-file=addresses.txt
  "https://batch.geocoder.cit.api.here.com
/6.2/jobs?
  &app_code={YOUR_APP_CODE}
  &app_id={YOUR_APP_ID}
  &action=run
  &header=true
  &inDelim=;
  &outDelim=,
  &outCols=recId,latitude,longitude,locationLabel
  &mailto={YOUR_EMAIL}
  &outputcombined=true
  &language=de-DE"

cURL

If you use cURL, be sure to add the following header
Content-Type: text/plain
and submit the payload using the --data-binary parameter.

Example:

curl -X POST -H "Content-Type: text/plain" --data-binary @addresses.txt
  "https://batch.geocoder.cit.api.here.com
/6.2/jobs?
  &app_code={YOUR_APP_CODE}
  &app_id={YOUR_APP_ID}
  &action=run
  &header=true
  &inDelim=;
  &outDelim=,
  &outCols=recId,latitude,longitude,locationLabel
  &mailto={YOUR_EMAIL}
  &outputcombined=true
  &language=de-DE"