> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# Request Shipping Rates

POST https://your_app.example.com/rate
Content-Type: application/json

Request shipping rates. BigCommerce sends a request for shipping quotes to the shipping provider URL. The shipping provider responds with shipping quotes.

> #### Note
> * Substitute the host and path specific to the shipping provider for `your_app.example.com` and `rate`. 
> * The Send a Test Request feature is not currently supported for this endpoint.

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/integrations/shipping-provider/request-shipping-rates

## Request

### Body (application/json)

This endpoint expects a RateRequestPayload.

- `base_options` (BaseOptions, required) — The minimum required payload that is sent to retrieve rates.
- `zone_options` (ZoneOptionsInstance, optional) — Any zone-specific request options declared by the carrier and configured by the merchant to retrieve rates. Optional.
- `connection_options` (ConnectionOptionsInstance, optional) — Any global request options declared by the carrier and configured by the merchant to retrieve rates. Optional.
- `rate_options` (list of RateOptionsInstanceItems, optional) — Checkout-specific request options for retrieving rates, as key/value pairs. Optional. BigCommerce currently sends an empty array.

## Response

### 200

Quote response.

- `quote_id` (string, required)
- `messages` (list of RateResponsePayloadMessagesItems, required)
- `carrier_quotes` (list of RateResponsePayloadCarrierQuotesItems, required)
- `ttl` (integer, optional) — Time-to-live (TTL) in seconds

## Types

### BaseOptions

The minimum required payload that is sent to retrieve rates.

- `origin` (BaseOptionsOrigin, required) — Object representing a destination or origin address for items.
- `destination` (BaseOptionsDestination, required) — Object representing a destination or origin address for items.
- `items` (list of BaseOptionsItemsItems, required)
- `store_id` (string, required)
- `customer` (BaseOptionsCustomer, optional) — The details of the Customer that has made the purchase.
- `request_context` (BaseOptionsRequestContext, optional) — A collection of Reference Value objects.

### ZoneOptionsInstance

Any zone-specific request options declared by the carrier and configured by the merchant to retrieve rates. Optional.

### ConnectionOptionsInstance

Any global request options declared by the carrier and configured by the merchant to retrieve rates. Optional.

### RateOptionsInstanceItems

- `key` (string, required)
- `value` (string, required)

### RateResponsePayloadMessagesItems

A simple string/type response for returning information.

- `text` (string, required)
- `type` (enum, required)
  - Allowed values: `INFO`, `WARNING`, `ERROR`

### RateResponsePayloadCarrierQuotesItems

A grouping of carrier rates and optionally, info about that carrier.

- `quotes` (list of RateResponsePayloadCarrierQuotesItemsQuotesItems, required)
- `carrier_info` (RateResponsePayloadCarrierQuotesItemsCarrierInfo, optional)

### BaseOptionsOrigin

Object representing a destination or origin address for items.

- `zip` (string, required)
- `country_iso2` (string, required) — Country in ISO_3166 2 format.
- `street_1` (string, optional)
- `street_2` (string, optional)
- `city` (string, optional)
- `state_iso2` (string, optional) — State in ISO_3166 2 format.
- `address_type` (enum, optional) — Optional. Defaults to `RESIDENTIAL`.
  - Allowed values: `RESIDENTIAL`, `COMMERCIAL`

### BaseOptionsDestination

Object representing a destination or origin address for items.

- `zip` (string, required)
- `country_iso2` (string, required) — Country in ISO_3166 2 format
- `street_1` (string, optional)
- `street_2` (string, optional)
- `city` (string, optional)
- `state_iso2` (string, optional) — State in ISO_3166 2 format
- `address_type` (enum, optional) — Defaults to residential. Optional.
  - Allowed values: `RESIDENTIAL`, `COMMERCIAL`
- `form_fields` (map from string to FormFieldValue, optional) — Describes one or more [custom form fields](/developer/api-reference/rest/storefront/form-fields). Property key is the global ID of a shipping address form field. When no custom fields exist, the object is empty.

### BaseOptionsItemsItems

A cart item along with its shipping-specific attributes.

- `sku` (string, optional) — The variant SKU.
- `variant_id` (string, optional)
- `product_id` (string, optional)
- `name` (string, optional)
- `length` (BaseOptionsItemsItemsLength, optional) — Value object for a length measurement.
- `width` (BaseOptionsItemsItemsWidth, optional) — Value object for a length measurement.
- `height` (BaseOptionsItemsItemsHeight, optional) — Value object for a length measurement.
- `weight` (BaseOptionsItemsItemsWeight, optional) — Value object for a weight measurement.
- `discounted_price` (BaseOptionsItemsItemsDiscountedPrice, optional) — Value object for a money amount.
- `declared_value` (BaseOptionsItemsItemsDeclaredValue, optional) — Value object for a money amount.
- `quantity` (integer, optional)
- `attributes` (list of BaseOptionsItemsItemsAttributesItems, optional) — A list of arbitrary properties stored as part of the product or product variant meta fields. These consist of public fields specific to the carrier integration.

### BaseOptionsCustomer

The details of the Customer that has made the purchase.

- `customer_groups` (list of BaseOptionsCustomerCustomerGroupsItems, optional)
- `customer_id` (integer, optional)

### BaseOptionsRequestContext

A collection of Reference Value objects.

- `reference_values` (list of BaseOptionsRequestContextReferenceValuesItems, optional)

### RateResponsePayloadCarrierQuotesItemsQuotesItems

A quote being returned as part of the rate request. Optional fields must be omitted from the response when no value is available.

- `code` (string, required) — A code describing the service.
- `display_name` (string, required) — A display name for the service.
- `cost` (RateResponsePayloadCarrierQuotesItemsQuotesItemsCost, required) — Value object for a money amount.
- `messages` (list of RateResponsePayloadCarrierQuotesItemsQuotesItemsMessagesItems, optional)
- `description` (string, optional)
- `rate_id` (string, optional)
- `discounted_cost` (RateResponsePayloadCarrierQuotesItemsQuotesItemsDiscountedCost, optional) — Value object for a money amount. Optional field; merchants may request features.
- `dispatch_date` (date, optional) — Date at which carrier dispatches to the shipping destination. Optional field; merchants may request features.
- `transit_time` (RateResponsePayloadCarrierQuotesItemsQuotesItemsTransitTime, optional) — Value object for the length of time in transit.

### RateResponsePayloadCarrierQuotesItemsCarrierInfo

- `code` (string, required)
- `display_name` (string, required)

### FormFieldValue

The value of a [shipping address](/developer/api-reference/rest/admin/management/orders/order-shipping-addresses/get-order-shipping-address) form field.

- `id` (string, optional) — The global ID of the shipping address form field.
- `value` (string, optional) — The form field value. Depending on the form field, this could be a user-defined value or the value of a hidden input.

### BaseOptionsItemsItemsLength

Value object for a length measurement.

- `units` (enum, required)
  - Allowed values: `cm`, `in`
- `value` (double, required)

### BaseOptionsItemsItemsWidth

Value object for a length measurement.

- `units` (enum, required)
  - Allowed values: `cm`, `in`
- `value` (double, required)

### BaseOptionsItemsItemsHeight

Value object for a length measurement.

- `units` (enum, required)
  - Allowed values: `cm`, `in`
- `value` (double, required)

### BaseOptionsItemsItemsWeight

Value object for a weight measurement.

- `units` (enum, required)
  - Allowed values: `oz`, `g`
- `value` (double, required)

### BaseOptionsItemsItemsDiscountedPrice

Value object for a money amount.

- `currency` (string, required)
- `amount` (double, required)

### BaseOptionsItemsItemsDeclaredValue

Value object for a money amount.

- `currency` (string, required)
- `amount` (double, required)

### BaseOptionsItemsItemsAttributesItems

- `key` (string, optional) — The key associated with the meta field.
- `value` (string, optional) — The value associated with the meta field.
- `namespace` (string, optional) — The namespace associated with a [product](/developer/api-reference/rest/admin/catalog/products/metafields) or [product variant](/developer/api-reference/rest/admin/catalog/product-variants/metafields) metafields. You should save a metafield namespace under this format `shipping_carrier_{yourCarrierId}`; otherwise, you will not be able to recognize it as an attribute.
- `resource_type` (enum, optional) — Resource type associated with the meta field. Currently, the only values available are 'product' or 'variant'.
  - Allowed values: `product`, `variant`
- `resource_id` (string, optional) — The resource ID of the meta field.
- `attribute_type` (enum, optional) — Attribute type associated with the product or product variant meta field. Currently, the only value for this is 'metafield'.
  - Allowed values: `metafield`

### BaseOptionsCustomerCustomerGroupsItems

The Group (if any) that this customer is in. This will default to zero if the customer is not in a group or is a guest.

- `customer_group_id` (integer, optional)
- `customer_group_name` (string, optional)

### BaseOptionsRequestContextReferenceValuesItems

Value objects contained within the request context.

- `name` (string, optional) — The property to which the reference value pertains. Examples include `channel_id` and `cart_id`.
- `value` (string, optional)

### RateResponsePayloadCarrierQuotesItemsQuotesItemsCost

Value object for a money amount.

- `currency` (string, required)
- `amount` (double, required)

### RateResponsePayloadCarrierQuotesItemsQuotesItemsMessagesItems

A simple string/type response for returning information.

- `text` (string, required)
- `type` (enum, required)
  - Allowed values: `INFO`, `WARNING`, `ERROR`

### RateResponsePayloadCarrierQuotesItemsQuotesItemsDiscountedCost

Value object for a money amount. Optional field; merchants may request features.

- `currency` (string, required)
- `amount` (double, required)

### RateResponsePayloadCarrierQuotesItemsQuotesItemsTransitTime

Value object for the length of time in transit.

- `units` (enum, optional)
  - Allowed values: `BUSINESS_DAYS`, `DAYS`, `HOURS`
- `duration` (integer, optional)

## Examples

### With shipping rates

**Request**

```json
{
  "base_options": {
    "origin": {
      "zip": "94105",
      "country_iso2": "US"
    },
    "destination": {
      "zip": "94105",
      "country_iso2": "US"
    },
    "items": [
      {}
    ],
    "store_id": "string"
  }
}
```

**Response**

```json
{
  "quote_id": "Lor",
  "messages": [
    {
      "text": "ni",
      "type": "INFO"
    }
  ],
  "carrier_quotes": [
    {
      "quotes": [
        {
          "code": "GND",
          "display_name": "cillum",
          "cost": {
            "currency": "BEH",
            "amount": 53116961.83460022
          },
          "messages": [
            {
              "text": "deserunt",
              "type": "INFO"
            },
            {
              "text": "ut",
              "type": "ERROR"
            },
            {
              "text": "c",
              "type": "WARNING"
            },
            {
              "text": "veniam",
              "type": "ERROR"
            }
          ],
          "description": "el",
          "rate_id": "n",
          "discounted_cost": {
            "currency": "VQD",
            "amount": 16810732.187082157
          },
          "dispatch_date": "1947-07-10",
          "transit_time": {
            "units": "DAYS",
            "duration": 74
          }
        },
        {
          "code": "GND",
          "display_name": "",
          "cost": {
            "currency": "PRZ",
            "amount": 85659359.530116
          },
          "messages": [
            {
              "text": "consequat",
              "type": "ERROR"
            },
            {
              "text": "eu e",
              "type": "WARNING"
            },
            {
              "text": "adip",
              "type": "ERROR"
            },
            {
              "text": "enim no",
              "type": "ERROR"
            },
            {
              "text": "eu",
              "type": "ERROR"
            }
          ],
          "description": "cillum ve",
          "rate_id": "ea ad",
          "discounted_cost": {
            "currency": "XRQ",
            "amount": 69218406.22440869
          },
          "dispatch_date": "1954-03-05",
          "transit_time": {
            "units": "HOURS",
            "duration": 21
          }
        },
        {
          "code": "GND",
          "display_name": "dolor rep",
          "cost": {
            "currency": "VOF",
            "amount": 29865288.150019586
          },
          "messages": [
            {
              "text": "in id",
              "type": "INFO"
            },
            {
              "text": "et occa",
              "type": "ERROR"
            },
            {
              "text": "esse dolo",
              "type": "INFO"
            },
            {
              "text": "dolor",
              "type": "ERROR"
            },
            {
              "text": "ex",
              "type": "ERROR"
            }
          ],
          "description": "ullamco",
          "rate_id": "",
          "discounted_cost": {
            "currency": "CKD",
            "amount": 18401337.766514115
          },
          "dispatch_date": "1993-06-23",
          "transit_time": {
            "units": "HOURS",
            "duration": 54
          }
        }
      ],
      "carrier_info": {
        "code": "",
        "display_name": "c"
      }
    },
    {
      "quotes": [
        {
          "code": "GND",
          "display_name": "labore",
          "cost": {
            "currency": "OHQ",
            "amount": 63679444.026082255
          },
          "messages": [
            {
              "text": "offici",
              "type": "INFO"
            },
            {
              "text": "dolore",
              "type": "ERROR"
            },
            {
              "text": "nis",
              "type": "WARNING"
            },
            {
              "text": "ma",
              "type": "WARNING"
            }
          ],
          "description": "in r",
          "rate_id": "l",
          "discounted_cost": {
            "currency": "UBE",
            "amount": 40327578.11995282
          },
          "dispatch_date": "1943-09-25",
          "transit_time": {
            "units": "DAYS",
            "duration": 10
          }
        },
        {
          "code": "GND",
          "display_name": "irure",
          "cost": {
            "currency": "PEJ",
            "amount": 56049316.6584908
          },
          "messages": [
            {
              "text": "cillum a",
              "type": "INFO"
            }
          ],
          "description": "nisi",
          "rate_id": "",
          "discounted_cost": {
            "currency": "VFS",
            "amount": 86177946.62739782
          },
          "dispatch_date": "1999-01-13",
          "transit_time": {
            "units": "DAYS",
            "duration": 11
          }
        }
      ],
      "carrier_info": {
        "code": "consect",
        "display_name": "eiusmod"
      }
    },
    {
      "quotes": [
        {
          "code": "GND",
          "display_name": "ullamc",
          "cost": {
            "currency": "NRB",
            "amount": 75971681.09105605
          },
          "messages": [
            {
              "text": "laborum",
              "type": "INFO"
            },
            {
              "text": "proident i",
              "type": "WARNING"
            },
            {
              "text": "sin",
              "type": "ERROR"
            },
            {
              "text": "volup",
              "type": "ERROR"
            },
            {
              "text": "deser",
              "type": "WARNING"
            }
          ],
          "description": "am",
          "rate_id": "mo",
          "discounted_cost": {
            "currency": "NPA",
            "amount": 72743924.13626081
          },
          "dispatch_date": "2006-01-17",
          "transit_time": {
            "units": "BUSINESS_DAYS",
            "duration": 52
          }
        },
        {
          "code": "GND",
          "display_name": "dolor",
          "cost": {
            "currency": "RDZ",
            "amount": 46371179.641438134
          },
          "messages": [
            {
              "text": "ex",
              "type": "WARNING"
            },
            {
              "text": "ipsum",
              "type": "WARNING"
            }
          ],
          "description": "",
          "rate_id": "aute c",
          "discounted_cost": {
            "currency": "SJL",
            "amount": 60745150.4084129
          },
          "dispatch_date": "1976-06-19",
          "transit_time": {
            "units": "DAYS",
            "duration": 69
          }
        },
        {
          "code": "GND",
          "display_name": "minim a",
          "cost": {
            "currency": "SUR",
            "amount": 97146769.48560241
          },
          "messages": [
            {
              "text": "Lorem",
              "type": "INFO"
            }
          ],
          "description": "de",
          "rate_id": "fu",
          "discounted_cost": {
            "currency": "PCP",
            "amount": 99728805.8108871
          },
          "dispatch_date": "1962-05-18",
          "transit_time": {
            "units": "DAYS",
            "duration": 10
          }
        },
        {
          "code": "GND",
          "display_name": "ea occaeca",
          "cost": {
            "currency": "YOG",
            "amount": 51938381.743391246
          },
          "messages": [
            {
              "text": "in irure",
              "type": "INFO"
            },
            {
              "text": "c",
              "type": "INFO"
            },
            {
              "text": "deserun",
              "type": "ERROR"
            },
            {
              "text": "dolo",
              "type": "ERROR"
            }
          ],
          "description": "dol",
          "rate_id": "U",
          "discounted_cost": {
            "currency": "HMF",
            "amount": 98693839.53819382
          },
          "dispatch_date": "2010-08-15",
          "transit_time": {
            "units": "HOURS",
            "duration": 31
          }
        },
        {
          "code": "GND",
          "display_name": "sint",
          "cost": {
            "currency": "TTO",
            "amount": 65094224.57995142
          },
          "messages": [
            {
              "text": "ut",
              "type": "INFO"
            }
          ],
          "description": "labo",
          "rate_id": "anim ma",
          "discounted_cost": {
            "currency": "ZMA",
            "amount": 57479313.52475042
          },
          "dispatch_date": "2008-10-24",
          "transit_time": {
            "units": "DAYS",
            "duration": 55
          }
        }
      ],
      "carrier_info": {
        "code": "dol",
        "display_name": "commodo"
      }
    },
    {
      "quotes": [
        {
          "code": "GND",
          "display_name": "sed",
          "cost": {
            "currency": "BOE",
            "amount": 9130506.016241236
          },
          "messages": [
            {
              "text": "i",
              "type": "ERROR"
            },
            {
              "text": "dolore",
              "type": "WARNING"
            },
            {
              "text": "ut",
              "type": "INFO"
            },
            {
              "text": "nos",
              "type": "ERROR"
            }
          ],
          "description": "",
          "rate_id": "c",
          "discounted_cost": {
            "currency": "QGD",
            "amount": 81757709.40827666
          },
          "dispatch_date": "1999-11-11",
          "transit_time": {
            "units": "HOURS",
            "duration": 6
          }
        },
        {
          "code": "GND",
          "display_name": "do aute",
          "cost": {
            "currency": "IQW",
            "amount": 83709032.8238562
          },
          "messages": [
            {
              "text": "ess",
              "type": "ERROR"
            },
            {
              "text": "an",
              "type": "WARNING"
            },
            {
              "text": "Duis",
              "type": "ERROR"
            },
            {
              "text": "ipsum",
              "type": "WARNING"
            },
            {
              "text": "do",
              "type": "WARNING"
            }
          ],
          "description": "amet",
          "rate_id": "veniam",
          "discounted_cost": {
            "currency": "YYL",
            "amount": 11005656.662449125
          },
          "dispatch_date": "1980-05-16",
          "transit_time": {
            "units": "HOURS",
            "duration": 32
          }
        }
      ],
      "carrier_info": {
        "code": "vel",
        "display_name": "laborum e"
      }
    }
  ]
}
```

**SDK Code**

```python With shipping rates
import requests

url = "https://your_app.example.com/rate"

payload = { "base_options": {
        "origin": {
            "zip": "94105",
            "country_iso2": "US"
        },
        "destination": {
            "zip": "94105",
            "country_iso2": "US"
        },
        "items": [{}],
        "store_id": "string"
    } }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript With shipping rates
const url = 'https://your_app.example.com/rate';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"base_options":{"origin":{"zip":"94105","country_iso2":"US"},"destination":{"zip":"94105","country_iso2":"US"},"items":[{}],"store_id":"string"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go With shipping rates
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://your_app.example.com/rate"

	payload := strings.NewReader("{\n  \"base_options\": {\n    \"origin\": {\n      \"zip\": \"94105\",\n      \"country_iso2\": \"US\"\n    },\n    \"destination\": {\n      \"zip\": \"94105\",\n      \"country_iso2\": \"US\"\n    },\n    \"items\": [\n      {}\n    ],\n    \"store_id\": \"string\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby With shipping rates
require 'uri'
require 'net/http'

url = URI("https://your_app.example.com/rate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"base_options\": {\n    \"origin\": {\n      \"zip\": \"94105\",\n      \"country_iso2\": \"US\"\n    },\n    \"destination\": {\n      \"zip\": \"94105\",\n      \"country_iso2\": \"US\"\n    },\n    \"items\": [\n      {}\n    ],\n    \"store_id\": \"string\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java With shipping rates
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://your_app.example.com/rate")
  .header("Content-Type", "application/json")
  .body("{\n  \"base_options\": {\n    \"origin\": {\n      \"zip\": \"94105\",\n      \"country_iso2\": \"US\"\n    },\n    \"destination\": {\n      \"zip\": \"94105\",\n      \"country_iso2\": \"US\"\n    },\n    \"items\": [\n      {}\n    ],\n    \"store_id\": \"string\"\n  }\n}")
  .asString();
```

```php With shipping rates
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://your_app.example.com/rate', [
  'body' => '{
  "base_options": {
    "origin": {
      "zip": "94105",
      "country_iso2": "US"
    },
    "destination": {
      "zip": "94105",
      "country_iso2": "US"
    },
    "items": [
      {}
    ],
    "store_id": "string"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp With shipping rates
using RestSharp;

var client = new RestClient("https://your_app.example.com/rate");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"base_options\": {\n    \"origin\": {\n      \"zip\": \"94105\",\n      \"country_iso2\": \"US\"\n    },\n    \"destination\": {\n      \"zip\": \"94105\",\n      \"country_iso2\": \"US\"\n    },\n    \"items\": [\n      {}\n    ],\n    \"store_id\": \"string\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift With shipping rates
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["base_options": [
    "origin": [
      "zip": "94105",
      "country_iso2": "US"
    ],
    "destination": [
      "zip": "94105",
      "country_iso2": "US"
    ],
    "items": [[]],
    "store_id": "string"
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://your_app.example.com/rate")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Without shipping rates

**Request**

```json
{
  "base_options": {
    "origin": {
      "zip": "94105",
      "country_iso2": "US"
    },
    "destination": {
      "zip": "94105",
      "country_iso2": "US"
    },
    "items": [
      {}
    ],
    "store_id": "string"
  }
}
```

**Response**

```json
{
  "quote_id": "example_quote",
  "messages": [],
  "carrier_quotes": [],
  "ttl": 5
}
```

**SDK Code**

```python Without shipping rates
import requests

url = "https://your_app.example.com/rate"

payload = { "base_options": {
        "origin": {
            "zip": "94105",
            "country_iso2": "US"
        },
        "destination": {
            "zip": "94105",
            "country_iso2": "US"
        },
        "items": [{}],
        "store_id": "string"
    } }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Without shipping rates
const url = 'https://your_app.example.com/rate';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"base_options":{"origin":{"zip":"94105","country_iso2":"US"},"destination":{"zip":"94105","country_iso2":"US"},"items":[{}],"store_id":"string"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Without shipping rates
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://your_app.example.com/rate"

	payload := strings.NewReader("{\n  \"base_options\": {\n    \"origin\": {\n      \"zip\": \"94105\",\n      \"country_iso2\": \"US\"\n    },\n    \"destination\": {\n      \"zip\": \"94105\",\n      \"country_iso2\": \"US\"\n    },\n    \"items\": [\n      {}\n    ],\n    \"store_id\": \"string\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Without shipping rates
require 'uri'
require 'net/http'

url = URI("https://your_app.example.com/rate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"base_options\": {\n    \"origin\": {\n      \"zip\": \"94105\",\n      \"country_iso2\": \"US\"\n    },\n    \"destination\": {\n      \"zip\": \"94105\",\n      \"country_iso2\": \"US\"\n    },\n    \"items\": [\n      {}\n    ],\n    \"store_id\": \"string\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Without shipping rates
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://your_app.example.com/rate")
  .header("Content-Type", "application/json")
  .body("{\n  \"base_options\": {\n    \"origin\": {\n      \"zip\": \"94105\",\n      \"country_iso2\": \"US\"\n    },\n    \"destination\": {\n      \"zip\": \"94105\",\n      \"country_iso2\": \"US\"\n    },\n    \"items\": [\n      {}\n    ],\n    \"store_id\": \"string\"\n  }\n}")
  .asString();
```

```php Without shipping rates
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://your_app.example.com/rate', [
  'body' => '{
  "base_options": {
    "origin": {
      "zip": "94105",
      "country_iso2": "US"
    },
    "destination": {
      "zip": "94105",
      "country_iso2": "US"
    },
    "items": [
      {}
    ],
    "store_id": "string"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Without shipping rates
using RestSharp;

var client = new RestClient("https://your_app.example.com/rate");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"base_options\": {\n    \"origin\": {\n      \"zip\": \"94105\",\n      \"country_iso2\": \"US\"\n    },\n    \"destination\": {\n      \"zip\": \"94105\",\n      \"country_iso2\": \"US\"\n    },\n    \"items\": [\n      {}\n    ],\n    \"store_id\": \"string\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Without shipping rates
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["base_options": [
    "origin": [
      "zip": "94105",
      "country_iso2": "US"
    ],
    "destination": [
      "zip": "94105",
      "country_iso2": "US"
    ],
    "items": [[]],
    "store_id": "string"
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://your_app.example.com/rate")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```