BoxLang 🚀 A New JVM Dynamic Language Learn More...

DHL Parcel UK International CFML

v1.0.0 Modules

DHL Parcel UK International CFML

DHL Parcel UK International CFML provides a wrapper for the DHL Parcel UK International Web Services. At present, the module only includes access to the DHL sftp service for FSTAT file retrieval Further updates may include access to other DHL Parcel UK International APIs.

Installation

box install dhl-parcel-uk-int-cfml

Examples

Check out the /examples folder for an example implementation.

Usage

The DHL Parcel UK International CFML wrapper currently consists of a single model, to manage connection to the DHL SFTP server to download and process FSTAT files. The wrapper may be used standalone, or as a ColdBox module.

Standalone

	DHLUKINTTracking = new models.trackingFTP(
			sftpUsername 	= 'XXXXXXXX'
		,	sftpPassword 	= 'XXXXXXXX'
	);

ColdBox

DHLUKINTTracking 	= getInstance("trackingFTP@DHLParcelUKINTCFML");

alternatively inject it directly into your handler

property name="DHLUKINTTracking" inject="trackingFTP@DHLParcelUKINTCFML";

When using with ColdBox, you'll want to insert your API authentication details into your module settings:

DHLUKCFML = {
		sftpUsername 	= getSystemSetting("DHLUK_SFTPUSERNAME", "")
	,	sftpPassword 	= getSystemSetting("DHLUK_SFTPPASSWORD", "")
}

Retrieve tracking event data

Tracking event files are uploaded to the DHL SFTP server each day. The events component can be used to list, download and process these files.

fileList = DHLUKINTEvents.getFileList();
fileContents = DHLUKINTEvents.processRemoteFiles(
		dateRange 			= '2021-01-01,2021-01-31'
	,	removeFromServer 	= false
);

Author

Written by Gary Stanton.
https://garystanton.co.uk

$ box install dhl-parcel-uk-int-cfml

No collaborators yet.
 
  • {{ getFullDate("2022-06-15T16:00:09Z") }}
  • {{ getFullDate("2022-06-15T16:00:09Z") }}
  • 853
  • 1