Shipping Options

The Shipping Options API provides access to the available shipping options for a cart. By default, the least expensive shipping option is applied to the cart. Use the Shipping Options API to get all shipping options or get a specific shipping option. After you get the shipping options, links are provided to apply a shipping option to the cart using the POST shoppers/me/carts/active/apply-shipping-option method in the Apply Shipping Option API.

Note:

In the USA, at a minimum, there must be a Country and State in the shipping address to get shipping options returned for US orders. The minimum address information required to get shipping options varies from country to country.

Methods


					Host: api.digitalriver.com
User-Agent: API Client/1.0
Accept: application/xml
Authorization: bearer your_access_token
			
					The response body should be empty.
			
					HTTP/1.1 200 OK
			
					<shippingOptions uri="https://api.digitalriver.com/v1/shoppers/me/shipping-options">
   <shippingOption uri="https://api.digitalriver.com/v1/shoppers/me/shipping-options/shipping_option_ID">
      <description>standard ground</description>
      <formattedCost>$0.00</formattedCost>
      <applyShippingOptionToCart uri="https://api.digitalriver.com/v1/shoppers/me/carts/active/applyShippingOptionToCart?shippingOptionId=shipping_option_ID"/>
   </shippingOption>
   <shippingOption uri="https://api.digitalriver.com/v1/shoppers/me/shipping-options/shipping_option_ID">
      <description>UPS Ground</description>
      <formattedCost>$0.00</formattedCost>
      <applyShippingOptionToCart uri="https://api.digitalriver.com/v1/shoppers/me/carts/active/applyShippingOptionToCart?shippingOptionId=shipping_option_ID"/>
   </shippingOption>
</shippingOptions>
			
					Host: api.digitalriver.com
User-Agent: API Client/1.0
Accept: */*
Authorization: bearer your_access_token
			
					The request body should be empty.
			
					HTTP/1.1 200 OK
			
					<shippingOption uri="https://dispatch.digitalriver.com/v1/shoppers/me/carts/active/shipping-options/shipping_option_ID">
   <id>shipping_option_ID</id>
   <description>UPS Ground</description>
   <cost currency="USD">0.00</cost>
   <formattedCost>$0.00</formattedCost>
   <applyShippingOptionToCart relation="https://developers.digitalriver.com/v1/shoppers/ApplyShippingOptionResource" uri="https://dispatch.digitalriver.com/v1/shoppers/me/carts/active/apply-shipping-option?shippingOptionId=shipping_option_ID"/>
</shippingOption>
			

Response Body Parameters

Field
Data Type
Visibility
Description
applyShippingOptionToCart
link
default
Link to apply this shipping option to the shopper's cart. See Apply Shipping Options API for more information.
cost
decimal
default
The cost of the shipping option.
description
string
default
The description of the shipping option.
formattedCost
string
default
The cost in locale currency format (for example, $19.99).
id
string
default
The shipping option code. The code is assigned when the shipping option is created.
shippingOption structured default A shipping option.
shippingOptions link default The shipping options available to apply to a cart.