Shipping options

Get a shipping option by ID

get

To get a shipping option by ID, specify the shipping option ID in the {id} URI path parameter.

Path parameters
shippingOptionsIdstringRequired

Provide the identifier of the shipping option chosen for the cart.

Query parameters
tokenstringOptional

Provide the authorized or anonymous token for a shopper.

expandstringOptional

Use the expand query parameter when you want additional fields to appear in the response. The expand query parameter provides more fields in the response. Expanding resources reduces the number of API calls required to accomplish a task.

fieldsstringOptional

Specify the fields that you want to appear in the response. Filtering the fields returned in the response can conserve bandwidth and accelerate response time.

Responses
200
Successful response.
application/json
Responseone of
or
get
GET /v1/shoppers/me/carts/active/shipping-options/{shippingOptionsId} HTTP/1.1
Host: api.digitalriver.com
Accept: */*
{
  "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"
    }
  }
}

Retrieve all shipping options

get

Get the available shipping options.

Query parameters
tokenstringOptional

Provide the authorized or anonymous token for a shopper.

expandstringOptional

Use the expand query parameter when you want additional fields to appear in the response. The expand query parameter provides more fields in the response. Expanding resources reduces the number of API calls required to accomplish a task.

fieldsstringOptional

Specify the fields that you want to appear in the response. Filtering the fields returned in the response can conserve bandwidth and accelerate response time.

Responses
200
Successful response.
application/json
Responseone of
or
get
GET /v1/shoppers/me/carts/active/shipping-options HTTP/1.1
Host: api.digitalriver.com
Accept: */*
{
  "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"
        }
      }
    ]
  }
}

Last updated