XML syntax for MonetaryValue, for insurance, from UPS rate API

Posted on 2007-09-29
Last Modified: 2008-01-09
Re: eCommerce rate calculation using UPS XML

It appears that UPS has changed their XML that they use to communicate with their online rate calculator. In the 2007 version, I don't see anywhere to assign an InsuredValue or MonitaryValue field or something like that, that can be used to calculate the shipping rate with insurance. I see MonetaryValue associated with C.O.D., but I m pretty sure I don't want to use that XML field because then there will be a COD surcharge added.

I have found samples from the UPS 2006 XML that appear to directly address the value for insurance, but the 2007 version seems to have dropped it.

Do you know how to form the XML to ask UPS to include insurance in a rate quote? Your sample can be straight XML, ASP with XML, or PHP with XML and I can grab what I need (the XML!)




I tried this, in ASP/VBScript/XML:


strXML=strXML & "<PackageServiceOptions>"
      if shipmentdeclaredvalue <> "" then
            if isnumeric(shipmentdeclaredvalue) then
                  if shipmentdeclaredvalue > 100 then
                          strXML=strXML & "<InsuredValue><CurrencyCode>USD</CurrencyCode><MonetaryValue>" & shipmentdeclaredvalue & "</MonetaryValue></InsuredValue>"
                  end if
            end if
      end if
      strXML=strXML & "</PackageServiceOptions>"
Question by:dtleahy

    Author Comment

    This was solved by a response from UPS tech support:
    Dear Dennis,

    Thank you for your inquiry. It turns out that the elements for Insured Value are missing from the new Developer's Guides (they were in the previous versions). A defect will be opened against the RSS Guide to get it updated (this might not happen until January though).

    The elements that should be included in the RSS XML request are:

    <Insured Value>
    <MonetaryValue>XXXXXX</MonetaryValue> (holds up to 99999999.99 but only supports up to 50,000.00)

    These elements should fall under the <PackageServiceOptions> section (begins on page 28 of the new Developer's Guide).

    The Insured Value charge will be returned in the <ServiceOptionCharges> section of the response.

    I apologize for any confusion the missing information may have caused.

    Please contact us if you need any additional assistance.
    LVL 1

    Accepted Solution

    PAQed with points refunded (500)

    EE Admin

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Suggested Solutions

    Read about how to choose the best possible content marketing agency to suit your needs. Content marketing has become an integral part of running a successful tech business, so it is wise to be informed.
    For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
    Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now