Integrate Kagaz invoice generation into your applications.RESTful API with comprehensive documentation.
The Kagaz API allows you to create and manage invoices programmatically. Our RESTful API uses standard HTTP methods and returns JSON responses.
https://api.kagaz.app/v1
curl -X POST https://api.kagaz.app/v1/invoices \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"number": "INV-001",
"currency": "USD",
"client_name": "John Doe",
"client_email": "[email protected]",
"issuer_name": "Your Company",
"issuer_email": "[email protected]",
"issuedDate": "2024-01-15",
"dueDate": "2024-02-15",
"items": [
{
"title": "Web Development",
"quantity": 1,
"rate": 1000,
"unit": "project"
}
]
}'
All API requests require authentication using your API key. Include your API key in the Authorization header using Bearer authentication.
Demo API Key: Sign up to get your personal API key with higher rate limits.
Create a new invoice with client details, line items, and payment information.
Parameter | Type | Description |
---|---|---|
number Required | string | Unique invoice number (e.g., "INV-001") |
currency Required | string | 3-letter currency code (USD, EUR, GBP, INR) |
client_name Required | string | Client's full name |
client_email Required | string | Client's email address |
items Required | array | Array of invoice line items |
title Required | string | Item description |
quantity Required | number | Item quantity |
rate Required | number | Item rate/price |
{
"number": "INV-2024-001",
"currency": "USD",
"theme": "#3b82f6",
"client_name": "Acme Corporation",
"client_email": "[email protected]",
"issuer_name": "Your Company LLC",
"issuer_email": "[email protected]",
"issuedDate": "2024-01-15",
"dueDate": "2024-02-15",
"items": [
{
"title": "Website Design",
"quantity": 1,
"rate": 2500,
"unit": "project"
}
]
}
Retrieve a specific invoice by its ID.
curl -X GET https://api.kagaz.app/v1/invoices/INVOICE_ID \
-H "Authorization: Bearer YOUR_API_KEY"
Get a paginated list of your invoices with optional filtering.
Parameter | Type | Description |
---|---|---|
status Optional | string | Filter by status (draft, sent, paid, overdue) |
page Optional | number | Page number (default: 1) |
limit Optional | number | Items per page (default: 10, max: 100) |
Generate and download a PDF version of an invoice.
API rate limits vary by plan:
The API uses standard HTTP status codes and returns detailed error messages in JSON format.
{
"success": false,
"error": "Validation error",
"details": [
"client_email is required"
]
}