Skip to main

API Technical Specs

Learn how to configure and leverage our services to achieve your toughest recruiting needs.
SaaS     |

Geocode and Index a Document

POST /v9/geocodeAndIndex

Geocodes a document and adds it to an index.

Notes

Request Body

ParsedDocumentrequiredstring
Parsed JSON from the Sovren Resume or Job Order Parser.
IndexIfGeocodeFailsrequiredbool
Indicates whether or not the document should still be added to the index if the geocode request fails. Default is false.
GeocodeOptionsrequiredobject
Settings to determine the form of geocoding for the transaction.
GeocodeOptions.Providerrequiredstring
The Provider you wish to use to geocode the postal address (current options are "Google" or "Bing"). If not specified, we will default to Google.
If passing a ProviderKey, this field is required.
GeocodeOptions.ProviderKeyrequiredstring
The Provider Key for the specified Provider. If using Bing you must specify your own provider key.
GeocodeOptions.PostalAddressrequiredobject
The postal address you wish to geocode. For best results, specify as many of the PostalAddress fields as possible. If provided, this address will be used to get the geocode coordinates instead of the address included in the ParsedDocument (if present), however, the address in the ParsedDocument will not be modified.
GeocodeOptions.PostalAddress.CountryCoderequiredstring
The ISO 3166-1 alpha-2 code indicating the country for the postal address.
GeocodeOptions.PostalAddress.PostalCoderequiredstring
The postal code (or zip code) for the postal address
GeocodeOptions.PostalAddress.Regionrequiredstring
The region (i.e. State for U.S. addresses) for the postal address.
GeocodeOptions.PostalAddress.Municipalityrequiredstring
The municipality (i.e. City for U.S. addresses) for the postal address
GeocodeOptions.PostalAddress.AddressLinerequiredstring
The address line (i.e. Street address for U.S. address) for the postal address
GeocodeOptions.GeoCoordinatesrequiredobject
The geographic coordinates (latitude/longitude) for your postal address. Use this if youalready have latitude/longitude coordinatesand simply wish to add them to your parsed document. If provided, these values will be inserted into your ParsedDocument and the address included in the ParsedDocument (if present), will not be modified.
GeocodeOptions.GeoCoordinates.Latituderequiredfloat
The latitude coordinate value.
GeocodeOptions.GeoCoordinates.Longituderequiredfloat
The longitude coordinate value.
IndexingOptionsrequiredobject
Settings to specify where to store the document.
IndexingOptions.IndexIdrequiredstring
When your account is enabled for Matching/Searching you can automatically index documents during the parse transactions. This determines what index to place the parsed document in. This is case-insensitive.
IndexingOptions.DocumentIdrequiredstring
When your account is enabled for Matching/Searching you can automatically index documents during the parse transactions. This determines what id to give to the parsed document. This is restricted to alphanumeric with dashes and underscores. All values will be converted to lower-case.
IndexingOptions.CustomIdsrequiredstring[]
The custom ids you want the document to have.

Sample Request

{ ... 
"ParsedDocument" :  "","IndexIfGeocodeFails" :  false,{ ... 
"Provider" :  "","ProviderKey" :  "",{ ... 
"CountryCode" :  "","PostalCode" :  "","Region" :  "","Municipality" :  "","AddressLine" :  ""
},
{ ... 
"Latitude" :  0,"Longitude" :  0
}
},
{ ... 
"IndexId" :  "","DocumentId" :  "",[ ... 
""
]
}
}

Response Body

Infoobject
Information explaining the outcome of the transaction.
Info.Codestring
A response code elaborating on the HTTP status code.
The following is a list of codes that can be returned by the service:

Success – Successful transaction

MissingParameter - A required parameter wasn't provided

InvalidParameter - A parameter was incorrectly specified

AuthenticationError - An error occurred with the credentials provided

Unauthorized - Your account doesn't have permission to perform this operation

DataNotFound - Data with the specified name wasn't found
Info.Messagestring
This message further describes the code providing additional detail.
Valueobject
Contains response data for the transaction.
Value.GeocodeResponseobject
If Request.GeocodeOptions.IncludeGeocoding is set to true (thus geocoding is executed), this object will be populated with a response.
Value.GeocodeResponse.GeocodedParsedDocumentstring
Parsed document containing the geocoded coordinates.
Value.GeocodeResponse.Codestring
Maps to the Response.Code parameter of a Geocode Transaction.
Value.GeocodeResponse.Messagestring
Maps to the Response.Message parameter of a Geocode Transaction.
Value.IndexingResponseobject
If Request.IndexingOptions contains any specified parameters, this object will be populated with a response.
Value.IndexingResponse.Codestring
Maps to the Response.Code parameter of a Index a Document Transaction.
Value.IndexingResponse.Messagestring
Maps to the Response.Message parameter of a Index a Document Transaction.
Value.CreditsRemainingdecimal
The number of remaining credits is returned with every response. Please ensure that you set up monitoring of this value to ensure that you don't experience an outage by letting your credits reach 0.

Sample Response

{ ... 
{ ... 
"Code" :  "","Message" :  ""
},
{ ... 
{ ... 
"GeocodedParsedDocument" :  "","Code" :  "","Message" :  ""
},
{ ... 
"Code" :  "","Message" :  ""
},
"CreditsRemaining" :  0
}
}