curl -X POST https://kliio.app/api/v1/invoices \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"client_id": "c1d2e3f4-...",
"amount": 2000,
"due_date": "2025-05-01",
"currency": "USD",
"status": "Sent",
"description": "Brand identity package",
"line_items": [
{ "description": "Logo design", "quantity": 1, "rate": 1200 },
{ "description": "Brand guidelines", "quantity": 1, "rate": 800 }
]
}'
const res = await fetch('https://kliio.app/api/v1/invoices', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
client_id: 'c1d2e3f4-...',
amount: 2000,
due_date: '2025-05-01',
currency: 'USD',
status: 'Sent',
line_items: [
{ description: 'Logo design', quantity: 1, rate: 1200 },
{ description: 'Brand guidelines', quantity: 1, rate: 800 }
]
})
})
const { data } = await res.json()
{
"success": true,
"data": {
"id": "inv-uuid-...",
"invoice_number": "INV-0043",
"amount": 2000,
"currency": "USD",
"status": "Sent",
"due_date": "2025-05-01",
"tax_rate": 0,
"description": "Brand identity package",
"line_items": [
{ "description": "Logo design", "qty": "1", "rate": "1200", "discount": "0" },
{ "description": "Brand guidelines", "qty": "1", "rate": "800", "discount": "0" }
],
"client": {
"id": "c1d2e3f4-...",
"name": "Alice Johnson",
"email": "alice@example.com",
"company_name": "Acme Corp"
},
"created_at": "2025-03-20T09:00:00.000Z"
}
}
{
"error": "Validation failed",
"details": {
"due_date": ["due_date is required"]
}
}
{
"error": "Client not found or access denied"
}
Invoices
Create Invoice
Creates a new invoice for a client. The invoice number is auto-generated.
POST
/
api
/
v1
/
invoices
curl -X POST https://kliio.app/api/v1/invoices \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"client_id": "c1d2e3f4-...",
"amount": 2000,
"due_date": "2025-05-01",
"currency": "USD",
"status": "Sent",
"description": "Brand identity package",
"line_items": [
{ "description": "Logo design", "quantity": 1, "rate": 1200 },
{ "description": "Brand guidelines", "quantity": 1, "rate": 800 }
]
}'
const res = await fetch('https://kliio.app/api/v1/invoices', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
client_id: 'c1d2e3f4-...',
amount: 2000,
due_date: '2025-05-01',
currency: 'USD',
status: 'Sent',
line_items: [
{ description: 'Logo design', quantity: 1, rate: 1200 },
{ description: 'Brand guidelines', quantity: 1, rate: 800 }
]
})
})
const { data } = await res.json()
{
"success": true,
"data": {
"id": "inv-uuid-...",
"invoice_number": "INV-0043",
"amount": 2000,
"currency": "USD",
"status": "Sent",
"due_date": "2025-05-01",
"tax_rate": 0,
"description": "Brand identity package",
"line_items": [
{ "description": "Logo design", "qty": "1", "rate": "1200", "discount": "0" },
{ "description": "Brand guidelines", "qty": "1", "rate": "800", "discount": "0" }
],
"client": {
"id": "c1d2e3f4-...",
"name": "Alice Johnson",
"email": "alice@example.com",
"company_name": "Acme Corp"
},
"created_at": "2025-03-20T09:00:00.000Z"
}
}
{
"error": "Validation failed",
"details": {
"due_date": ["due_date is required"]
}
}
{
"error": "Client not found or access denied"
}
Headers
string
required
Bearer YOUR_API_KEYBody
string
required
UUID of the client to invoice. Must belong to your account.
number
required
Total invoice amount (must be ≥ 0). If
line_items are provided and amount is omitted, it is calculated automatically.string
required
Due date in
YYYY-MM-DD format.string
Optional UUID of an associated project.
string
A short description or memo for the invoice.
string
3-letter currency code. Defaults to
USD.number
Tax rate as a percentage (0–100). Defaults to
0.string
Initial status. Either
Draft (default) or Sent.array
Response
boolean
true on creation.object
The newly created invoice, including an embedded
client object.curl -X POST https://kliio.app/api/v1/invoices \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"client_id": "c1d2e3f4-...",
"amount": 2000,
"due_date": "2025-05-01",
"currency": "USD",
"status": "Sent",
"description": "Brand identity package",
"line_items": [
{ "description": "Logo design", "quantity": 1, "rate": 1200 },
{ "description": "Brand guidelines", "quantity": 1, "rate": 800 }
]
}'
const res = await fetch('https://kliio.app/api/v1/invoices', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
client_id: 'c1d2e3f4-...',
amount: 2000,
due_date: '2025-05-01',
currency: 'USD',
status: 'Sent',
line_items: [
{ description: 'Logo design', quantity: 1, rate: 1200 },
{ description: 'Brand guidelines', quantity: 1, rate: 800 }
]
})
})
const { data } = await res.json()
{
"success": true,
"data": {
"id": "inv-uuid-...",
"invoice_number": "INV-0043",
"amount": 2000,
"currency": "USD",
"status": "Sent",
"due_date": "2025-05-01",
"tax_rate": 0,
"description": "Brand identity package",
"line_items": [
{ "description": "Logo design", "qty": "1", "rate": "1200", "discount": "0" },
{ "description": "Brand guidelines", "qty": "1", "rate": "800", "discount": "0" }
],
"client": {
"id": "c1d2e3f4-...",
"name": "Alice Johnson",
"email": "alice@example.com",
"company_name": "Acme Corp"
},
"created_at": "2025-03-20T09:00:00.000Z"
}
}
{
"error": "Validation failed",
"details": {
"due_date": ["due_date is required"]
}
}
{
"error": "Client not found or access denied"
}

