Skip to main content
POST
/
service
/
general-ledger
/
invoices
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"
}

Request

Create a new customer invoice.

Headers

Authorization
string
required
JWT authentication token. Format: jwt YOUR_TOKEN
Content-Type
string
required
Must be application/json

Body Parameters

invoice_id
string
required
Unique identifier for the invoice
customer_id
string
required
Customer ID
ar_account_id
string
required
Accounts Receivable GL account ID
tran_date
string
required
Invoice date (YYYY-MM-DD)
due_date
string
required
Payment due date (YYYY-MM-DD)
posting_period_id
string
required
Accounting period ID
currency
string
default:"USD"
ISO 4217 currency code
memo
string
Invoice description
lines
array
required
Array of line items with revenue accounts
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"
}