> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.app-hive.dev/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How do I use Quotify's API?

The Quotify REST API lets you pull quote requests and proposals out of Quotify and into your own systems — your CRM, your data warehouse, a custom dashboard, an automation tool, or anywhere else you need them.

This guide walks you through getting access, authenticating your requests, and using each available endpoint.

> 💡 The API is available on plans that include API access. If you don't see the **API token** option in your Integrations settings, you'll need to upgrade your plan first.

---

## Getting Started

### 1. Generate your API token

1. Open Quotify and go to **Settings → Integrations**
2. Find the **REST API** section
3. Click **Generate token** and copy the value somewhere safe — for security, you'll only see the full token once

### 2. Authenticate your requests

Every request must include your token in the `Authorization` header as a Bearer token:

```
Authorization: Bearer <Your API token>
```

### 3. Base URL

All endpoints live under:

```
https://quotify.dev/api
```

---

## Endpoints

| Method | Endpoint | Description |
| ---- |
| `GET` | `/api/quotes` | List quote requests |
| `GET` | `/api/quotes/{id}` | Retrieve a single quote |
| `GET` | `/api/proposals` | List proposals |
| `GET` | `/api/proposals/{id}` | Retrieve a single proposal |

All list endpoints are paginated. Quotes return 20 per page; proposals return 10 per page. Use the standard `?page=2` query parameter to page through results.

---

## Quote Requests

### List quote requests

```bash
curl "https://quotify.dev/api/quotes" \
  -H "Authorization: Bearer <Your API token>"
```

**Available filters:**

| Parameter | Type | Description |
| ---- |
| `created_after` | date | Only return quotes created after this date |
| `created_before` | date | Only return quotes created before this date |
| `page` | int | Page number for pagination |

Example:

```bash
curl "https://quotify.dev/api/quotes?created_after=2026-01-01&created_before=2026-04-01" \
  -H "Authorization: Bearer <Your API token>"
```

### Retrieve a single quote

```bash
curl "https://quotify.dev/api/quotes/abc123" \
  -H "Authorization: Bearer <Your API token>"
```

### Example response

```json
{
  "data": {
    "id": "abc123",
    "shopify_draft_order_id": null,
    "shopify_customer_id": "9876543210",
    "market": "US",
    "language": "en",
    "created_at": "2026-04-15T09:24:11+00:00",
    "utm_parameters": {
      "source": "google",
      "medium": "cpc"
    },
    "fieldsets": [
      {
        "id": "fs7Yk",
        "title": "Customer Details",
        "fields": [
          { "id": "fX2qP", "name": "First Name", "type": "text", "value": "Jane" },
          { "id": "fA9bL", "name": "Email", "type": "email", "value": "jane@example.com" }
        ]
      }
    ],
    "products": [
      {
        "id": "pK4vR",
        "shopify_product_id": "123456789",
        "title": "Custom Office Desk",
        "variants": [
          {
            "id": "vN8mT",
            "shopify_product_variant_id": "987654321",
            "variant_title": "Oak / Large",
            "variant_sku": "DESK-OAK-L",
            "variant_quantity": 2,
            "price": 49900,
            "properties": null
          }
        ]
      }
    ],
    "notes": null,
    "links": {
      "self": "https://quotify.dev/api/quotes/abc123"
    }
  }
}
```

---

## Proposals

### List proposals

```bash
curl "https://quotify.dev/api/proposals" \
  -H "Authorization: Bearer <Your API token>"
```

**Available filters:**

| Parameter | Type | Description |
| ---- |
| `created_after` | date | Only return proposals created after this date |
| `created_before` | date | Only return proposals created before this date |
| `status` | string | Filter by status: `draft`, `sent`, `accepted`, `voided`, or `declined` |
| `quote_id` | string | Return only proposals belonging to a specific quote (uses the quote's ID) |
| `page` | int | Page number for pagination |

Example — pull every accepted proposal from Q1:

```bash
curl "https://quotify.dev/api/proposals?status=accepted&created_after=2026-01-01&created_before=2026-04-01" \
  -H "Authorization: Bearer <Your API token>"
```

### Retrieve a single proposal

```bash
curl "https://quotify.dev/api/proposals/xyz789" \
  -H "Authorization: Bearer <Your API token>"
```

### Example response

```json
{
  "data": {
    "id": "xyz789",
    "number": "PROP-0042",
    "status": "accepted",
    "title": "Custom Office Furniture",
    "currency": "USD",
    "locale": "en_US",
    "language": "en",
    "recipient_name": "Jane Smith",
    "recipient_email": "jane@example.com",
    "display_name": "Jane Smith",
    "shopify_customer_id": "9876543210",
    "shopify_draft_order_id": "1122334455",
    "customer_data": {
      "company": "Acme Inc.",
      "phone": "+1-555-0100"
    },
    "private_notes": "Call customer before delivery.",
    "customer_notes": "Delivery scheduled for May 1st.",
    "secret": "a1b2c3d4e5",
    "expires_at": "2026-05-01T00:00:00+00:00",
    "sent_at": "2026-04-10T14:00:00+00:00",
    "accepted_at": "2026-04-12T10:30:00+00:00",
    "declined_at": null,
    "created_at": "2026-04-09T09:00:00+00:00",
    "updated_at": "2026-04-12T10:30:00+00:00",
    "quote": { "id": "abc123" },
    "totals": {
      "discount": { "amount": 5000, "currency": "USD", "formatted": "$50.00" },
      "shipping": { "amount": 1500, "currency": "USD", "formatted": "$15.00" },
      "total":    { "amount": 99800, "currency": "USD", "formatted": "$998.00" }
    },
    "lines": [
      {
        "name": "Custom Office Desk — Oak / Large",
        "sku": "DESK-OAK-L",
        "image_url": "https://cdn.shopify.com/.../desk-oak-large.jpg",
        "shopify_product_id": "123456789",
        "shopify_product_variant_id": "987654321",
        "quantity": 2,
        "taxable": true,
        "requires_shipping": true,
        "price":    { "amount": 49900, "currency": "USD", "formatted": "$499.00" },
        "total":    { "amount": 99800, "currency": "USD", "formatted": "$998.00" },
        "discount": null,
        "properties": null
      }
    ],
    "links": {
      "self": "https://quotify.dev/api/proposals/xyz789"
    }
  }
}
```

> 💰 **About monetary values**: All prices in proposal responses are objects containing `amount` (in the smallest currency unit, e.g. cents), `currency` (ISO 4217 code), and a localized `formatted` string ready to display.

---

## Pagination

List endpoints return a paginated envelope:

```json
{
  "data": [ ... ],
  "links": {
    "first": "https://quotify.dev/api/proposals?page=1",
    "last":  "https://quotify.dev/api/proposals?page=5",
    "prev":  null,
    "next":  "https://quotify.dev/api/proposals?page=2"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 5,
    "per_page": 10,
    "to": 10,
    "total": 47
  }
}
```

Use the `next` link to walk through every page until it's `null`.

---

## Error Responses

| Status | Meaning |
| ---- |
| `403` | Your plan doesn't include API access |
| `404` | The quote or proposal ID could not be found |
| `422` | One of your filter parameters is invalid |
---

## Common Use Cases

* 📊 **Reporting & analytics** — Pull every quote/proposal into your data warehouse on a nightly schedule
* 🔄 **CRM sync** — Push accepted proposals into HubSpot, Pipedrive, or Salesforce as deals
* 🤖 **Automation** — Use Zapier, Make, or n8n to trigger workflows when new quotes come in
* 📈 **Custom dashboards** — Build internal tools that surface the metrics that matter most to your business
