The API is a SOAP-based webservice allowing the creation, proofing and confirmation of orders for mailings and single letters. As with the website, Documents (PDF or Word files) are submitted, along with address(es).
Through the API, addresses can be submitted either in the same form as to the website (CSV, XLS files), or in mailing objects populated in code. The Documents are most commonly submitted as byte arrays.
Once the order has been created, a PDF proof is returned and can be reviewed by the end user prior to their confirmation of the order.
Payment through the API is achieved via Top-Up credit on the customer Account, or for large volume users, payment on invoice may be available (subject to volume and regularity of orders).
Examples in the API documentation are based around Microsoft Visual Basic .Net © code and the Microsoft Visual Studio 2008 © development environment.
The API now supports Envelope Size selection, along with access to the Postcard and Greeting Card products via the TemplateType property (single character) of the Mailing Class. This means you can now send custom postcards directly via our API!
the TemplateType property of the Template Class remains unchanged and must therefore only be set to 'D' (standard document) or 'S' (PDF document stream).
C5 envelope (standard envelopes - A4 paper folded in half):
D = Standard Document
S = PDF Document Stream (see Webservice Help Guide for more details)
C4 envelope (envelope size for full [not folded] A4 paper):
4 = C4 envelope
C = PDF Document Stream with C4 envelope
A5 Postcard - Left Address (2 sided, colour, address on left side):
5 = A5 Postcard - Address on LEFT side
P = PDF Document Stream of A5 Postcards - Address on LEFT side
A6 Postcard - Left Address (2 sided, colour, address on left side):
6 = A6 Postcard - Address on LEFT side
Q = PDF Document Stream of A6 Postcards - Address on LEFT side
Greeting Card (Folded A4 - address on reverse):
7 = Greeting Card
G = PDF Document Stream of Greeting Cards
While the full version of the API is very flexible and easy to set up with a .Net environment, we found that in some languages (particularly scripting languages like Perl and PHP), some of the more complex objects were harder to work with.
To improve this, we created the Simple API, which wraps the full API providing a more script-friendly interface. It contains most of the functionality of the Full API, but uses more simple types and takes the username & password as parameters on each call, in place of the custom authentication headers in the Full API.
We’ve provided some simple examples of Coding with the API’s in various languages to help you on your way.
.Net – Full API:
PHP – Simple API:
Perl – Simple API:
Our Docmail Express page is written using the Simple API and Perl. Docmail Express offers a simplified interface for submitting Docmail orders & illustrates how the API could be used to integrate Docmail into another website.