Skip to main content

Quotations API

Create and search quotations programmatically.

Create quotation

POST /api/v1/quotations

Scope required: write

Request body

FieldTypeRequiredDescription
customer_idstring (UUID)YesCustomer ID (must belong to your business)
itemsarrayYesAt least one line item
quotation_numberstringNoAuto-generated as QT-00001 if not provided
issue_datestring (YYYY-MM-DD)NoDefaults to today
valid_untilstring (YYYY-MM-DD)NoExpiry date of the quotation
statusstringNodraft, sent, accepted, rejected, expired, converted. Default: draft
currencystringNoISO 4217 code. Default: USD
notesstringNoNotes visible on the quotation
termsstringNoTerms and conditions
template_typestringNoQuotation template. Default: modern

Line item fields

FieldTypeRequiredDescription
descriptionstringYesItem description
quantitynumberYesQuantity
unit_pricenumberYesPrice per unit
tax_ratenumberNoTax rate as percentage
discount_ratenumberNoDiscount rate as percentage
product_idstring (UUID)NoLink to a saved product

Example request

curl -X POST https://onlineinvoicemaker.com/api/v1/quotations \
-H "Authorization: Bearer oim_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "550e8400-e29b-41d4-a716-446655440000",
"valid_until": "2026-05-01",
"items": [
{
"description": "Full Brand Identity Package",
"quantity": 1,
"unit_price": 5000,
"tax_rate": 10
},
{
"description": "Business Card Design",
"quantity": 1,
"unit_price": 500,
"discount_rate": 20
}
]
}'

Example response

{
"id": "7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d",
"business_id": "cb21efb1-fa40-434f-a1d3-e17c0bdb9aa6",
"customer_id": "550e8400-e29b-41d4-a716-446655440000",
"quotation_number": "QT-00001",
"issue_date": "2026-04-01",
"valid_until": "2026-05-01",
"status": "draft",
"subtotal": 5400.00,
"tax_amount": 500.00,
"total": 5900.00,
"currency": "USD",
"created_at": "2026-04-01T10:30:00.000Z",
"items": [
{
"description": "Full Brand Identity Package",
"quantity": 1,
"unit_price": 5000,
"tax_rate": 10,
"tax_amount": 500.00,
"discount_rate": 0,
"amount": 5500.00
},
{
"description": "Business Card Design",
"quantity": 1,
"unit_price": 500,
"tax_rate": 0,
"tax_amount": 0,
"discount_rate": 20,
"amount": 400.00
}
]
}

Status: 201 Created

Webhook event

A quotation.created webhook event is emitted with the full quotation data after creation.


Search quotations

GET /api/v1/quotations

Scope required: read

Query parameters

ParameterTypeDescription
numberstringFilter by quotation number (partial match, case-insensitive)
statusstringFilter by status
customer_idstring (UUID)Filter by customer
pagenumberPage number. Default: 1
limitnumberResults per page. Default: 25, max: 100

Example request

curl -X GET "https://onlineinvoicemaker.com/api/v1/quotations?status=sent&limit=5" \
-H "Authorization: Bearer oim_your_api_key"

Example response

{
"data": [
{
"id": "7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d",
"quotation_number": "QT-00001",
"status": "sent",
"total": 5900.00,
"currency": "USD",
"created_at": "2026-04-01T10:30:00.000Z",
"quotation_items": [...],
"customers": {
"id": "550e8400",
"name": "Acme Corp",
"email": "billing@acme.com"
}
}
],
"pagination": {
"page": 1,
"limit": 5,
"total": 18,
"total_pages": 4
}
}

Quotation statuses

StatusDescription
draftQuotation created but not sent
sentSent to customer
acceptedCustomer accepted the quotation
rejectedCustomer rejected the quotation
expiredPast the valid_until date
convertedConverted to an invoice