Quote / Estimate
POST/v1/quote
Generate professional quotes and estimates as PDF with a single API call.
Headers
| Header | Value | Required |
|---|---|---|
Authorization | Bearer YOUR_API_KEY | Yes |
Content-Type | application/json | Yes |
Request Body
json
{"quote_number": "QUO-001","date": "2026-03-01","currency": "USD","from": {"name": "Acme Digital Agency","email": "hello@acme.agency","address": "123 Creative Blvd\nSan Francisco, CA 94102"},"to": {"name": "TechStart Inc.","email": "procurement@techstart.io","address": "456 Innovation Drive\nAustin, TX 73301"},"items": [{"description": "Website Redesign — UX Research & Wireframes","quantity": 1,"unit_price": 3500},{"description": "Frontend Development — React + Next.js","quantity": 1,"unit_price": 8000,"tax": { "rate": 10 }},{"description": "QA Testing & Bug Fixes","quantity": 40,"unit_price": 75}],"tax": { "rate": 8.25 },"expiry_date": "2026-03-31","notes": "Valid for 30 days. Payment terms: 50% upfront, 50% on completion."}
Fields
| Field | Type | Required | Description |
|---|---|---|---|
quote_number | string | Yes | Unique quote identifier (e.g. "QUO-001") |
date | string | Yes | Issue date (e.g. "2026-03-01") |
currency | string | Yes | Currency code (e.g. "USD", "EUR", "AZN") |
from | object | Yes | Your company details |
from.name | string | Yes | Company name |
from.email | string | No | Company email |
from.address | string | No | Company address |
items | array | Yes | Line items (min 1) |
items[].description | string | Yes | Item description |
items[].quantity | number | Yes | Quantity (must be > 0) |
items[].unit_price | number | Yes | Unit price (must be >= 0) |
items[].tax | object | No | Item-level tax. Overrides quote-level tax for this item |
items[].tax.rate | number | No | Tax rate % for this item |
title | string | No | Document title. Default: "Quote". Can be "Estimate", "Proposal", etc. |
expiry_date | string | No | Expiry date. Default: 30 days after date |
to | object | No | Client details |
to.name | string | No | Client name |
to.email | string | No | Client email |
to.address | string | No | Client address |
tax | object | No | Quote-level tax applied to items without item-level tax |
tax.rate | number | No | Tax rate % (default: 0) |
direction | string | No | Text direction: "ltr" (default) or "rtl" for Arabic/Hebrew |
language | string | No | Language hint: "ar", "he", "fa", etc. Optional metadata |
notes | string | No | Terms, conditions, scope notes |
Full Example
bash
curl -X POST https://api.kagyz.com/v1/quote \-H "Authorization: Bearer YOUR_API_KEY" \-H "Content-Type: application/json" \-d '{"quote_number": "QUO-001","date": "2026-03-01","currency": "USD","from": {"name": "Acme Digital Agency","email": "hello@acme.agency","address": "123 Creative Blvd\nSan Francisco, CA 94102"},"to": {"name": "TechStart Inc.","email": "procurement@techstart.io","address": "456 Innovation Drive\nAustin, TX 73301"},"items": [{"description": "Website Redesign — UX Research & Wireframes","quantity": 1,"unit_price": 3500},{"description": "Frontend Development — React + Next.js","quantity": 1,"unit_price": 8000,"tax": { "rate": 10 }},{"description": "QA Testing & Bug Fixes","quantity": 40,"unit_price": 75}],"tax": { "rate": 8.25 },"expiry_date": "2026-03-31","notes": "Valid for 30 days. Payment terms: 50% upfront, 50% on completion."}' \--output quote.pdf
javascript
const response = await fetch('https://api.kagyz.com/v1/quote', {method: 'POST',headers: {'Authorization': 'Bearer YOUR_API_KEY','Content-Type': 'application/json'},body: JSON.stringify({quote_number: 'QUO-001',date: '2026-03-01',currency: 'USD',from: {name: 'Acme Digital Agency',email: 'hello@acme.agency',address: '123 Creative Blvd\nSan Francisco, CA 94102'},to: {name: 'TechStart Inc.',email: 'procurement@techstart.io'},items: [{ description: 'Website Redesign', quantity: 1, unit_price: 3500 },{ description: 'Frontend Development', quantity: 1, unit_price: 8000, tax: { rate: 10 } },{ description: 'QA Testing', quantity: 40, unit_price: 75 }],tax: { rate: 8.25 },expiry_date: '2026-03-31',notes: 'Valid for 30 days. 50% upfront, 50% on completion.'})});const blob = await response.blob();// Save or send the PDF
Using as “Estimate”
Set the title field to change the document heading:
json
{"title": "Estimate","quote_number": "EST-001","date": "2026-03-01","currency": "USD","from": { "name": "Acme Agency" },"items": [{ "description": "Project Estimate", "quantity": 1, "unit_price": 15000 }]}
The PDF will display “Estimate” instead of “Quote”. You can also use “Proposal” or any custom title.
Expiry Date
If expiry_date is not provided, it defaults to 30 days after the date field.
| date | expiry_date (if omitted) |
|---|---|
| 2026-03-01 | 2026-03-31 |
| 2026-06-15 | 2026-07-15 |
The expiry date appears on the PDF as “Valid Until: March 31, 2026”.
Minimal Example
Only required fields — no tax, no client details, no notes:
bash
curl -X POST https://api.kagyz.com/v1/quote \-H "Authorization: Bearer YOUR_API_KEY" \-H "Content-Type: application/json" \-d '{"quote_number": "QUO-002","date": "2026-03-01","currency": "USD","from": { "name": "Quick Services" },"items": [{ "description": "Consulting", "quantity": 1, "unit_price": 2000 }]}' \--output quote.pdf
Tax Rates
Tax works the same as Invoice and Receipt:
- 1. If an item has
items[].tax— that rate is used - 2. If an item has no
items[].tax— the quote-leveltaxis used - 3. If neither is set — no tax (0%)
Item-level tax overrides quote-level tax for that item.
Mixed Tax Rates Example
json
{"tax": { "rate": 10 },"items": [{ "description": "Design Work", "quantity": 1, "unit_price": 3000, "tax": { "rate": 20 } },{ "description": "Development", "quantity": 1, "unit_price": 8000 },{ "description": "Exempt Consultation", "quantity": 1, "unit_price": 500, "tax": { "rate": 0 } }]}
| Item | Tax Rate | Reason |
|---|---|---|
| Design Work | 20% | Uses item-level tax |
| Development | 10% | Falls back to quote-level tax |
| Exempt Consultation | 0% | Uses item-level tax (explicitly 0) |
Response
Success (200)
- Content-Type:
application/pdf - Body: PDF binary data
Errors
| Status | Body |
|---|---|
400 | { "error": "quote_number is required" } |
401 | { "error": "Invalid API key" } |
429 | { "error": "Monthly limit reached. Please upgrade." } |
All Five Endpoints
| Document | Endpoint | Key Fields |
|---|---|---|
| Invoice | POST /v1/invoice | invoice_number, issue_date, due_date |
| Receipt | POST /v1/receipt | receipt_number, date, payment_method, transaction_id |
| Quote | POST /v1/quote | quote_number, date, expiry_date, title |
| Credit Note | POST /v1/credit-note | credit_note_number, date, invoice_number, reason |
| Packing Slip | POST /v1/packing-slip | packing_slip_number, date, order_number, shipping_method, tracking_number |
Try our free Quote Generator — no API key needed →
See all document types: Invoice | Receipt | Quote | Credit Note | Packing Slip
Send this document via email → See Email Delivery
Supports Arabic & RTL → See docs
Every generated PDF is automatically stored and gets a shareable URL. Check the
X-Kagyz-Document-URL response header. Learn more →