For the complete documentation index, see llms.txt. This page is also available as Markdown.

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 ***\
...
{
  "shippingOptions": {
    "uri": "https://api.digitalriver.com/v1/shoppers/me/carts/active/shipping-options",
    "shippingOption": [
      {
        "uri": "https://api.digitalriver.com/v1/shoppers/me/carts/active/shipping-options/5858800",
        "description": "UPS",
        "formattedCost": "19.99USD",
        "applyShippingOptionToCart": {
          "uri": "https://api.digitalriver.com/v1/shoppers/me/carts/active/apply-shipping-option?shippingOptionId=5858800"
        }
      }
    ]
  }
}

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 ***\
...
{
  "shippingOption": {
    "uri": "https://api.digitalriver.com/v1/shoppers/me/carts/active/shipping-options/142400",
    "id": 142400,
    "description": "UPS Ground",
    "cost": {
      "currency": "USD",
      "value": "19.99"
    },
    "formattedCost": "19.99USD",
    "applyShippingOptionToCart": {
      "uri": "https://api.digitalriver.com/v1/shoppers/me/carts/active/apply-shipping-option?shippingOptionId=142400"
    }
  }
}

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 .

Parameter
Description

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.

Last updated