Fun With Web Services: PostalMethods (Part 2)

In my previous post, I gave a brief introduction to Web Services and started to discuss PostalMethods, one of many public Web Services available that can be invoked by EBI.  Today’s blog will focus on how I configured EBI to use the PostalMethods API along with some useful features that can taken advantage of in their control panel.

Before constructing an Invoice spreadsheet that I was going to use for this proof of concept, I still needed to know how to submit the recipient’s address to PostalMethods.  PostalMethods supports two methods of submitting the recipient’s address:  Address Inside and Address Outside.  “Address Inside” means that it is up to the software to embed the recipient’s address in the document, and PostalMethods will extract this information for record keeping.  “Address Outside” means the recipient’s address is found outside of the document, and PostalMethods will embed the address in the document for you.  PostalMethods does not support “Address Inside” for Excel and a few other file types.  I prefer the “Address Outside” approach because you leave it up to PostalMethods to embed the recipient’s address in the correct location of your document so that it is folded and displayed correctly through the envelope.

I was now ready to test PostalMethods.  I created an Invoice spreadsheet template following the specifications for how to set my margins.  Next, I imported PostalMethod’s WSDL along with the Invoice spreadsheet into EBI, created some test data in a database, imported the database information into EBI, and created a Database to Excel transformation to produce an Invoice spreadsheet.  This spreadsheet was then base 64 encoded and packed into an XML document along with my username/password for PostalMethods and the recipient’s address.  Finally, I invoke the Web Service Consumer using the XML I just assembled as my SOAP request.  I then get a -900 status code, which means it was submitted to PostalMethods for processing (list of returned status codes).

PostalMethods will send you an email confirming that it received the document.  The Excel document is then converted into a PDF document, followed by embedding the recipient’s address in the appropriate position.  An email notification is sent when this process is finished.  While waiting for PostalMethods to dispatch, you may login to PostalMethod’s control panel to view the status of your document and also view a simulation of how your document will look when you receive it printed.  What I really like is that it also gives you a sample image of how the document will look folded inside of the envelope.  I used this envelope preview a lot when I was tweaking the Invoice spreadsheet template so that the sender’s address displays correctly.  Finally, an email notification is sent when PostalMethods has delivered the letter to the post office.

You can sign up for a free account to test PostalMethods.  While in Development mode, it will not actually print and mail the document, it will only simulate the process.  For this exercise, I purchased their $10 plan and sent the Invoice to my home address.  Three business days later, I received the letter!

Scan of the sample Invoice spreadsheet sent from PostalMethods invoked by EBI.

Scan of the sample Invoice spreadsheet sent from PostalMethods invoked by EBI.

If you do not mind exposing possibly sensitive information to a company like Interfax US Inc. (the company that owns PostalMethods and InterFAX, a site that offers a public API for sending and receiving faxes), I would recommend using the PostalMethods service if you need to automate sending snail mail via EBI.

2 thoughts on “Fun With Web Services: PostalMethods (Part 2)

  1. PostalMethods

    Hi Matt,

    Thank you for using PostalMethods to demonstrate how easy it is to integrate postal mail capabilities to enterprise systems using EBI.

    Please note that it is also possible to get status feedback using SOAP or POST so the system sending the letter or postcard may be updated automatically instead of a person receiving an email. Please see our Push Feedback instructions:

    Best Regards,

  2. Pingback: Tweets that mention Fun With Web Services: PostalMethods (Part 2) | EXTOL Technology Blog --

Leave a Reply

Your email address will not be published. Required fields are marked *