> ## 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.

# Generate quotes

> Price carrier services for one or more customers.

<Note>
  **`POST`** `/v1/org/quote/getQuote`
</Note>

Send an origin, destination, items, and the customer(s) to quote for. The response
returns shared `origin` / `destination` / `goods`, plus one `results` entry per
customer with its priced `quotes`.

## Authorization

<ParamField header="x-api-key" type="string" required>
  Your organisation API key (`dzk_live_…`). See [Authentication](/authentication).
</ParamField>

## Body

<ParamField body="general" type="object" required>
  <Expandable title="general" defaultOpen>
    <ParamField body="customerIds" type="string[]" required>
      Customer internal id(s) to quote for, e.g. `["ACME"]`. At least one, max 50.
      Each must belong to your organisation.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="origin" type="object" required>
  Pickup location. Only `postalCode` is required; the rest is enriched server-side.

  <Expandable title="origin">
    <ParamField body="postalCode" type="string" required>Origin postcode, e.g. `"2000"`.</ParamField>
    <ParamField body="countryCode" type="string" default="AU">ISO country code.</ParamField>
    <ParamField body="companyName" type="string">Pickup company name.</ParamField>
    <ParamField body="suburbName" type="string">Suburb.</ParamField>
    <ParamField body="street1" type="string">Address line 1.</ParamField>
    <ParamField body="contactName" type="string">Contact name.</ParamField>
    <ParamField body="phone" type="string">Contact phone.</ParamField>
    <ParamField body="email" type="string">Contact email.</ParamField>
  </Expandable>
</ParamField>

<ParamField body="destination" type="object" required>
  Delivery location. Same fields as `origin` (with `postalCode` required).
</ParamField>

<ParamField body="items" type="object[]" required>
  Goods to quote. At least one item.

  <Expandable title="item">
    <ParamField body="quantity" type="integer" required>Number of items.</ParamField>
    <ParamField body="length" type="number" required>Length (metres).</ParamField>
    <ParamField body="width" type="number" required>Width (metres).</ParamField>
    <ParamField body="height" type="number" required>Height (metres).</ParamField>
    <ParamField body="weight" type="number" required>Weight per item (kg).</ParamField>
    <ParamField body="type" type="string">Item type, e.g. `"Carton/Box"`.</ParamField>
    <ParamField body="itemValue" type="number">Declared value.</ParamField>
  </Expandable>
</ParamField>

<ParamField body="filters" type="object">
  Optional. Narrow which services / rate cards are priced. Empty or omitted = no
  restriction. See [Filters](/guides/filters).

  <Expandable title="filters">
    <ParamField body="carrierIds" type="string[]">Carrier aliases.</ParamField>
    <ParamField body="serviceIds" type="string[]">Service aliases (= `serviceId` in the response).</ParamField>
    <ParamField body="rateCardIds" type="string[]">Rate-card aliases (= `rateCardId` in the response).</ParamField>
    <ParamField body="serviceTypes" type="string[]">e.g. `DOMESTIC`, `INTERNATIONAL`.</ParamField>
    <ParamField body="serviceClasses" type="string[]">e.g. `STANDARD`, `EXPRESS`.</ParamField>
  </Expandable>
</ParamField>

## Response

<ResponseField name="origin" type="object">Enriched pickup location echoed back.</ResponseField>
<ResponseField name="destination" type="object">Enriched delivery location echoed back.</ResponseField>
<ResponseField name="goods" type="object[]">The items, with computed `chargeableWeight`.</ResponseField>

<ResponseField name="results" type="object[]">
  One entry per requested customer.

  <Expandable title="result">
    <ResponseField name="customerId" type="string">The customer this block is for.</ResponseField>
    <ResponseField name="quoteId" type="string">Unique id — pass to [Fetch a quote](/api-reference/fetch-quote).</ResponseField>
    <ResponseField name="noQuoteMessage" type="string">Set when nothing could be priced.</ResponseField>

    <ResponseField name="quotes" type="object[]">
      One entry per matched service.

      <Expandable title="quote">
        <ResponseField name="rateId" type="string">Reference for this priced line.</ResponseField>
        <ResponseField name="serviceName" type="string">Human service name.</ResponseField>
        <ResponseField name="serviceId" type="string">Service alias (use in `filters.serviceIds`).</ResponseField>
        <ResponseField name="rateCardName" type="string">Human rate-card name.</ResponseField>
        <ResponseField name="rateCardId" type="string">Rate-card alias (use in `filters.rateCardIds`).</ResponseField>
        <ResponseField name="amount" type="number">Freight amount (sell).</ResponseField>
        <ResponseField name="totalAmount" type="number">Total incl. surcharges + GST.</ResponseField>
        <ResponseField name="gstAmount" type="number">GST portion.</ResponseField>
        <ResponseField name="isSpotRate" type="boolean">Whether this is a spot rate.</ResponseField>
        <ResponseField name="deliveryTime" type="string">Human transit estimate.</ResponseField>
        <ResponseField name="minTransitTime" type="integer">Minimum transit.</ResponseField>
        <ResponseField name="maxTransitTime" type="integer">Maximum transit.</ResponseField>
        <ResponseField name="transitTimeUnit" type="string">Transit unit, e.g. `D` (days).</ResponseField>

        <ResponseField name="surcharges" type="object[]">
          Applied surcharges.

          <Expandable title="surcharge">
            <ResponseField name="name" type="string">Surcharge name.</ResponseField>
            <ResponseField name="description" type="string">Description.</ResponseField>
            <ResponseField name="key" type="string">Surcharge key.</ResponseField>
            <ResponseField name="amount" type="number">Surcharge amount.</ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```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 }
      ],
      "filters": { "serviceIds": ["ZEPHYR", "FALCON"] }
    }'
  ```

  ```json Body 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"] }
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 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 }
            ]
          }
        ]
      }
    ]
  }
  ```
</ResponseExample>
