• eml: contact@sevenforty.com
  • tel: 1-866-620-7524
  • fax: 703-652-4788

    USPS RateV2 Test Server Working XML Data

    If you've ever had to develop e-commerce applications or have created code for postage rate calculations using the USPS Web Tools API, you've most likely come across the realization that the test server is broken - or appears to be broken. You've sent a plethora of XML messages only to have received error responses in return and you just know your XML is well-formed.

    Fear not! The good news is that the server is not broken and your XML is most likely correct. The bad news is that the test server (as of this posting for V2 messages) appears to only accept one working message. The test server appears to be online for one purpose and that is to test your connection to the USPS servers and nothing more. Fortunately, once you've asked the kind folks at the USPS to switch you over to the production servers, you'll find your messages to be in working order.

    Here now is a working XML message that we've used and have had success with for RateV2 messages to the test server. Sending this message should allow you to achieve the three successful test messages the USPS requires.

    1. <?xml version="1.0"?>
    2. <RateV2Request USERID="your-user-id">
    3. <Package ID="0">
    4. <Service>PRIORITY</Service>
    5. <ZipOrigination>10022</ZipOrigination>
    6. <ZipDestination>20008</ZipDestination>
    7. <Pounds>10</Pounds>
    8. <Ounces>5</Ounces>
    9. <Container>Flat Rate Box</Container>
    10. <Size>REGULAR</Size>
    11. </Package>
    12. </RateV2Request>

    * The order of the XML elements should also remain intact.

    Posted by Team Sevenforty in


    Add a Comment

      You must PREVIEW your comment before posting.