> ## Documentation Index
> Fetch the complete documentation index at: https://sendcloud.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Shipping rates

<Warning>
  This page applies to v2 of the Sendcloud API and is no longer maintained. To learn more about switching to API v3,
  read our [migration guide](/docs/getting-started/migration-guidelines-for-api-v3#parcels/shipments).
</Warning>

The Sendcloud API seamlessly connects you to [a huge range of carriers worldwide](https://www.sendcloud.com/carriers/), giving you access to a diverse catalogue of shipping methods and service levels to fit the needs of any e-commerce business. We're continuously integrating new carriers and methods with our platform across the national and international delivery landscape.

## Receive discounts on your shipping labels

You don't need to have a carrier contract to access shipping methods in Sendcloud. You can create shipping labels using Sendcloud rates, and receive a discount on your label price based on your subscription plan. The higher your plan, the more discount you'll receive.

## Connect your own direct contract

If you have a direct contract with a carrier, you can [add it to your Sendcloud account](/docs/getting-started/carrier-contracts/) and create labels in Sendcloud using your contracted rates.

## Retrieve shipping rates through the API

Through the Sendcloud API, you can access rates for a host of shipping methods, and directly compare pricing for domestic and international delivery options in a single API call.

<Note>
  You'll only be able to see rates for carriers you've enabled in your account, so be sure to complete all the steps in
  [Getting started](/docs/getting-started/) before proceeding.
</Note>

### Get rates for all shipping methods

If you don't know which method you want to use, or if you want to compare pricing, you can retrieve a list of all available methods and rates by making a `GET` request to the [Retrieve a list of shipping methods](/api/v2/shipping-methods/retrieve-a-list-of-shipping-methods) endpoint.

<Card title="Shipping methods" icon="truck-fast" href="/docs/shipping/shipping-methods" horizontal>
  Learn more in our shipping methods guide
</Card>

### Get rates for specific shipping methods

<Warning>
  Note: Carriers that use pricing based on shipping zones (e.g. Spanish carriers who charge different rates based on the
  postal code of the shipment) are not supported.
</Warning>

You can access rates for a specific shipping method by making a `GET` request to the [Retrieve a shipping price](/api/v2/shipping-prices/retrieve-a-shipping-price) endpoint.

You'll need to know some basic information before you can make your request:

1. The shipping method `id`, which will be used as the `shipping_method_id` query parameter. This is the internal reference Sendcloud uses to identify shipping methods. You can retrieve an `id` via the [Retrieve a list of shipping methods](/api/v2/shipping-methods/retrieve-a-list-of-shipping-methods) or Shipping products endpoints.
2. The `weight` of your parcel, and whether it's in kilograms or grams (`weight_unit`)
3. The country the parcel will be sent from (`from_country`) as an [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code, e.g. `NL` for the Netherlands
4. (Optional) The country the parcel will be sent to (`to_country`) as an [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code
   * If you don't provide a `to_country` parameter, the response will include prices for all the shipping destinations that are applicable to the method

These pieces of information should be sent as query parameters to the endpoint, for example:

```http Request method and URL wrap theme={null}
GET https://panel.sendcloud.sc/api/v2/shipping-price/?shipping_method_id=1234&weight=2weight_unit=kilogram&from_country=NL&to_country=DE
```

<Note>
  **Tip:** If you've already connected your own carrier contract, then rates for your connected carriers will be null,
  unless you have [uploaded your own contract
  pricing](https://support.sendcloud.com/hc/en-us/articles/5163547066004-How-to-upload-your-own-prices-from-your-direct-carrier-contract).
</Note>

<Card title="Shipping prices API" icon="dollar-sign" href="/api/v2/shipping-prices/retrieve-a-shipping-price" horizontal>
  Retrieve a shipping price endpoint
</Card>
