# Create a quote

> POST /api/public/v1/quotes, scope loads.rates. Techvia TMS public API v1 reference.

Source: https://techvia.software/docs/tms/reference/quotes/create-a-quote/

`POST /api/public/v1/quotes`

**Scope:** `loads.rates`. **MCP tool:** `create_quote`. Rules and edge cases: [Quotes guide](/docs/tms/guides/quotes/).

## Request body

Content type `application/json`. Limits and rules for each field are in the [Quotes guide](/docs/tms/guides/quotes/).

| Field | Type | Required | Notes |
|---|---|---|---|
| `customerId` | string (uuid) | no |  |
| `originCity` | string | no |  |
| `originState` | string | no |  |
| `destCity` | string | no |  |
| `destState` | string | no |  |
| `quotedRate` | number | no |  |
| `dispatcherId` | string (uuid) | no |  |
| `originFacilityId` | string (uuid) | no |  |
| `destFacilityId` | string (uuid) | no |  |
| `equipment` | string | no | One of `DryVan`, `Flatbed`, `Reefer`, `Tanker`, `StepDeck`, `Other` |
| `commodity` | string | no |  |
| `weightLbs` | number | no |  |
| `pickupDate` | any (ISO 8601 date-time) | no |  |
| `deliveryDate` | any (ISO 8601 date-time) | no |  |
| `validUntil` | any (ISO 8601 date-time) | no |  |
| `miles` | number | no |  |
| `notes` | string | no |  |

## Responses

| Status | Meaning | Body |
|---|---|---|
| `201` | Created | `PublicQuote` |
| `422` | Unprocessable Entity | `ProblemDetails` |

### `201` body

| Field | Type | Notes |
|---|---|---|
| `id` | string (uuid) |  |
| `quoteNumber` | string |  |
| `status` | string |  |
| `customerId` | string (uuid) |  |
| `customerName` | string |  |
| `dispatcherName` | string |  |
| `originCity` | string |  |
| `originState` | string |  |
| `destCity` | string |  |
| `destState` | string |  |
| `originFacilityId` | string (uuid) |  |
| `originFacilityName` | string |  |
| `destFacilityId` | string (uuid) |  |
| `destFacilityName` | string |  |
| `equipment` | string |  |
| `commodity` | string |  |
| `weightLbs` | number |  |
| `pickupDate` | string (date) |  |
| `deliveryDate` | string (date) |  |
| `miles` | number |  |
| `quotedRate` | number |  |
| `suggestedRate` | number |  |
| `validUntil` | string (date) |  |
| `sentAt` | string (date-time) |  |
| `wonAt` | string (date-time) |  |
| `lostAt` | string (date-time) |  |
| `lostReason` | string |  |
| `lostNotes` | string |  |
| `convertedLoadId` | string (uuid) |  |
| `notes` | string |  |
| `rowVersion` | integer |  |
| `createdAt` | string (date-time) |  |
| `updatedAt` | string (date-time) |  |

Errors are RFC 7807 problem details; see [Errors](/docs/tms/concepts/errors/).

**Example request**

**curl**

```bash
curl -X POST "https://tms-api.techvia.software/api/public/v1/quotes" \
  -H "Authorization: Bearer $TMS_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "customerId": "01a20943-75ec-78ad-9764-7a1d1cc95684",
    "originCity": "Dallas",
    "originState": "TX",
    "destCity": "Phoenix",
    "destState": "AZ",
    "quotedRate": 2400,
    "equipment": "Reefer",
    "commodity": "Produce",
    "weightLbs": 38000,
    "pickupDate": "2026-12-08"
  }'
```

**JavaScript**

```js
const res = await fetch(`https://tms-api.techvia.software/api/public/v1/quotes`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.TMS_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': crypto.randomUUID(),
  },
  body: JSON.stringify({
    "customerId": "01a20943-75ec-78ad-9764-7a1d1cc95684",
    "originCity": "Dallas",
    "originState": "TX",
    "destCity": "Phoenix",
    "destState": "AZ",
    "quotedRate": 2400,
    "equipment": "Reefer",
    "commodity": "Produce",
    "weightLbs": 38000,
    "pickupDate": "2026-12-08"
  }),
});
if (!res.ok) throw new Error(await res.text());
console.log(await res.json());
```

**Python**

```python

res = requests.request(
    "POST",
    f"https://tms-api.techvia.software/api/public/v1/quotes",
    headers={"Authorization": f"Bearer {os.environ['TMS_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
    json={
      "customerId": "01a20943-75ec-78ad-9764-7a1d1cc95684",
      "originCity": "Dallas",
      "originState": "TX",
      "destCity": "Phoenix",
      "destState": "AZ",
      "quotedRate": 2400,
      "equipment": "Reefer",
      "commodity": "Produce",
      "weightLbs": 38000,
      "pickupDate": "2026-12-08"
    },
)
res.raise_for_status()
print(res.json())
```

**Example response** `201`

```json
{
  "id": "01a20943-7a10-7c11-8a2e-000000000060",
  "quoteNumber": "QT-000045",
  "status": "Draft",
  "customerId": "01a20943-75ec-78ad-9764-7a1d1cc95684",
  "customerName": "Acme Foods",
  "dispatcherName": "Dana Ruiz",
  "originCity": "Dallas",
  "originState": "TX",
  "destCity": "Phoenix",
  "destState": "AZ",
  "originFacilityId": null,
  "originFacilityName": null,
  "destFacilityId": null,
  "destFacilityName": null,
  "equipment": "Reefer",
  "commodity": "Produce",
  "weightLbs": 38000,
  "pickupDate": "2026-12-08",
  "deliveryDate": null,
  "miles": null,
  "quotedRate": 2400,
  "suggestedRate": null,
  "validUntil": "2026-12-15",
  "sentAt": null,
  "wonAt": null,
  "lostAt": null,
  "lostReason": null,
  "lostNotes": null,
  "convertedLoadId": null,
  "notes": null,
  "rowVersion": 411,
  "createdAt": "2026-12-01T14:02:31.118204+00:00",
  "updatedAt": "2026-12-01T14:02:31.118204+00:00"
}
```

<p class="ep-caption">Illustrative values. A new quote is a <code>Draft</code>; <code>validUntil</code> left out is your workspace's default validity.</p>
