Skip to content

Instantly share code, notes, and snippets.

@cflove
Created February 10, 2015 19:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save cflove/a7b6468453fb86ccffc3 to your computer and use it in GitHub Desktop.
Track UPS packages with ColdFusion. Simple skeleton.
<cfsavecontent variable= "x">
<?xml version="1.0"?>
<AccessRequest xml:lang='en-US'>
<AccessLicenseNumber></AccessLicenseNumber>
<UserId></UserId>
<Password></Password>
</AccessRequest>
<?xml version="1.0"?>
<TrackRequest>
<TrackingNumber>1ZA478X20198248503</TrackingNumber>
</TrackRequest>
</cfsavecontent>
<cfhttp url="https://wwwcie.ups.com/ups.app/xml/Track" method="post" result="local.result">
<cfhttpparam type="xml" name="data" value="#x#">
</cfhttp>
<!--- tracking --->
<cfdump var = "#XmlParse(local.result.filecontent).TrackResponse.Shipment.Package.Activity.Status.StatusType.Description.XmlText#" top="9999" />
<!--- error --->
<cfdump var = "#XmlParse(local.result.filecontent).TrackResponse.Response.Error.ErrorDescription.XmlText#" top="9999" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment