English | Site Directory

Google Checkout APIs

Google Checkout Developer's Guide Addendum - Carrier-calculated Shipping

Overview
Understanding Carrier-calculated Shipping
XML Tag Definitions
XML Schema Changes

Overview

This document describes a Google Checkout feature that enables Google to dynamically request rates from shipping carriers based on the information in your Checkout API request. Google supports the carrier-calculated shipping feature for three carriers: FedEx, UPS and the U.S. Postal Service (USPS). This document explains how the carrier-calculated shipping feature works and provides XML examples that demonstrate how to use carrier-calculated shipping for several different shipping scenarios. This document also defines the XML tags that are used for carrier-calculated shipping and the Google Checkout XML schema changes that support this feature.

This document contains the following sections.

  • The Understanding Carrier-calculated Shipping section explains how the carrier-calculated shipping feature works. It also explains the information that you must include in your Checkout API request to use the feature as well as additional optional information that can be included in your request.

  • The Submitting Valid API Requests section explains several cases in which Google will reject a Checkout API request that uses carrier-calculated shipping even though the request is valid according to the Google Checkout XML schema.

  • The XML Examples for Carrier-calculated Shipping provides several different XML examples that show how you would provide carrier-calculated shipping in a Checkout API request.

  • The XML Tag Definitions section defines the XML tags used for carrier-calculated shipping.

  • The XML Schema Changes section identifies the changes made for this feature to the publicly available Google Checkout XML schema.

Note: This feature is only supported for shipments sent to and from U.S. postal addresses. In addition, any costs associated with carrier-calculated shipping methods must be specified in U.S. dollars (USD).

Understanding Carrier-calculated Shipping

When you submit a Checkout API request that includes carrier-calculated shipping methods, Google will dynamically determine the shipping rate for each of those methods. You can offer one or more carrier-calculated shipping methods and you can also offer carrier-calculated shipping methods from multiple carriers.

Please note that Google calculates shipping rates based on the assumption that all of the items in an order will be shipped in a single box. Google determines the total package weight by adding the weights of all of the items in the order. Typically, carriers will round the total order weight up to the nearest pound to determine shipping costs.

After calculating the shipping rates, Google will display those rates to buyers on the Place Order page along with the rates for any flat-rate shipping options specified in the request. If the buyer changes the shipping address, Google will use the new address to recalculate the shipping rates for each carrier-calculated shipping method. Note: If you offer flat-rate shipping options as well as carrier-calculated shipping options, the flat-rate shipping options must have different names than the carrier-calculated options that you offer. For example, if you offer the carrier-calculated shipping option for FedEx Standard Overnight shipping, you cannot also have a flat-rate shipping option named Standard Overnight.

You cannot offer carrier-calculated shipping methods and merchant-calculated shipping methods for the same order. However, you can offer carrier-calculated shipping methods and still use the Merchant Calculations API to calculate taxes and adjustments for coupons and gift certificates.

Finally, if you have implemented the Notification API, Google will send you a new order notification after the customer places the order. If the customer has selected a carrier-calculated shipping option, the notification will include a carrier-calculated shipping adjustment identifying the selected shipping method and the calculated shipping rate.

Required Information for Using Carrier-Calculated Shipping

To use carrier-calculated shipping, you must include the following information in your Checkout API request:

  • The weight of each item in the order.

  • A list of carrier-calculated shipping options that are available for the order. For each option, you must provide the following information:

    • The shipping company for the order. Google supports FedEx, UPS and USPS.
    • The type of shipping method being offered. The list of valid shipping types varies for each carrier.
    • The default cost for the shipping option. The default cost will be assessed if Google's attempt to obtain the carrier's shipping rates fails for any reason.

  • The address from which you will ship the order.

Optional Information for Using Carrier-Calculated Shipping

You can also specify the following additional information for carrier-calculated shipping:

  • A percentage amount that the calculated shipping rate returned from the carrier should be increased or decreased. For example, some merchants may increase shipping rates by a small percentage while others may pass negotiated discounts with shipping carriers on to their customers.

  • A fixed charge for the order. In this document, the term "fixed charge" refers to a fixed amount that you add to the cost of an order when a particular shipping method is selected.

  • An indication of how the carrier will pick up the package. Supported carrier pickup types are REGULAR_PICKUP, SPECIAL_PICKUP and DROP_OFF. The pickup type may affect shipping rates.

  • The dimensions – height, length and width – of the package that you will ship. Package dimensions may affect shipping rates.

  • An indication of whether the delivery address is a commercial or a residential location. This value may affect shipping rates.

Additional Information to Consider when Using Carrier-calculated Shipping

  • As discussed earlier, Google calculates shipping rates based on the assumption that all of the items in an order will be shipped in a single box. Google determines the total package weight by adding the weight of each item in the order and then rounding up to the nearest pound. However, if you typically ship items in separate packages rather than a single package, Google's calculated shipping rate may vary significantly from what you actually pay the carrier to ship the order. For example, the costs of shipping one 150 lb. package, three 50 lb. packages, or ten 15 lb. packages may be significantly different even though each scenario has the same total shipment weight.

  • Shipping carriers typically impose a weight limit of 150 lbs. per package. Items heavier than 150 lbs. are generally subject to overweight charges. If the total weight of an order exceeds 150 lbs. and you would typically ship the order in multiple packages, Google may not be able to accurately calculate shipping costs. Please note that the weight limit for USPS is 70 lbs.

Submitting Valid XML Requests Using Carrier-calculated Shipping

When you post a Checkout API request, Google verifies that the XML in your request is valid. If the request is invalid, Google Checkout will reject the shopping cart.

In addition, Google Checkout performs several other checks to verify the integrity of the information in the request. Several of these checks are explained in the Submitting Valid Checkout API Requests section of the Google Checkout XML API Developer's Guide. If the request does not pass these checks, Google Checkout will reject the shopping cart. However, these checks cannot be enforced through the Google Checkout XML schema. As such, a request that is valid according to the XML schema will still be rejected if it fails to pass any of these tests.

The list below identifies additional checks that Google performs to ensure that requests that use carrier-calculated shipping are valid:

  • If your API request includes carrier-calculated shipping methods, you must provide the weight of each item in the order.

  • Carrier-calculated shipping may not be combined with merchant-calculated shipping options. However, you may combine carrier-calculated shipping options with merchant-calculated taxes, coupons or gift certificates.

  • Carrier-calculated shipping may not be combined with pickup shipping options.

XML Examples for Carrier-calculated Shipping

The XML examples below explain several use cases for implementing carrier-calculated shipping. Please note that the first example includes a complete Checkout API request. However, the remaining examples only include the XML within the <shipping-methods> tag. Each shipping method specifies that the order will be shipped from New York City.

In the examples, each XML tag name links to a definition for the tag. Links shown in bold text identify tags that are defined in this document. Remaining links point to tag definitions in the XML Element Definitions document.

Example 1 – Using Carrier-calculated Shipping with Merchant Calculations

The example below shows an order with one item and one carrier-calculated shipping method, which is one-day shipping with FedEx. The XML also provides the dimensions of the package being shipped. The shipping method will be valid for all U.S. addresses.

Please note that the example provides the weight of the item in the order, which is required to obtain shipping costs from the carrier. In addition, the example also specifies that the merchant will calculate taxes and discounts associated with coupons or gift certificates.

<?xml version="1.0" encoding="UTF-8"?>
<checkout-shopping-cart xmlns="http://checkout.google.com/schema/2">

  <shopping-cart>
    <items>
      <item>
        <merchant-item-id>5LBDOGCHOW</merchant-item-id>
        <item-name>5 lbs. Dog Food</item-name>
        <item-description>A 5 lb. bag of nutritious dog food.</item-description>
        <unit-price currency="USD">35.00</unit-price>
        <quantity>1</quantity>
        <item-weight unit="LB" value="5.5"/>
      </item>
    </items>
  </shopping-cart>


  <checkout-flow-support>
    <merchant-checkout-flow-support>
      <shipping-methods>
        <carrier-calculated-shipping>
          <carrier-calculated-shipping-options>
            <carrier-calculated-shipping-option>
              <price currency="USD">10.00</price>
              <shipping-company>FedEx</shipping-company>
              <carrier-pickup>REGULAR_PICKUP</carrier-pickup>
              <shipping-type>Priority Overnight</shipping-type>
            </carrier-calculated-shipping-option>
          </carrier-calculated-shipping-options>
          <shipping-packages>
            <shipping-package>
              <height unit="IN" value="6"/>
              <length unit="IN" value="24"/>
              <width unit="IN" value="15"/>
              <ship-from id="ABC">
                <city>New York</city>
                <region>NY</region>
                <country-code>US</country-code>
                <postal-code>10022</postal-code>
              </ship-from>
            </shipping-package>
          </shipping-packages>
        </carrier-calculated-shipping>
      </shipping-methods>

      <merchant-calculations>
        <merchant-calculations-url>https://www.example.com/merchantCalc</merchant-calculations-url>
        <accept-merchant-coupons>true</accept-merchant-coupons>
        <accept-gift-certificates>true</accept-gift-certificates>
      </merchant-calculations>

      <tax-tables merchant-calculated="true">
        <default-tax-table>
          <tax-rules>
            <default-tax-rule>
              <shipping-taxed>true</shipping-taxed>
              <rate>0.0800</rate>
              <tax-area>
                <us-state-area>
                  <state>NY</state>
                </us-state-area>
              </tax-area>
            </default-tax-rule>
          </tax-rules>
        </default-tax-table>
      </tax-tables>

    </merchant-checkout-flow-support>
  </checkout-flow-support>
</checkout-shopping-cart>

Example 2 – Multiple Shipping Options and Business Rules

In this example, the merchant offers two carrier-calculated shipping methods for the order. The one-day shipping method ships with FedEx. The merchant also adds a $6.00 fixed charge for this shipping method but gives a 10 percent discount on the FedEx shipping charges. The two-day method ships with UPS. The merchant adds a $10.00 fixed charge for this shipping method but but gives a 15 percent discount on the UPS shipping charges. The example does not specify the dimensions of the packaging that will be used to ship the order.

As in the previous example, the Checkout API request must also specify the weight of all items in the order.

      <shipping-methods>
        <carrier-calculated-shipping>
          <carrier-calculated-shipping-options>
            <carrier-calculated-shipping-option>
              <price currency="USD">10.00</price>
              <shipping-company>FedEx</shipping-company>
              <carrier-pickup>REGULAR_PICKUP</carrier-pickup>
              <shipping-type>Priority Overnight</shipping-type>
              <additional-fixed-charge currency="USD">6.00</additional-fixed-charge>
              <additional-variable-charge-percent>-10</additional-variable-charge-percent>
            </carrier-calculated-shipping-option>
            <carrier-calculated-shipping-option>
              <price currency="USD">10.00</price>
              <shipping-company>UPS</shipping-company>
              <carrier-pickup>REGULAR_PICKUP</carrier-pickup>
              <shipping-type>2nd Day Air</shipping-type>
              <additional-fixed-charge currency="USD">10.00</additional-fixed-charge>
              <additional-variable-charge-percent>-15</additional-variable-charge-percent>
            </carrier-calculated-shipping-option>
          </carrier-calculated-shipping-options>
          <shipping-packages>
            <shipping-package>
              <ship-from id="ABC">
                <city>New York</city>
                <region>NY</region>
                <country-code>US</country-code>
                <postal-code>10022</postal-code>
              </ship-from>
            </shipping-package>
          </shipping-packages>
        </carrier-calculated-shipping>
      </shipping-methods>

Example 3 – Combining Carrier-calculated Shipping with Flat-rate Shipping

In this example, the merchant offers two carrier-calculated shipping methods and two flat-rate shipping methods. The example does not specify the dimensions of the packaging that will be used to ship the order. The second flat-rate shipping option is for free shipping.

      <shipping-methods>
        <carrier-calculated-shipping>
          <carrier-calculated-shipping-options>
            <carrier-calculated-shipping-option>
              <price currency="USD">10.00</price>
              <shipping-company>FedEx</shipping-company>
              <carrier-pickup>REGULAR_PICKUP</carrier-pickup>
              <shipping-type>Priority Overnight</shipping-type>
            </carrier-calculated-shipping-option>
            <carrier-calculated-shipping-option>
              <price currency="USD">10.00</price>
              <shipping-company>UPS</shipping-company>
              <carrier-pickup>REGULAR_PICKUP</carrier-pickup>
              <shipping-type>2nd Day Air</shipping-type>
            </carrier-calculated-shipping-option>
          </carrier-calculated-shipping-options>
          <shipping-packages>
            <shipping-package>
              <ship-from id="ABC">
                <city>New York</city>
                <region>NY</region>
                <country-code>US</country-code>
                <postal-code>10022</postal-code>
              </ship-from>
            </shipping-package>
          </shipping-packages>
        </carrier-calculated-shipping>
        <flat-rate-shipping name="USPS Priority Mail>
          <price currency="USD">4.00</price>
        </flat-rate-shipping>
        <flat-rate-shipping name="Free Shipping>
          <price currency="USD">0.00</price>
        </flat-rate-shipping>
      </shipping-methods>

XML Tag Definitions

The following tables define the XML tags used for the carrier-calculated shipping feature.

Certain symbols may be displayed next to some subtags in the definitions below. These symbols, and their meanings, are:

? = optional subtag
* = zero or more instances of the subtag

additional-fixed-charge
Definition

The <additional-fixed-charge> tag allows you to specify a fixed charge that will be added to the total cost of an order if the buyer selects the associated shipping option. If you also adjust the calculated shipping cost using the <additional-variable-charge-percent> tag, the fixed charge will be added to the adjusted shipping rate.

Attributes
NameFormatDescription
currency String The currency attribute identifies the unit of currency associated with the tag's value. The value of the currency attribute must be a three-letter ISO 4217 currency code.
Subtag of carrier-calculated-shipping-option
Content Format Double
Example <additional-fixed-charge currency="USD">5.00</additional-fixed-charge>

additional-variable-charge-percent
Definition

The <additional-variable-charge-percent> tag specifies a percentage amount by which a carrier-calculated shipping rate will be adjusted. The tag's value may be positive or negative. For example, if the tag's value is 15, then the carrier's shipping rate will effectively be multiplied by 1.15 to determine the shipping cost presented to the buyer. So, if the carrier shipping rate were $10.00, the adjusted shipping rate would be $11.50 – i.e. $10.00 + ($10.00 X 15%). If the <additional-variable-charge-percent> tag value is negative, the calculated shipping rate will be discounted by the specified percentage.

Subtag of carrier-calculated-shipping-option
Content Format Double
Example <additional-variable-charge-percent>10</additional-variable-charge-percent>

carrier-calculated-shipping
Definition

The <carrier-calculated-shipping> tag contains information that Google will need to request shipping costs for an order from the shipment carrier. If you include a carrier-calculated shipping method in your Checkout API request, Google will obtain the shipping cost for the order based on the information that you provided and the shipping address selected by the buyer.

Subtag of shipping-methods
Subtags carrier-calculated-shipping-options, shipping-packages
Content Format Complex
Example <carrier-calculated-shipping>

carrier-calculated-shipping-adjustment
Definition

The <carrier-calculated-shipping-adjustment> tag communicates to a merchant the carrier-calculated shipping rate that was charged to a buyer.

Subtag of shipping
Subtags shipping-name, shipping-cost
API Commands New Order Notification
Content Format Container
Example <carrier-calculated-shipping-adjustment>

carrier-calculated-shipping-option
Definition

The <carrier-calculated-shipping-option> tag contains information about a single shipping method for which Google Checkout should obtain shipping costs.

Subtag of carrier-calculated-shipping-options
Subtags price, shipping-company, carrier-pickup?, shipping-type, additional-fixed-charge?, additional-variable-charge-percent?
Content Format Container
Example <carrier-calculated-shipping-option>

carrier-calculated-shipping-options
Definition

The <carrier-calculated-shipping-options> tag encapsulates information about all of the shipping methods for which Google Checkout should obtain shipping costs.

Subtag of carrier-calculated-shipping
Subtags carrier-calculated-shipping-option*
Content Format Container
Example <carrier-calculated-shipping-options>

carrier-pickup
Definition

The <carrier-pickup> tag specifies how the package will be transferred from the merchant to the shipper. Valid values for this tag are REGULAR_PICKUP, SPECIAL_PICKUP and DROP_OFF. The default value for this tag is DROP_OFF.

Subtag of carrier-calculated-shipping-option
Content Format String
Example <carrier-pickup>REGULAR_PICKUP</carrier-pickup>

delivery-address-category
Definition

The <delivery-address-category> tag indicates whether the shipping method should be applied to a residential or a commercial address. Valid values for this tag are RESIDENTIAL and COMMERCIAL.

Subtag of shipping-package
Content Format String
Example <delivery-address-category>RESIDENTIAL</delivery-address-category>

height
Definition

The <height> tag contains information about the height of the package being shipped to the customer.

Attributes
NameFormatDescription
unit Integer The unit attribute specifies the unit of measurement that corresponds to a shipping package's length, width or height. The only valid value for this attribute is IN.
value Decimal The value attribute specifies the numeric value of a unit of measurement corresponding to an item or a shipping package. Depending on the object being measured, the value attribute can specify the numeric component of an item's weight or the numeric component of a package's height, length or width.
Subtag of shipping-package
Content Format Complex
Example <height unit="IN" value="6"/>

item-weight
Definition

The <item-weight> tag specifies the weight of an individual item in the customer's shopping cart.

Attributes
NameFormatDescription
unit Integer The unit attribute specifies the unit of measurement that corresponds to an item's weight. The only valid value for this attribute is LB.
value Decimal The value attribute specifies the numeric value of a unit of measurement corresponding to an item or a shipping package. Depending on the object being measured, the value attribute can specify the numeric component of an item's weight or the numeric component of a package's height, length or width.
Subtag of item
Content Format Complex
Example <item-weight unit="LB" value="5.5" />

length
Definition

The <length> tag contains information about the length of the package being shipped to the customer.

Attributes
NameFormatDescription
unit Integer The unit attribute specifies the unit of measurement that corresponds to a shipping package's length, width or height. The only valid value for this attribute is IN.
value Decimal The value attribute specifies the numeric value of a unit of measurement corresponding to an item or a shipping package. Depending on the object being measured, the value attribute can specify the numeric component of an item's weight or the numeric component of a package's height, length or width.
Subtag of shipping-package
Content Format Complex
Example <length unit="IN" value="15"/>

price
Definition

The <price> tag contains the default shipping cost for a carrier-calculated-shipping option. If Google is unable to obtain the carrier's shipping rate for a shipping option, the buyer will still have the option of selecting that shipping option and paying the <price> value to have the order shipped. This tag has one required attribute, which identifies the currency of the price. The only supported currency is U.S. dollars (USD).

Attributes
NameFormatDescription
currency String The currency attribute identifies the unit of currency associated with the tag's value. The value of the currency attribute must be a three-letter ISO 4217 currency code.
Subtag of carrier-calculated-shipping-option
Content Format Decimal
Example <price currency="USD">11.05</price>

ship-from
Definition

The <ship-from> tag contains information about the location from which an order will be shipped.

Subtag of shipping-package
Subtags city, region, postal-code, country-code
Content Format Container
Example <ship-from>

shipping-company
Definition

The <shipping-company> tag contains the name of the company that will ship the order. The only valid values for this tag are FedEx, UPS and USPS.

Subtag of carrier-calculated-shipping-option
Content Format String
Example <shipping-company>UPS</shipping-company>

shipping-package
Definition

The <shipping-package> tag encapsulates information about an individual package that will be shipped to the buyer.

Subtag of shipping-packages
Subtags delivery-address-category?, height, length, ship-from, width
Content Format Container
Example <shipping-package>

shipping-packages
Definition

The <shipping-packages> tag encapsulates information about all of the packages that will be shipped to the buyer. At this time, merchants may only specify one package per order.

Subtag of carrier-calculated-shipping
Subtags shipping-package
Content Format Container
Example <shipping-packages>

shipping-type
Definition

The <shipping-type> tag identifies the shipping option that is being offered to the buyer. The table below shows the valid values for this tag for each carrier. None of these shipping options are for international shipping. Please note that Google will reject a Checkout API request that specifies a carrier-calculated shipping option for which the <shipping-type> is not valid for the specified carrier.

FedExUPSUSPS

  • Ground
  • Home Delivery
  • Express Saver
  • First Overnight
  • Priority Overnight
  • Standard Overnight
  • 2Day

  • Next Day Air
  • Next Day Air Early AM
  • Next Day Air Saver
  • 2nd Day Air
  • 2nd Day Air AM
  • 3 Day Select
  • Ground

  • Express Mail
  • Priority Mail
  • Parcel Post
  • Media Mail

Subtag of carrier-calculated-shipping-option
Content Format String
Example <shipping-type>Priority Overnight</shipping-type>

width
Definition

The <width> tag contains information about the width of the package being shipped to the customer.

Attributes
NameFormatDescription
unit Integer The unit attribute specifies the unit of measurement that corresponds to a shipping package's length, width or height. The only valid value for this attribute is IN.
value Decimal The value attribute specifies the numeric value of a unit of measurement corresponding to an item or a shipping package. Depending on the object being measured, the value attribute can specify the numeric component of an item's weight or the numeric component of a package's height, length or width.
Subtag of shipping-package
Content Format Complex
Example <width unit="IN" value="24"/>

XML Schema Changes

This section identifies the changes to the publicly available Google Checkout XML schema for this feature.

Updated Element Definitions

The following tags have updated definitions to enable support for carrier-calculated shipping. The updated definitions from the XML schema appear below the list.

<xs:complexType name="Item">
  <xs:all>
    <xs:element name="item-description" type="xs:string" />
    <xs:element name="item-name" type="xs:string" />
    <xs:element name="merchant-item-id" type="xs:string" minOccurs="0" />
    <xs:element name="merchant-private-item-data"
        type="tns:anyMultiple" minOccurs="0" />
    <xs:element name="quantity">
      <xs:simpleType>
        <xs:restriction base="xs:int">
          <xs:minInclusive value="1" />
        </xs:restriction>
      </xs:simpleType>
    </xs:element>
    <xs:element name="tax-table-selector" minOccurs="0">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:minLength value="0" />
         <xs:maxLength value="255" />
        </xs:restriction>
      </xs:simpleType>
    </xs:element>
    <xs:element name="unit-price" type="tns:Money" />
    <xs:element name="item-weight" type="tns:ItemWeight" minOccurs="0" />
  </xs:all>
</xs:complexType>

<xs:element name="shipping-methods" minOccurs="0">
  <xs:complexType>
    <xs:sequence>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="carrier-calculated-shipping"
              type="tns:CarrierCalculatedShipping" />
        <xs:element name="flat-rate-shipping" type="tns:FlatRateShipping" />
        <xs:element name="pickup" type="tns:Pickup" />
        <xs:element name="merchant-calculated-shipping"
            type="tns:MerchantCalculatedShipping" />
      </xs:choice>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:complexType name="OrderAdjustment">
  <xs:all>
    <xs:element name="adjustment-total" type="tns:Money" minOccurs="0" />
    <xs:element name="merchant-calculation-successful" type="xs:boolean" minOccurs="0" />
    <xs:element name="merchant-codes" minOccurs="0">
      <xs:complexType>
        <xs:sequence>
          <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="coupon-adjustment" type="tns:CouponAdjustment" />
            <xs:element name="gift-certificate-adjustment"
                type="tns:GiftCertificateAdjustment" />
          </xs:choice>
        </xs:sequence>
      </xs:complexType>
    </xs:element>
    <xs:element name="shipping">
      <xs:complexType>
        <xs:choice>
          <xs:element name="carrier-calculated-shipping-adjustment"
              type="tns:CarrierCalculatedShippingAdjustment" />
          <xs:element name="flat-rate-shipping-adjustment"
              type="tns:FlatRateShippingAdjustment" />
          <xs:element name="pickup-shipping-adjustment"
              type="tns:PickupShippingAdjustment" />
          <xs:element name="merchant-calculated-shipping-adjustment"
              type="tns:MerchantCalculatedShippingAdjustment" />
        </xs:choice>
      </xs:complexType>
    </xs:element>
    <xs:element name="total-tax" minOccurs="0">
      <xs:complexType>
        <xs:simpleContent>
          <xs:restriction base="tns:Money">
          <xs:minInclusive value="0.0" />
          </xs:restriction>
        </xs:simpleContent>
      </xs:complexType>
    </xs:element>
  </xs:all>
</xs:complexType>

Newly Added Elements

The following elements have been added to the Checkout schema for the carrier-calculated-shipping feature.

<xs:complexType name="CarrierCalculatedShipping">
  <xs:all>
    <xs:element name="shipping-packages">
      <xs:complexType>
        <xs:sequence>
          <xs:element name="shipping-package" type="tns:ShippingPackage"
              minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
      </xs:complexType>
    </xs:element>
    <xs:element name="carrier-calculated-shipping-options">
      <xs:complexType>
        <xs:sequence>
          <xs:element name="carrier-calculated-shipping-option"
            type="tns:CarrierCalculatedShippingOption"
            minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
      </xs:complexType>
    </xs:element>
  </xs:all>
</xs:complexType>

<xs:complexType name="CarrierCalculatedShippingOption">
  <xs:all>
    <xs:element name="price">
      <xs:complexType>
        <xs:simpleContent>
          <xs:restriction base="tns:Money">
            <xs:minInclusive value="0.0" />
          </xs:restriction>
        </xs:simpleContent>
      </xs:complexType>
    </xs:element>
    <xs:element name="shipping-company" type="xs:token" />
    <xs:element name="shipping-type" type="xs:string" />
    <xs:element name="carrier-pickup" type="xs:token" minOccurs="0" />
    <xs:element name="additional-fixed-charge"
      type="tns:Money" minOccurs="0" />
    <xs:element name="additional-variable-charge-percent"
      type="xs:double" minOccurs="0" />
  </xs:all>
</xs:complexType>

<xs:complexType name="ShippingPackage">
  <xs:all>
    <xs:element name="length" type="tns:Dimension" />
    <xs:element name="width" type="tns:Dimension" />
    <xs:element name="height" type="tns:Dimension" />
    <xs:element name="ship-from" type="tns:AnonymousAddress" />
    <xs:element name="delivery-address-category"
        type="xs:token" minOccurs="0" />
  </xs:all>
</xs:complexType>


<xs:complexType name="Dimension">
  <xs:attribute name="value" use="required">
    <xs:simpleType>
      <xs:restriction base="xs:double">
        <xs:minInclusive value="0.0" />
      </xs:restriction>
    </xs:simpleType>
  </xs:attribute>
  <xs:attribute name="unit" type="xs:token" use="required" />
</xs:complexType>


<xs:complexType name="ItemWeight">
  <xs:attribute name="unit" type="xs:string" use="required" />
  <xs:attribute name="value" use="required">
    <xs:simpleType>
      <xs:restriction base="xs:double">
        <xs:minInclusive value="0.0" />
      </xs:restriction>>
    </xs:simpleType>
  </xs:attribute>
</xs:complexType>

<xs:complexType name="CarrierCalculatedShippingAdjustment">
  <xs:all>
    <xs:element name="shipping-cost">
      <xs:complexType>
        <xs:simpleContent>
          <xs:restriction base="tns:Money">
            <xs:minInclusive value="0.0" />
          </xs:restriction>
        </xs:simpleContent>
      </xs:complexType>
    </xs:element>
    <xs:element name="shipping-name" type="xs:string" />
  </xs:all>
</xs:complexType>