GET
/
checkout
/
cart
/
{cart_id}
/
shipping
/
available
[
  {
    "bag_id": 11111,
    "shipping_methods": [
      {
        "carrier": "OTHER",
        "label": "Free Ground Shipping",
        "price": 0,
        "shipping_method_id": "904508f53e55effda7fe3ed2aee21132",
        "bag_id": 99999,
        "merchant_id": 11111
      },
      {
        "carrier": "USPS",
        "label": "Priority Mail",
        "price": 664,
        "shipping_method_id": "07d19139fc0f4558687c1900c696f071",
        "bag_id": 99999,
        "merchant_id": 11111
      }
    ]
  }
]

Retrieve all available shipping methods for a cart given its cart_id.

Since each merchant has different shipping methods, the response for this call provides shipping methods for each merchant that is a part of this cart.

Using this endpoint you can obtain the available shipping methods for each merchant that is a part of this cart. Before this endpoint can be called you must have provided a shipping address and have added at least one physical item to the cart.

The shipping address, and a list of one or more line items, will be provided to the commerce system of each merchant associated with the cart. Each merchants system will calculate the available shipping methods in real time and these methods will be returned to you in the response.


No Available Shipping Methods

When the response contains an empty list of shipping methods it generally means one of the two followings things happened:

  1. The merchant does not ship to the location identified by the shipping address. To evaluate which regions a merchant does ship to you can use the Relay - Get Shipping Zones endpoint.
  2. The merchant has not yet applied a shipping profile to one or more of the items. This is most often seen with Shopify merchants.

Remediation

  • Ensure that the shopper has entered a valid shipping address. Some external commerce platforms will not return shipping methods for invalid addresses.
  • Remove any Bags from the cart that cannot be shipped to. This can be done by removing all items from a Bag.
  • If you believe the items(s) should be shippable to the shoppers shipping address, ask the merchant(s) to remediate the issue within their system(s).

Longer Response Times

The Get Available Shipping Methods request may take somewhat longer to return a response than other endpoints in the cart process. This is because the rates are calculated in real time for the unique combination of line items and shipping address. When merchants utilize carrier services like USPS or FedEx an additional API call is typically performed to the carriers API and this often results in additional time before a response can be returned.

Headers

X-Violet-Token
string
X-Violet-App-Secret
string
X-Violet-App-Id
integer

Path Parameters

cart_id
integer
required

Response

200 - application/json

Order Shipping Method Wrapper

bag_id
integer
shipping_methods
array