I'd like to create a simple OneBox Module that grabs a zip code (XXXXX
or XXXXX-XXXX) and then passes that Zip code along to an API which
returns an XML result and validates the zip.
The API URL accepts the 5 digit zip XXXXX parameter within the URL
like this:
http://mysite.com/API.dll?API=AllCitiesInAZipCode&XML=<AllCitiesInAZipCodeRequest>Zip5>XXXXX</Zip5></AllCitiesInAZipCodeRequest>
When you enter that URL into your browser, you are returned an XML
like so:
<?xml version="1.0" ?>
<AllCitiesInAZipCodeResponse>
<Zip5>XXXXX</Zip5>
<ZipStatus>INVALID-ZIP CODE</ZipStatus>
</AllCitiesInAZipCodeResponse>
I'd like to have the OneBox module be able to validate if the zip code
is valid (by looking at the ZipStatus returned above). If the Zip is
valid, I'd like to present them with a link to a URL which passes the
searched 5 digit Zip to a separate URL.
Any information on getting this accomplished would be helpful!
Thanks!