BatchGeocode - SOAP 1.2 V1

BatchGeocode

SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

Version 1.0, Basic, Enterprise

Method Signature

GeocodeResponse[] BatchGeocode(Credentials c, Location[])

Example Code


POST /Webservices/v1/PRIMEEnterpriseV1.asmx HTTP/1.1
Host: prime.promiles.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <BatchGeocode xmlns="http://promiles.com/">
      <c>
        <Username>string</Username>
        <Password>string</Password>
        <CompanyCode>string</CompanyCode>
      </c>
      <Locations>
        <Location>
          <ProMilesLocationID>int</ProMilesLocationID>
          <Address>string</Address>
          <City>string</City>
          <State>string</State>
          <PostalCode>string</PostalCode>
          <Latitude>decimal</Latitude>
          <Longitude>decimal</Longitude>
          <LocationText>string</LocationText>
          <Label>string</Label>
          <Type>PROMILES or TRUCKSTOPS or REST_AREAS or WEIGH_SCALES</Type>
          <LocationProperties>
            <LocationProperty xsi:nil="true" />
            <LocationProperty xsi:nil="true" />
          </LocationProperties>
        </Location>
        <Location>
          <ProMilesLocationID>int</ProMilesLocationID>
          <Address>string</Address>
          <City>string</City>
          <State>string</State>
          <PostalCode>string</PostalCode>
          <Latitude>decimal</Latitude>
          <Longitude>decimal</Longitude>
          <LocationText>string</LocationText>
          <Label>string</Label>
          <Type>PROMILES or TRUCKSTOPS or REST_AREAS or WEIGH_SCALES</Type>
          <LocationProperties>
            <LocationProperty xsi:nil="true" />
            <LocationProperty xsi:nil="true" />
          </LocationProperties>
        </Location>
      </Locations>
    </BatchGeocode>
  </soap12:Body>
</soap12:Envelope>


HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <BatchGeocodeResponse xmlns="http://promiles.com/">
      <BatchGeocodeResult>
        <GeocodeResponse>
          <GeocodedLocation>
            <ProMilesLocationID>int</ProMilesLocationID>
            <Address>string</Address>
            <City>string</City>
            <State>string</State>
            <PostalCode>string</PostalCode>
            <Latitude>decimal</Latitude>
            <Longitude>decimal</Longitude>
            <LocationText>string</LocationText>
            <Label>string</Label>
            <Type>PROMILES or TRUCKSTOPS or REST_AREAS or WEIGH_SCALES</Type>
            <LocationProperties xsi:nil="true" />
          </GeocodedLocation>
          <IsGeocoded>boolean</IsGeocoded>
          <ResponseStatus>SUCCESS or USER_ERROR or BAD_TRIP_LOCATION or AUTHENTICATION_FAIL or SERVER_ERROR or ENGINE_ERROR or UNKNOWN or UNPROCESSED</ResponseStatus>
          <ReponseMessage>string</ReponseMessage>
        </GeocodeResponse>
        <GeocodeResponse>
          <GeocodedLocation>
            <ProMilesLocationID>int</ProMilesLocationID>
            <Address>string</Address>
            <City>string</City>
            <State>string</State>
            <PostalCode>string</PostalCode>
            <Latitude>decimal</Latitude>
            <Longitude>decimal</Longitude>
            <LocationText>string</LocationText>
            <Label>string</Label>
            <Type>PROMILES or TRUCKSTOPS or REST_AREAS or WEIGH_SCALES</Type>
            <LocationProperties xsi:nil="true" />
          </GeocodedLocation>
          <IsGeocoded>boolean</IsGeocoded>
          <ResponseStatus>SUCCESS or USER_ERROR or BAD_TRIP_LOCATION or AUTHENTICATION_FAIL or SERVER_ERROR or ENGINE_ERROR or UNKNOWN or UNPROCESSED</ResponseStatus>
          <ReponseMessage>string</ReponseMessage>
        </GeocodeResponse>
      </BatchGeocodeResult>
    </BatchGeocodeResponse>
  </soap12:Body>
</soap12:Envelope>

Notes

If more than 250 locations are received, the service will only return the first 250.

Related

GeocodeResponseCredentialsLocation