Getting shipping options
Lear how to get shipping options.
Getting a shipping option by identifier
To get a shipping option by identifier, specify the shipping options identifier (shippingOptionsId
) in the URI path.
curl --location --request GET 'https://api.digitalriver.com/v1/shoppers/me/carts/active/shipping-options/{shippingOptionsId}' \
--header 'authorization: Basic ***\
...
See the query parameters for more information.
Getting all shipping options
You can also get all shipping options.
curl --location --request GET 'https://api.digitalriver.com/v1/shoppers/me/carts/active/shipping-options' \
--header 'authorization: Basic ***\
...
See the query parameters for more information.
Shipping options
You can retrieve the shipping options for a cart or all shipping options. The shippingOptions
object in the response retrieves the discounted shipping rate based on the matching deployed shipping discount offer. A successful request returns the costWithDiscount
and formattedCostWithDiscount
.
costWithDiscount
The sum of the shipping cost with discounts.
formattedCostWithDiscount
The sum of the shipping cost with a discount in locale currency format (for example, $ 19.14). Contact your Digital River team to set up the currency symbol, decimal separator, and number of fractional digits for the formatted cost with discount amount.
{
"shippingOption": {
"uri": "http://api.digitalriver.com/v1/shoppers/me/carts/active/shipping-options/167400",
"id": 167400,
"description": "Express",
"cost": {
"currency": "USD",
"value": 12.5
},
"formattedCost": "12.50USD",
"costWithDiscount": {
"currency": "USD",
"value": 10.87
},
"formattedCostWithDiscount": "10.87USD",
"applyShippingOptionToCart": {
"uri": "http://api.digitalriver.com/v1/shoppers/me/carts/active/apply-shipping-option?shippingOptionId=167400"
}
}
}
Last updated
Was this helpful?