curl -X POST https://kube.acho.io/service/general-ledger/invoices \
-H "Authorization: jwt YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"invoice_id": "INV-2024-001",
"customer_id": "a3-customer-xxx",
"ar_account_id": "a3-ar-account-xxx",
"tran_date": "2024-01-15",
"due_date": "2024-02-15",
"currency": "USD",
"exchange_rate": 1.0,
"memo": "Consulting services",
"status": "Draft",
"posting_period_id": "a3-period-xxx",
"lines": [
{
"line_number": 1,
"account_id": "a3-revenue-xxx",
"description": "Consulting - January 2024",
"quantity": 40,
"rate": 100,
"amount": 4000,
"tax_rate": 0.1,
"tax_amount": 400
}
]
}'
{
"invoice_id": "INV-2024-001",
"customer_id": "a3-customer-xxx",
"customer_name": "Acme Corp",
"ar_account_id": "a3-ar-account-xxx",
"tran_date": "2024-01-15",
"due_date": "2024-02-15",
"currency": "USD",
"status": "Draft",
"subtotal": 4000,
"tax_total": 400,
"total": 4400,
"amount_paid": 0,
"amount_due": 4400,
"lines": [
{
"line_number": 1,
"account_id": "a3-revenue-xxx",
"account_name": "Consulting Revenue",
"description": "Consulting - January 2024",
"quantity": 40,
"rate": 100,
"amount": 4000,
"tax_rate": 0.1,
"tax_amount": 400
}
],
"created_at": "2024-01-15T10:00:00Z"
}
Create a new customer invoice
curl -X POST https://kube.acho.io/service/general-ledger/invoices \
-H "Authorization: jwt YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"invoice_id": "INV-2024-001",
"customer_id": "a3-customer-xxx",
"ar_account_id": "a3-ar-account-xxx",
"tran_date": "2024-01-15",
"due_date": "2024-02-15",
"currency": "USD",
"exchange_rate": 1.0,
"memo": "Consulting services",
"status": "Draft",
"posting_period_id": "a3-period-xxx",
"lines": [
{
"line_number": 1,
"account_id": "a3-revenue-xxx",
"description": "Consulting - January 2024",
"quantity": 40,
"rate": 100,
"amount": 4000,
"tax_rate": 0.1,
"tax_amount": 400
}
]
}'
{
"invoice_id": "INV-2024-001",
"customer_id": "a3-customer-xxx",
"customer_name": "Acme Corp",
"ar_account_id": "a3-ar-account-xxx",
"tran_date": "2024-01-15",
"due_date": "2024-02-15",
"currency": "USD",
"status": "Draft",
"subtotal": 4000,
"tax_total": 400,
"total": 4400,
"amount_paid": 0,
"amount_due": 4400,
"lines": [
{
"line_number": 1,
"account_id": "a3-revenue-xxx",
"account_name": "Consulting Revenue",
"description": "Consulting - January 2024",
"quantity": 40,
"rate": 100,
"amount": 4000,
"tax_rate": 0.1,
"tax_amount": 400
}
],
"created_at": "2024-01-15T10:00:00Z"
}
jwt YOUR_TOKENapplication/jsoncurl -X POST https://kube.acho.io/service/general-ledger/invoices \
-H "Authorization: jwt YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"invoice_id": "INV-2024-001",
"customer_id": "a3-customer-xxx",
"ar_account_id": "a3-ar-account-xxx",
"tran_date": "2024-01-15",
"due_date": "2024-02-15",
"currency": "USD",
"exchange_rate": 1.0,
"memo": "Consulting services",
"status": "Draft",
"posting_period_id": "a3-period-xxx",
"lines": [
{
"line_number": 1,
"account_id": "a3-revenue-xxx",
"description": "Consulting - January 2024",
"quantity": 40,
"rate": 100,
"amount": 4000,
"tax_rate": 0.1,
"tax_amount": 400
}
]
}'
{
"invoice_id": "INV-2024-001",
"customer_id": "a3-customer-xxx",
"customer_name": "Acme Corp",
"ar_account_id": "a3-ar-account-xxx",
"tran_date": "2024-01-15",
"due_date": "2024-02-15",
"currency": "USD",
"status": "Draft",
"subtotal": 4000,
"tax_total": 400,
"total": 4400,
"amount_paid": 0,
"amount_due": 4400,
"lines": [
{
"line_number": 1,
"account_id": "a3-revenue-xxx",
"account_name": "Consulting Revenue",
"description": "Consulting - January 2024",
"quantity": 40,
"rate": 100,
"amount": 4000,
"tax_rate": 0.1,
"tax_amount": 400
}
],
"created_at": "2024-01-15T10:00:00Z"
}