Best Practices When Using The PostalMethods API

We welcome developers to contribute to the Best Practices page, located in the Developer's Guide section.

The purpose of this page is to serve as a knowledge base, aggregating comments, tips and suggestions by developers who have used the PostalMethods API. Please share all those things you have encountered while developing, which you wished you would have known before, in order to better design your application.

This is the place to share language-specific or environment-specific how-to’s. We may add specializing threads later on if needed.

Please share things you find obvious or trivial. They may be well appreciated by others.

Thank you all!


Some Best

Some Best Practices:

  1. Updating letter status: You may use the status query methods to check on your letters' status and you may have PostalMethods contact you whenever a status changes, by using "Push" Feedback. Also read Feedback By "Push" vs. "Pull". We recommend implementing the push feedback because (a) you are notified of changes as they occur; and (b) less resources are wasted. In addition, we recommend polling for statuses in low frequency, just as a fail-safe mechanism.
  2. Status codes may be added: Status codes may be added when new features become available so, in case you add codes and descriptions to your application, make sure it can handle unfamiliar codes.
  3. Rendering documents to PDF is a lengthy operation: Documents sent to PostalMethods are rendered to PDF format (even if the document was originally a PDF document). In case you automatically try to GetPDF, note that the rendering process is relatively lengthy and depends on the type of document, its size, remote images to download and current system load.
  4. It is not always possible to cancel the delivery of a letter: Cancel Delivery is only possible before the letter was printed. Make sure your application is ready to handle failure codes when trying to cancel a delivery.

Sending to international

Sending to international addresses: When sending letters internationally, the last address line must include only the country name. Please check the valid names of countries.