Upload
client.bulkVerification.upload(BulkVerificationUploadParams { file, mappings, name, 6 more } body, RequestOptionsoptions?): BulkVerificationUploadResponse { data, message, status }
POST/v1/addver_lists
Upload a CSV file of addresses to be verified in bulk. Supply a mappings
object describing which CSV columns correspond to which address fields.
Upload
import fs from 'fs';
import PostGrid from 'postgrid-node';
const client = new PostGrid({
addressVerificationAPIKey: process.env['POSTGRID_ADDRESS_VERIFICATION_API_KEY'], // This is the default and can be omitted
});
const response = await client.bulkVerification.upload({
file: fs.createReadStream('path/to/file'),
mappings: { line1: 'line1' },
name: 'name',
});
console.log(response.data);{
"data": {
"id": "id",
"cost": 0,
"count": 0,
"createdAt": "2019-12-27T18:11:19.117Z",
"file": "file",
"mappings": {
"line1": "line1",
"city": "city",
"country": "country",
"firstName": "firstName",
"fullName": "fullName",
"lastName": "lastName",
"line2": "line2",
"postalOrZip": "postalOrZip",
"provinceOrState": "provinceOrState"
},
"name": "name",
"organization": "organization",
"status": "status",
"updatedAt": "2019-12-27T18:11:19.117Z",
"useGeocode": true,
"useIntlVerification": true,
"useProperCase": true,
"user": "user",
"defaultCountry": "defaultCountry",
"metadata": {
"statusCount": {
"corrected": 0,
"failed": 0,
"verified": 0
}
},
"numInvalidRows": 0,
"result": "result",
"runCCOA": true,
"runNCOA": true
},
"message": "message",
"status": "success"
}Returns Examples
{
"data": {
"id": "id",
"cost": 0,
"count": 0,
"createdAt": "2019-12-27T18:11:19.117Z",
"file": "file",
"mappings": {
"line1": "line1",
"city": "city",
"country": "country",
"firstName": "firstName",
"fullName": "fullName",
"lastName": "lastName",
"line2": "line2",
"postalOrZip": "postalOrZip",
"provinceOrState": "provinceOrState"
},
"name": "name",
"organization": "organization",
"status": "status",
"updatedAt": "2019-12-27T18:11:19.117Z",
"useGeocode": true,
"useIntlVerification": true,
"useProperCase": true,
"user": "user",
"defaultCountry": "defaultCountry",
"metadata": {
"statusCount": {
"corrected": 0,
"failed": 0,
"verified": 0
}
},
"numInvalidRows": 0,
"result": "result",
"runCCOA": true,
"runNCOA": true
},
"message": "message",
"status": "success"
}