“Push” Feedback Via HTTP POST

“Push” Feedback Via HTTP POST

Description

This method notifies your system of status changes to your PostalMethods items. The callback is structured as an HTTP POST call, so you need to have a script running on your server, that is capable of responding to an external call.

Setup

Define the location of your feedback reception script in the PostalMethods control panel under User Settings -> Feedback. Select Web Service -> HTTP POST and enter the URL into the Feedback URL text box.

Input

URL syntax used by PostalMethods to send the status report:
{url}?ID={ID}&ItemID={ItemID}&Auth={Auth}&Status={Status}&StatusTime={StatusTime}
where {url} is the location of the script on your server and all other fields in {curly braces} indicate a returned value, as defined below.

Example

https://your.domain.com/callback.php?ID=10923212&ItemID=1&Auth=123456&Status=-1000&StatusTime=2008-06-12T16:23:54

Field Definitions

Property Type Comments
ID int Matches the ID provided as the response for the original Web Service request
ItemID int For future use. Default value: 1
Auth String (255) The authentication (AUTH) string is defined by the user in the Control Panel -> User Settings -> Feedback section. PostalMethods will provide this string when accessing this method. You may validate this string to make sure it is coming from PostalMethods.
Status int See the list of Letter Sending Status Codes.
StatusTime datetime Date and time when the update occurred. Returned in the user’s time zone, as defined in the control panel. DateTime is formatted as ‘YYYY-MM-DDTHH:MM:SS’

Output

Return an integer with a value of ‘0’ (without the apostrophes) to indicate a successful reception of the HTTP POST callback. Returning any other value, or returning no value, will cause PostalMethods to retry according to a Feedback Retry Policy.

Send Letters
Securely + Reliably
Send letters securely and reliably from any business application. Use for invoices, quotes, and other important business communications. Enjoy special web-form to postal features and instant notifications.
Simple Process
Easy as 1-2-3
Experience the ease of our streamlined process - developed for efficiency! You submit your document by email or API. We automatically print, collate, insert, and stamp your letter. Your letter is delivered via standard postal service.
Pay As You Go
No Fuss. No Obligations.
Register for free with no obligations! Evaluate the service as long as you need. Once you are ready, set up our user-friendly pay-as-you option to use our service. No fuss. No on-going commitment. Just plain easy!