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

# Quickstart

> Request your first quote in a few minutes.

<Steps>
  <Step title="Get an API key">
    Create one in **Settings → API Keys** (see [Authentication](/authentication)).
  </Step>

  <Step title="Know your customer's internal id">
    Use the customer's business **internal id** (e.g. `ACME`), not a UUID.
  </Step>

  <Step title="Send a quote request">
    Post an origin, destination, items, and the customer id(s).
  </Step>
</Steps>

## Request a quote

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.dyspach.com/v1/org/quote/getQuote \
    -H "x-api-key: $DYSPACH_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "general": { "customerIds": ["ACME"] },
      "origin": { "postalCode": "2000", "countryCode": "AU" },
      "destination": { "postalCode": "3000", "countryCode": "AU" },
      "items": [
        { "type": "Carton/Box", "quantity": 2, "length": 0.3, "width": 0.3, "height": 0.3, "weight": 10 }
      ]
    }'
  ```

  ```js Node theme={null}
  const res = await fetch("https://api.dyspach.com/v1/org/quote/getQuote", {
    method: "POST",
    headers: {
      "x-api-key": process.env.DYSPACH_API_KEY,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      general: { customerIds: ["ACME"] },
      origin: { postalCode: "2000", countryCode: "AU" },
      destination: { postalCode: "3000", countryCode: "AU" },
      items: [
        { type: "Carton/Box", quantity: 2, length: 0.3, width: 0.3, height: 0.3, weight: 10 },
      ],
    }),
  });
  const data = await res.json();
  ```

  ```python Python theme={null}
  import os, requests

  res = requests.post(
      "https://api.dyspach.com/v1/org/quote/getQuote",
      headers={"x-api-key": os.environ["DYSPACH_API_KEY"], "Content-Type": "application/json"},
      json={
          "general": {"customerIds": ["ACME"]},
          "origin": {"postalCode": "2000", "countryCode": "AU"},
          "destination": {"postalCode": "3000", "countryCode": "AU"},
          "items": [
              {"type": "Carton/Box", "quantity": 2, "length": 0.3, "width": 0.3, "height": 0.3, "weight": 10}
          ],
      },
  )
  data = res.json()
  ```
</CodeGroup>

## Response

Origin, destination and goods are shared; each customer gets a `results` entry with
its priced `quotes` (one per eligible service — two shown here).

```json theme={null}
{
  "origin": { "postalCode": "2000", "suburb": "BARANGAROO", "city": "Sydney", "state": "NSW", "stateName": "New South Wales", "countryCode": "AU" },
  "destination": { "postalCode": "3000", "suburb": "MELBOURNE", "city": "Melbourne", "state": "VIC", "stateName": "Victoria", "countryCode": "AU" },
  "goods": [
    { "type": "Carton/Box", "quantity": 2, "length": 30, "width": 30, "height": 30, "weight": 10, "chargeableWeight": 20 }
  ],
  "results": [
    {
      "customerId": "ACME",
      "quoteId": "K541037RNBUQ",
      "noQuoteMessage": "",
      "quotes": [
        {
          "rateId": "7cd6c7cf-84af-419d-b34d-6d270cc809ee",
          "serviceName": "Falcon Freight",
          "serviceId": "FALCON",
          "rateCardName": "Falcon Standard",
          "rateCardId": "FALCON_STD",
          "isSpotRate": false,
          "spotRateMessage": "",
          "amount": 10,
          "totalAmount": 19.8,
          "gstAmount": 1.8,
          "deliveryTime": "1 - 5 business day(s)",
          "minTransitTime": 1,
          "maxTransitTime": 5,
          "transitTimeUnit": "D",
          "surcharges": [
            { "name": "Remote Location", "description": "Remote Location", "key": "Remote Location", "amount": 8 }
          ]
        },
        {
          "rateId": "ba9bc08c-0238-4c88-aff5-b4f26aaab790",
          "serviceName": "Zephyr Couriers",
          "serviceId": "ZEPHYR",
          "rateCardName": "Zephyr Express",
          "rateCardId": "ZEPHYR_EXP",
          "isSpotRate": false,
          "spotRateMessage": "",
          "amount": 9,
          "totalAmount": 11.09,
          "gstAmount": 1.01,
          "deliveryTime": "0 - 0 business day(s)",
          "minTransitTime": 0,
          "maxTransitTime": 0,
          "transitTimeUnit": "D",
          "surcharges": [
            { "name": "Fuel Surcharge", "description": "Fuel Surcharge", "key": "FUEL", "amount": 1.08 }
          ]
        }
      ]
    }
  ]
}
```

<Note>
  `amount` is the freight sell price; `totalAmount` is the total including
  surcharges and GST. Every money field is a number.
</Note>

## Quote for multiple customers

Pass more than one id — you get a `results` entry per customer:

```json theme={null}
{ "general": { "customerIds": ["ACME", "GLOBEX"] }, "origin": { "...": "..." } }
```

## Narrow the results

Add a `filters` block to restrict which services or rate cards are priced:

```json theme={null}
{
  "general": { "customerIds": ["ACME"] },
  "origin": { "postalCode": "2000", "countryCode": "AU" },
  "destination": { "postalCode": "3000", "countryCode": "AU" },
  "items": [{ "type": "Carton/Box", "quantity": 2, "length": 0.3, "width": 0.3, "height": 0.3, "weight": 10 }],
  "filters": { "serviceIds": ["ZEPHYR", "FALCON"] }
}
```

See [Filters](/guides/filters) for every dimension.

## Fetch a quote later

Use the `quoteId` from any result:

```bash theme={null}
curl https://api.dyspach.com/v1/org/quote/getQuote/K541037RNBUQ \
  -H "x-api-key: $DYSPACH_API_KEY"
```
