---
title: "Create quote"
description: "Creates the quote for a Shopify draft order the way the Quotes page does: reads the draft order from Shopify, builds the quote with its line items and addresses (and the payment link when the draft has an invoice URL), r"
url: https://docs.invoicefalcon.com/v3-reference/documents/create-quote/
api: "API v3 reference"
method: POST
path: "/documents/quotes"
---

# Create quote

`POST https://app.invoicefalcon.com/api/v3/external/documents/quotes`

Creates the quote for a Shopify draft order the way the Quotes page does: reads the draft order from Shopify, builds the quote with its line items and addresses (and the payment link when the draft has an invoice URL), renders the PDF and returns the full quote. If the shop already has a quote for that draft order it is returned with already_existed: true.

**Note:** Renders a PDF, which counts against a free plan invoice limit. With send_email: true it also emails the quote to the customer immediately.

## Request body

- `draft_order_id` (string, required): The Shopify draft order: a gid (gid://shopify/DraftOrder/123), a bare id, or its name ('#D1').
- `send_email` (boolean): true emails the quote to the draft order customer right after creating it (default false).
- `generate_pdf` (boolean): false skips rendering the PDF (default true).
- `template_id` (integer): Template to render with. Default: the shop default quote template.

## Returns

- `id` (integer): e.g. `980191017`
- `document_type` (string): e.g. `quote`
- `invoice_number` (string): e.g. `Q-1001`
- `title` (string): e.g. `Quote`
- `order` (object)
  - `shopify_order_id` (string): e.g. `gid://shopify/DraftOrder/555`
  - `name` (string): e.g. `#D1001`
  - `number` (integer, nullable)
- `customer` (object)
  - `id` (integer, nullable)
  - `name` (string, nullable)
  - `email` (string): e.g. `quote@example.com`
  - `shopify_customer_id` (string, nullable)
  - `phone` (string, nullable)
  - `tax_number` (string, nullable)
  - `eori_number` (string, nullable)
  - `tags` (array of anys)
- `financial_status` (string, nullable)
- `currency` (string): e.g. `EUR`
- `total` (string): e.g. `50.00`
- `issued_on` (string): e.g. `2026-11-10`
- `due_on` (string, nullable)
- `sent_at` (string, nullable)
- `printed_at` (string, nullable)
- `reminder_sent_at` (string, nullable)
- `paid` (boolean): e.g. `false`
- `edited` (boolean): e.g. `true`
- `trashed` (boolean): e.g. `false`
- `e_invoice_status` (string, nullable)
- `created_at` (string): e.g. `2026-11-10T08:35:25Z`
- `shopify_draft_order_id` (string): e.g. `gid://shopify/DraftOrder/555`
- `fulfillment_status` (string, nullable)
- `dates` (object)
  - `order_placed_at` (string, nullable)
  - `issued_on` (string): e.g. `2026-11-10`
  - `due_on` (string, nullable)
  - `tax_date` (string, nullable)
  - `fulfilled_on` (string, nullable)
- `po_number` (string, nullable)
- `payment_terms` (string, nullable)
- `payment_gateway` (string, nullable)
- `locale` (string, nullable)
- `totals` (object)
  - `currency` (string): e.g. `EUR`
  - `taxes_included` (boolean, nullable)
  - `subtotal` (string): e.g. `0.00`
  - `discounts` (string): e.g. `0.00`
  - `shipping` (string): e.g. `0.00`
  - `tax` (string): e.g. `0.00`
  - `duties` (string): e.g. `0.00`
  - `total` (string): e.g. `0.00`
  - `total_paid` (string): e.g. `0.00`
  - `total_refunded` (string): e.g. `0.00`
  - `total_due` (string): e.g. `0.00`
- `billing_address` (object, nullable)
- `shipping_address` (object, nullable)
- `line_items` (array of anys)
- `shipping_lines` (array of anys)
- `tax_lines` (array of anys)
- `discount_codes` (array of anys)
- `notes` (object)
  - `note` (string, nullable)
  - `custom_note` (string, nullable)
  - `note_attributes` (array of anys)
- `custom_fields` (array of anys)
- `tags` (array of anys)
- `tracking` (object)
  - `companies` (array of anys, nullable)
  - `numbers` (array of anys, nullable)
- `pdf` (object)
  - `available` (boolean): e.g. `false`
  - `filename` (string, nullable)
  - `url` (string, nullable)
  - `generated_at` (string, nullable)
- `e_invoice` (object)
  - `status` (object, nullable)
  - `requested` (boolean): e.g. `false`
  - `error` (string, nullable)
- `updated_at` (string): e.g. `2026-11-10T08:35:25Z`
- `payment_url` (string): e.g. `https://shop.example/pay/abc`
- `already_existed` (boolean): e.g. `true`

Rate limit: this call costs 2 points ([rate limits](https://docs.invoicefalcon.com/v3/docs/api-v3/rate-limits/)).

## Examples

### Quote a draft order by its name

```sh
curl -X POST "https://app.invoicefalcon.com/api/v3/external/documents/quotes" \
  -H "X-Auth-Token: $INVOICE_FALCON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "draft_order_id": "#D12"
  }'
```

### Create and email the quote

```sh
curl -X POST "https://app.invoicefalcon.com/api/v3/external/documents/quotes" \
  -H "X-Auth-Token: $INVOICE_FALCON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "draft_order_id": "gid://shopify/DraftOrder/1146789216411",
    "send_email": true
  }'
```

### Create with a specific template

```sh
curl -X POST "https://app.invoicefalcon.com/api/v3/external/documents/quotes" \
  -H "X-Auth-Token: $INVOICE_FALCON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "draft_order_id": "#D12",
    "template_id": 312,
    "generate_pdf": true
  }'
```

## 200

The resource, when it already existed.

```json
{
  "id": 980191017,
  "document_type": "quote",
  "invoice_number": "Q-1001",
  "title": "Quote",
  "order": {
    "shopify_order_id": "gid://shopify/DraftOrder/555",
    "name": "#D1001",
    "number": null
  },
  "customer": {
    "id": null,
    "name": null,
    "email": "quote@example.com",
    "shopify_customer_id": null,
    "phone": null,
    "tax_number": null,
    "eori_number": null,
    "tags": []
  },
  "financial_status": null,
  "currency": "EUR",
  "total": "50.00",
  "issued_on": "2026-11-10",
  "due_on": null,
  "sent_at": null,
  "printed_at": null,
  "reminder_sent_at": null,
  "paid": false,
  "edited": true,
  "trashed": false,
  "e_invoice_status": null,
  "created_at": "2026-11-10T08:35:25Z",
  "shopify_draft_order_id": "gid://shopify/DraftOrder/555",
  "fulfillment_status": null,
  "dates": {
    "order_placed_at": null,
    "issued_on": "2026-11-10",
    "due_on": null,
    "tax_date": null,
    "fulfilled_on": null
  },
  "po_number": null,
  "payment_terms": null,
  "payment_gateway": null,
  "locale": null,
  "totals": {
    "currency": "EUR",
    "taxes_included": null,
    "subtotal": "0.00",
    "discounts": "0.00",
    "shipping": "0.00",
    "tax": "0.00",
    "duties": "0.00",
    "total": "0.00",
    "total_paid": "0.00",
    "total_refunded": "0.00",
    "total_due": "0.00"
  },
  "billing_address": null,
  "shipping_address": null,
  "line_items": [],
  "shipping_lines": [],
  "tax_lines": [],
  "discount_codes": [],
  "notes": {
    "note": null,
    "custom_note": null,
    "note_attributes": []
  },
  "custom_fields": [],
  "tags": [],
  "tracking": {
    "companies": null,
    "numbers": null
  },
  "pdf": {
    "available": false,
    "filename": null,
    "url": null,
    "generated_at": null
  },
  "e_invoice": {
    "status": null,
    "requested": false,
    "error": null
  },
  "updated_at": "2026-11-10T08:35:25Z",
  "payment_url": "https://shop.example/pay/abc",
  "already_existed": true
}
```

## 201

Created: the new resource.

```json
{
  "id": 980191017,
  "document_type": "quote",
  "invoice_number": "Q-1001",
  "title": "Quote",
  "order": {
    "shopify_order_id": "gid://shopify/DraftOrder/555",
    "name": "#D1001",
    "number": null
  },
  "customer": {
    "id": null,
    "name": null,
    "email": "quote@example.com",
    "shopify_customer_id": null,
    "phone": null,
    "tax_number": null,
    "eori_number": null,
    "tags": []
  },
  "financial_status": null,
  "currency": "EUR",
  "total": "50.00",
  "issued_on": "2026-11-10",
  "due_on": null,
  "sent_at": null,
  "printed_at": null,
  "reminder_sent_at": null,
  "paid": false,
  "edited": true,
  "trashed": false,
  "e_invoice_status": null,
  "created_at": "2026-11-10T08:35:25Z",
  "shopify_draft_order_id": "gid://shopify/DraftOrder/555",
  "fulfillment_status": null,
  "dates": {
    "order_placed_at": null,
    "issued_on": "2026-11-10",
    "due_on": null,
    "tax_date": null,
    "fulfilled_on": null
  },
  "po_number": null,
  "payment_terms": null,
  "payment_gateway": null,
  "locale": null,
  "totals": {
    "currency": "EUR",
    "taxes_included": null,
    "subtotal": "0.00",
    "discounts": "0.00",
    "shipping": "0.00",
    "tax": "0.00",
    "duties": "0.00",
    "total": "0.00",
    "total_paid": "0.00",
    "total_refunded": "0.00",
    "total_due": "0.00"
  },
  "billing_address": null,
  "shipping_address": null,
  "line_items": [],
  "shipping_lines": [],
  "tax_lines": [],
  "discount_codes": [],
  "notes": {
    "note": null,
    "custom_note": null,
    "note_attributes": []
  },
  "custom_fields": [],
  "tags": [],
  "tracking": {
    "companies": null,
    "numbers": null
  },
  "pdf": {
    "available": false,
    "filename": null,
    "url": null,
    "generated_at": null
  },
  "e_invoice": {
    "status": null,
    "requested": false,
    "error": null
  },
  "updated_at": "2026-11-10T08:35:25Z",
  "payment_url": "https://shop.example/pay/abc",
  "already_existed": false
}
```

## 401

Missing or unknown `X-Auth-Token`, or the shop uninstalled the app.

```json
{
  "errors": [
    "Invalid API key"
  ],
  "code": "unauthorized"
}
```

## 403

`v3_required`: the shop still runs the previous dashboard. `paid_plan_required`: API access needs a paid plan.

```json
{
  "errors": [
    "API access requires a paid plan"
  ],
  "code": "paid_plan_required"
}
```

## 404

The resource does not exist for this shop, or no action is registered at this path.

```json
{
  "errors": [
    "Resource not found"
  ],
  "code": "not_found"
}
```

## 409

The request conflicts with the current state (an issued invoice is locked, the next invoice number moved, a template is still in use, a job already finished). Nothing was changed.

```json
{
  "errors": [
    "This shop keeps issued invoices unchanged, so this invoice cannot be edited."
  ],
  "code": "invoice_locked"
}
```

## 422

The request failed validation. Nothing was saved.

```json
{
  "errors": [
    "id is missing"
  ]
}
```

## 429

Rate limited: cost-weighted per key (reads cost less than writes). Wait `Retry-After` seconds; see `X-RateLimit-*` headers.

```json
{
  "errors": [
    "Rate limit exceeded"
  ],
  "code": "rate_limited"
}
```

