> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.omegatheme.com/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).

# API Public Gateway — Quotes

### 1. Overview
QuoteSnap provides an API Public Gateway that allows merchants to integrate quote data from the QuoteSnap app into external systems such as their own website, CRM, ERP, or other internal tools. Through this API, merchants can retrieve quote data, export documents, and perform related actions programmatically, without needing to manually operate the app's admin interface.
### 2. Purpose & Benefits
This API helps merchants automate workflows related to quotes instead of manually logging into the app and performing each step by hand. Specifically, merchants can sync the list and details of quotes into their own systems for tracking or reporting, automatically export PDF files and invoices for record-keeping or for sending to customers through their own process, create a draft order as soon as a quote is accepted to speed up order processing, and send quote emails automatically through their own system while still using standardized data from QuoteSnap. This integration is especially useful for merchants with complex B2B sales workflows who need to connect quoting with other management systems.
### 3. Prerequisites
The API Public Gateway feature is currently only available to merchants on the **ProPlus** plan. To get started, merchants need to obtain their shop's unique API Key from **Others > Sync Data > API Gateway** within the QuoteSnap app. This API Key is tied to the shop and only allows access to quote data belonging to that specific shop.
The base URL used for all requests is:
```
https://apps.quotesnap.net/api/v1
```
The system enforces a rate limit of **60 requests per minute per IP address**. If this limit is exceeded, subsequent requests may be temporarily rejected; merchants should design their integration to call the API at a reasonable frequency and avoid sending bursts of requests in a short period.
### 4. Authentication
Every request to the API must include the API Key in the `Authorization` header using the Bearer token format:
```
Authorization: Bearer <API_KEY>
```
Where `<API_KEY>` is the API Key obtained from **Settings > Integration > API Gateway**. Requests that send data (POST) also require the following header:
```
Content-Type: application/json
```
### 5. Supported API List
| # | Method | Endpoint | Description |
| 1 | GET | `/quotes` | List quotes |
| 2 | GET | `/quotes/{quote_id}` | Get quote details |
| 3 | GET | `/quotes/{quote_id}/pdf` | Export quote as PDF |
| 4 | GET | `/quotes/{quote_id}/invoice` | Export quote invoice |
| 5 | POST | `/quotes/{quote_id}/draft-order` | Create a draft order from a quote |
| 6 | POST | `/quotes/{quote_id}/email` | Send the quote via email |
### 6. Endpoint Details
**1. List Quotes — `GET /quotes`**
Returns the list of quotes belonging to the merchant's shop, used for syncing or displaying the list on an external system.
```
curl -i -s "https://apps.quotesnap.net/api/v1/quotes" \
  -H "Authorization: Bearer <API_KEY>"
```
**2. Get Quote Details — `GET /quotes/{quote_id}`**
Returns detailed information for a specific quote, including products, pricing, customer, and status.
```
curl -i -s "https://apps.quotesnap.net/api/v1/quotes/<QUOTE_ID>" \
  -H "Authorization: Bearer <API_KEY>"
```
**3. Export PDF — `GET /quotes/{quote_id}/pdf`**
Returns a PDF file rendering the quote for download or storage.
```
curl -i -s "https://apps.quotesnap.net/api/v1/quotes/<QUOTE_ID>/pdf" \
  -H "Authorization: Bearer <API_KEY>"
```
**4. Export Invoice — `GET /quotes/{quote_id}/invoice`**
Returns the invoice corresponding to the quote, used for record-keeping or sending to the customer.
```
curl -i -s "https://apps.quotesnap.net/api/v1/quotes/<QUOTE_ID>/invoice" \
  -H "Authorization: Bearer <API_KEY>"
```
**5. Create Draft Order — `POST /quotes/{quote_id}/draft-order`**
Converts a quote into a draft order to continue the sales process.
```
curl -i -s -X POST "https://apps.quotesnap.net/api/v1/quotes/<QUOTE_ID>/draft-order" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json"
```
**6. Send Quote Email — `POST /quotes/{quote_id}/email`**
Sends the quote via email to the associated customer.
```
curl -i -s -X POST "https://apps.quotesnap.net/api/v1/quotes/<QUOTE_ID>/email" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json"
```
### 7. Common Errors
When querying a `quote_id` that does not exist, the system returns **404 Not Found**. When a request is missing the `Authorization` header, the system returns **401 Unauthorized** due to missing authentication. When an invalid or incorrect API Key is provided, the system also returns **401 Unauthorized**. When a merchant uses their own API Key to access a quote belonging to a different shop, the system returns either **404 Not Found** or **403 Forbidden**. Additionally, if the limit of 60 requests per minute per IP is exceeded, the system may return a rate-limit error.
| Scenario | Error Code |
| Quote does not exist | 404 |
| Missing Authorization header | 401 |
| Invalid/incorrect API Key | 401 |
| Quote belongs to another shop | 404 or 403 |
| Exceeded 60 requests/minute/IP | 429 (rate limit) |
### 8. Plan Requirement
The API Public Gateway feature is only available to merchants on the **ProPlus** plan. If a merchant has not upgraded to this plan, requests to the API will not be processed; merchants need to upgrade to ProPlus in the app settings to enable this feature.

I've left out sample response body structures (JSON) for each endpoint since no actual data was provided — if you share sample responses, I can add them to make integration easier for merchants. Also, please confirm whether the rate-limit error code is actually **429** in your system, as I've assumed this based on standard HTTP convention rather than verified data.