# Multi-Origin Shipping Rates with the Starshipit API
URL: https://support.starshipit.com/articles/4408809144463-multi-origin-shipping-rates-with-the-starshipit-api
Canonical: https://support.starshipit.com/articles/4408809144463-multi-origin-shipping-rates-with-the-starshipit-api
Markdown: https://support.starshipit.com/articles/4408809144463-multi-origin-shipping-rates-with-the-starshipit-api.md
Updated: 2026-06-15

> For the complete documentation index, see [llms.txt](https://support.starshipit.com/llms.txt).

> Configure multi-origin shipping rates via the Starshipit API for orders fulfilled from multiple locations.

## Configure multi-origin rates with the Starshipit API

This guide is for custom integrations calling the Starshipit API directly. If you use Shopify checkout, follow [Shopify: Rates at checkout](/articles/rates-at-checkout/platform-specific-guides/shopify-rates-at-checkout) instead.

Before you begin, make sure you have activated [live rates](/articles/rates-at-checkout/set-up-guides/set-up-rates-at-checkout) in each Starshipit account you want to quote from.

The [Starshipit API rates endpoint](https://api-docs.starshipit.com/#3b71aa5a-8886-4770-ac41-ebacb66b96c4) returns shipping services based on the origin included in the API request. To quote from multiple origins, send one rate request per location, then aggregate the returned services in your integration.

There are two common ways to configure this.

## Option 1: Use the location's API token

Use this option if you have a separate child account for each fulfilment location.

All Starshipit API requests include a `StarShipIT-Api-Key` header. This header determines which account the request is sent to. If each location has its own child account, send the rate request with that child account's API token. Starshipit will use that account's pickup address as the quote origin.

If you also create orders through the API, create the order using the same API token that returned the selected rate.

Example request:

```json
{
  "url": "https://api.starshipit.com/api/rates",
  "method": "POST",
  "headers": {
    "Content-Type": "application/json",
    "StarShipIT-Api-Key": "<LOCATION_API_TOKEN>",
    "Ocp-Apim-Subscription-Key": "<SUBSCRIPTION_KEY>"
  },
  "data": {
    "destination": {
      "street": "20 George Street",
      "suburb": "Sydney",
      "city": "Sydney",
      "state": "NSW",
      "post_code": "2000",
      "country_code": "AU"
    },
    "packages": [
      {
        "weight": 0.5
      }
    ]
  }
}
```

## Option 2: Send the origin address

Use this option if you want to pass the quote origin directly in the request instead of mapping each location to an API token.

The rates endpoint has an optional `sender` address object. Populate this with the location you want to quote from. In this option, your integration does not need to know which API token belongs to which address.

Example request:

```json
{
  "url": "https://api.starshipit.com/api/rates",
  "method": "POST",
  "headers": {
    "Content-Type": "application/json",
    "StarShipIT-Api-Key": "<API_KEY>",
    "Ocp-Apim-Subscription-Key": "<SUBSCRIPTION_KEY>"
  },
  "data": {
    "destination": {
      "street": "20 George Street",
      "suburb": "Sydney",
      "city": "Sydney",
      "state": "NSW",
      "post_code": "2000",
      "country_code": "AU"
    },
    "sender": {
      "street": "100 Beaumont Street",
      "suburb": "Menzies",
      "state": "WA",
      "post_code": "6436",
      "country_code": "AU"
    },
    "packages": [
      {
        "weight": 0.5
      }
    ]
  }
}
```

## More information

* Read the [Starshipit API Overview](/articles/integrations/the-starshipit-api/starshipit-api-overview).
* For API support, contact our [support team](https://help.starshipit.com).
