Create accounting rule
Create a new accounting rule for account code routing or journal posting.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Rule category (e.g. accounting_software, invoice_posted).
invoice_posted, invoice_settled, revenue_recognition, credit_note_created, accounting_software "accounting_software"
Override order. Higher priority wins when multiple rules match.
100
Identifier of the ledger this rule belongs to.
"led_abc123def456"
Optional user-defined name for the rule.
"Recurring subscriptions"
Product IDs to match. Empty means match all.
["prod_abc123def456"]Product types to match. Allowed values: flat_fee, dynamic, seat, credit. Empty means match all.
flat_fee, dynamic, seat, credit ["flat_fee"]Customer IDs for customer-specific overrides.
["cus_abc123def456"]Currency codes to match (e.g. EUR, USD).
["EUR"]Country codes for jurisdiction-based overrides.
["FR"]Coupon IDs to match. Empty means match all.
["cpn_abc123def456"]Client provider IDs to match. Empty means match all.
["clp_abc123def456"]Payment method types to match. Empty means match all.
["card"]Billing interval period filter (month, year, etc.).
"month"
Billing interval count filter.
1
Revenue ledger account ID used for invoice line revenue routing.
"lac_abc123def456"
Deferred revenue ledger account ID used before revenue is recognized.
"lac_abc123def456"
Deferred discount ledger account ID used before discounts are recognized.
"lac_abc123def456"
Contra revenue ledger account ID used for amounts that reduce revenue.
"lac_abc123def456"
Discount ledger account ID used for recognized discounts.
"lac_abc123def456"
Accounts receivable ledger account ID used for invoice posting.
"lac_abc123def456"
Cash ledger account ID used for payment settlement.
"lac_abc123def456"
Payments clearing ledger account ID used while payments settle.
"lac_abc123def456"
Output tax ledger account ID used for tax liability.
"lac_abc123def456"
Bad debt expense ledger account ID used for provider-side write-off routing.
"lac_abc123def456"
Customer credits ledger account ID used for credit balances.
"lac_abc123def456"
Journal ID used to route entries in the accounting provider.
"jou_abc123def456"
Entity type the rule applies to.
invoice, payment "invoice"
Response
Unique identifier of the accounting rule.
"arl_abc123def456"
Auto-generated rule code (e.g. R-001).
"R-001"
Optional user-defined name for the rule.
"Recurring subscriptions"
Identifier of the ledger this rule belongs to.
"led_abc123def456"
Rule category (e.g. accounting_software, invoice_posted).
"accounting_software"
Override order. Higher priority wins when multiple rules match.
100
Product IDs to match. Empty means match all.
["prod_abc123def456"]Product types to match. Allowed values: flat_fee, dynamic, seat, credit. Empty means match all.
["flat_fee"]Customer IDs for customer-specific overrides.
["cus_abc123def456"]Currency codes to match (e.g. EUR, USD).
["EUR"]Country codes for jurisdiction-based overrides.
["FR"]Coupon IDs to match. Empty means match all.
["cpn_abc123def456"]Client provider IDs to match. Empty means match all.
["clp_abc123def456"]Payment method types to match. Empty means match all.
["card"]Billing interval period filter (month, year, etc.).
"month"
Billing interval count filter.
1
Revenue ledger account ID used for invoice line revenue routing.
"lac_abc123def456"
Deferred revenue ledger account ID used before revenue is recognized.
"lac_abc123def456"
Deferred discount ledger account ID used before discounts are recognized.
"lac_abc123def456"
Contra revenue ledger account ID used for amounts that reduce revenue.
"lac_abc123def456"
Discount ledger account ID used for recognized discounts.
"lac_abc123def456"
Accounts receivable ledger account ID used for invoice posting.
"lac_abc123def456"
Cash ledger account ID used for payment settlement.
"lac_abc123def456"
Payments clearing ledger account ID used while payments settle.
"lac_abc123def456"
Output tax ledger account ID used for tax liability.
"lac_abc123def456"
Bad debt expense ledger account ID used for provider-side write-off routing.
"lac_abc123def456"
Customer credits ledger account ID used for credit balances.
"lac_abc123def456"
Journal ID used to route entries in the accounting provider.
"jou_abc123def456"
Entity type the rule applies to.
"invoice"
Timestamp when the rule was created.
Timestamp when the rule was last updated.
Expanded revenue ledger account reference when available.

