Loqate, a GBG solution

Help Centre   |   Guides   |   Address, Email and Phone Verification   |   How to process a batch file via the API

How to process a batch file via the API

Before you start, make sure you have an Loqate account. If you don’t already have one, you will need to sign up here.

Prepare Your File For Uploading

Before you upload your file, check the following:

  • Make sure the file is UTF-8 encoded.
  • Make sure the file contains the word input in the name, for example "address-input.txt".
  • The file should have a .csv or .txt extension.
  • The first line should contain headers describing the field for each column, for example Address1, Address2, Country etc.
  • The format must be comma or tab delimited.

If you are unsure, you can use our base template for an idea of what the file should look like. You will still need to rename this to include "input" in the filename.

Upload the File

Use the following to upload your file.

POST https://api.addressy.com/Folders/Files/Upload/v1.00/json4.ws
File: filecontents
Filename: filename-input.txt
Key: yourlqtkey

Process the File

Once your file has uploaded, use the following to start the processing.

POST https://api.addressy.com/Cleansing/International/Batch/v1.00/json4.ws
Content-Type: application/json
  "BatchFile": true,
  "BatchFileName": "filenameusedinuploadrequest-input.txt",
  "Key": "yourlqtkey",
  "Delimiter": "tab"

Note: Valid values for the Delimiter parameter are "tab" or "comma". ServerOptions can also be set as outlined here.

Check the Job Status

At the moment, there are no progress indicators. However, you can call https://api.addressy.com/Folders/Files/Download/v1.00/json4.ws with the filename until the file becomes available. All output files are simply the input filename with "input" replaced with "output". For example, "address-input.txt" becomes "address-output.txt".

POST https://api.addressy.com/Folders/Files/Download/v1.00/json4.ws
Content-Type: application/json
  "Key": "yourlqtkey",
  "Filename": "address-output.txt"

An empty text response will be returned if the file is not ready yet. A full text response of the output is returned if the file is finished and ready.

If you prefer to use the UI instead, take a look at this guide.

Take a trial - no obligation, full support Get started