Skip to main content
POST
/
service
/
general-ledger
/
bills
curl -X POST https://kube.acho.io/service/general-ledger/bills \
  -H "Authorization: jwt YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "bill_id": "BILL-2024-001",
    "vendor_id": "a3-vendor-xxx",
    "ap_account_id": "a3-ap-account-xxx",
    "tran_date": "2024-01-15",
    "due_date": "2024-02-15",
    "currency": "USD",
    "exchange_rate": 1.0,
    "memo": "Office supplies invoice",
    "status": "Draft",
    "posting_period_id": "a3-period-xxx",
    "lines": [
      {
        "line_number": 1,
        "account_id": "a3-expense-xxx",
        "description": "Office supplies",
        "quantity": 10,
        "rate": 50,
        "amount": 500,
        "tax_rate": 0.1,
        "tax_amount": 50
      }
    ]
  }'
{
  "bill_id": "BILL-2024-001",
  "vendor_id": "a3-vendor-xxx",
  "vendor_name": "Office Supplies Inc",
  "ap_account_id": "a3-ap-account-xxx",
  "tran_date": "2024-01-15",
  "due_date": "2024-02-15",
  "currency": "USD",
  "exchange_rate": 1.0,
  "memo": "Office supplies invoice",
  "status": "Draft",
  "posting_period_id": "a3-period-xxx",
  "subtotal": 500,
  "tax_total": 50,
  "total": 550,
  "amount_paid": 0,
  "amount_due": 550,
  "lines": [
    {
      "line_number": 1,
      "account_id": "a3-expense-xxx",
      "account_name": "Office Supplies Expense",
      "description": "Office supplies",
      "quantity": 10,
      "rate": 50,
      "amount": 500,
      "tax_rate": 0.1,
      "tax_amount": 50
    }
  ],
  "created_at": "2024-01-15T10:00:00Z",
  "created_by": "user_123"
}

Request

Create a new vendor bill. The bill is created in Draft status.

Headers

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

Body Parameters

bill_id
string
required
Unique identifier for the bill
vendor_id
string
required
Vendor/supplier ID
ap_account_id
string
required
Accounts Payable GL account ID
tran_date
string
required
Bill 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
exchange_rate
number
default:"1.0"
Exchange rate for multi-currency bills
memo
string
Bill description
status
string
default:"Draft"
Initial status (typically Draft)
lines
array
required
Array of line items:
  • line_number (number): Sequential line number
  • account_id (string): Expense account ID
  • description (string): Line description
  • quantity (number): Quantity
  • rate (number): Unit rate
  • amount (number): Line amount
  • tax_rate (number, optional): Tax rate as decimal
  • tax_amount (number, optional): Tax amount
curl -X POST https://kube.acho.io/service/general-ledger/bills \
  -H "Authorization: jwt YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "bill_id": "BILL-2024-001",
    "vendor_id": "a3-vendor-xxx",
    "ap_account_id": "a3-ap-account-xxx",
    "tran_date": "2024-01-15",
    "due_date": "2024-02-15",
    "currency": "USD",
    "exchange_rate": 1.0,
    "memo": "Office supplies invoice",
    "status": "Draft",
    "posting_period_id": "a3-period-xxx",
    "lines": [
      {
        "line_number": 1,
        "account_id": "a3-expense-xxx",
        "description": "Office supplies",
        "quantity": 10,
        "rate": 50,
        "amount": 500,
        "tax_rate": 0.1,
        "tax_amount": 50
      }
    ]
  }'
{
  "bill_id": "BILL-2024-001",
  "vendor_id": "a3-vendor-xxx",
  "vendor_name": "Office Supplies Inc",
  "ap_account_id": "a3-ap-account-xxx",
  "tran_date": "2024-01-15",
  "due_date": "2024-02-15",
  "currency": "USD",
  "exchange_rate": 1.0,
  "memo": "Office supplies invoice",
  "status": "Draft",
  "posting_period_id": "a3-period-xxx",
  "subtotal": 500,
  "tax_total": 50,
  "total": 550,
  "amount_paid": 0,
  "amount_due": 550,
  "lines": [
    {
      "line_number": 1,
      "account_id": "a3-expense-xxx",
      "account_name": "Office Supplies Expense",
      "description": "Office supplies",
      "quantity": 10,
      "rate": 50,
      "amount": 500,
      "tax_rate": 0.1,
      "tax_amount": 50
    }
  ],
  "created_at": "2024-01-15T10:00:00Z",
  "created_by": "user_123"
}