Every request is stateless and no cookies or URL rewrites are used during the exchange. An example of this looks as such:. A return will have this form formatted for readability :.
All request and response tags are case sensitive and misspelled tags will generate errors. In addition, order is important because of the coordination of some requests require specific tags in a specific order.
Label requests return the label in the requested format encoded as base64 text within the XML. Microsoft XML Core Services can be used to decode the text stream into a binary representation of the requested image. Please take this under consideration when determining the request-response method that you choose.
When an error condition exists, a specific XML return is generated. The following example shows the tags that are returned:. ValidateParameters : clsEMI. For APIs that can handle multiple transactions, the error conditions for requests for multiple responses to be returned together are handled at the response level. For example: a request for rates for two packages. On the other hand, if the address for the first package is acceptable but not the second, the response document contains the information for the first address, but under the XML tag for the second address there is an error tag.
Errors that are further down in the hierarchy also follow the above format. There is not a compendium of error messages or states that is available. A minimal testing function is available for client applications. Some APIs have canned tests that use an explicit XML request and allow for the testing of general programming techniques.
As these tests are explicit, they are identified as available only for selected APIs. Processing returns, errors, and parsing techniques can be programmatically done using these canned test scenarios,.
There are categories of APIs that provide repeatable responses such as the domestic and international rates APIs or address verification. These APIs are the easiest because of the small number of tags. These APIs are included in the default permissions. APIs that return labels or barcode information that must be printed become available after applying for advanced permissions from the ICCC. To test label accuracy, a label certification API is available for each label type.
The URLs in the following tests represent a sequence that is a canned test and the response is essentially hard coded to provide a specific return data set.
Address Info set is the most used API group because of address validation. Track is the second most useful API because of package tracking. The third most useful set is Express Mail Commitments. This API returns a multiple group response and is one of the more complex returns because of the variations of the content. The last set is for Package Pickup services. This API cannot be tested in the production environment.
This API group is used to schedule pickup requests that are routed to a carrier for processing. Incorrect use of the API will cause a carrier to attempt to pick up a parcel from the address in the request. The code example located at the end of the document can be cut and pasted into Notepad and saved as an HTML file.
Test Request 4. This test demonstrates the use of characteristic identifiers to allow grouping multiple requests into the same transaction. This test shows a multi-entry return that is arranged in reverse chronological order. Your item was delivered at am on June 1 in Wilmington DE The API return is an example of a complex return where there are nested tags. The test is similar to the one above except the return has multiple nested tags that represent additional commitments that are available based upon one of the parameters in the request.
Notice will be sent via e-mail to the registered e-mail address for all users. Address information for verification is updated weekly. Postal rates, restrictions, prohibitions and other information that effect international mailings are updated as soon as they become available in the IMM and DMM.
US Postal Service reference for mailing services. Web Tools information pages that contain documents for the APIs, links to registration and other resources. Copy the page to the clipboard and then paste into notepad or a text editor and save to a file. For Example: April 15, Summary of the status of the shipment, ie In-Transit, Delivered, etc.
Scan statuses from points in transit. Response: Package Track. If it was mailed recently, It may not yet be tracked. Please try again later. Data returned still contains the detail and summary information, but this information is broken down into fields instead of having only one line of text.
This attribute specifies your Web Tools ID. This is for versioning of the API's and for triggering response tags for future versions. In this API use a value of 1 to return all available response tags and trigger new functionality. User IP address. External integrators should pass company name. Package Tracking ID.
Mailing date of package. Request: Track and Confirm. Package Tracking ID number. Signifies if the mail piece is eSOF eligible. Required once. Tracking Summary Information.
The time of the event. The date of the event. The event type e. City where the event occurred. State where the event occurred. ZIP Code of the event. Country where the event occurred. Company name if delivered to a company. Name of the persons signing for delivery if available. The event code. The action code. The reason code. Tracking Detail Information. This group is repeatable. The city where the event occurred. The state where the event occurred. The ZIP Code of the event.
The country where the event occurred. The company name if delivered to a company. The name of the persons signing for delivery if available. Required max 1. The same number that was provided in the request. For example : Required max The tracking number ID submitted through the request.
For example: EAUS. Additional package information. Information regarding availability of Restore service function. For example Yes. Additional Label on the mail piece. This is not currently populated. Mail Class of the mail piece human readable.
This will also include the service standard message if it exists. No Default of False. Mail Class of the mail piece code. The destination city. For example: Rochester.
The destination country code. For example:MX , CA. The Mailing Date field is not within 3 days of the system date before or after. The default is spaces. An electronic file with this number in the Electronic File Number field of the Header Record has been submitted previously. The Zone provided by the mailer is an invalid Zone number. Sample of Extract File. G-1 Error and Warning Messages This appendix contains typical error and warning messages and their meanings.
Electronic File Transmission Error Message. What It Means. Header Record is missing. The customer has been decertified for PMEM. Error Message.
0コメント