Skip to main content
POST
Resolve accounting rule

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
ledger_id
string
required

Identifier of the ledger this rule belongs to.

Example:

"led_abc123def456"

category
enum<string>
required

Rule category (e.g. accounting_software, invoice_posted).

Available options:
invoice_posted,
invoice_settled,
revenue_recognition,
credit_note_created,
accounting_software
Example:

"accounting_software"

product_id
string

Product ID to resolve against.

Example:

"prod_abc123def456"

product_type
string

Product type to resolve against.

Example:

"flat_fee"

currency
string

Currency code to resolve against.

Example:

"EUR"

country
string

Country code to resolve against.

Example:

"FR"

customer_id
string

Customer ID to resolve against.

Example:

"cus_abc123def456"

interval_period
string

Billing interval period filter (month, year, etc.).

Example:

"month"

interval_count
number

Billing interval count filter.

Example:

1

Response

200 - application/json
revenue_ledger_account_id
string | null
required

Revenue ledger account ID used for invoice line revenue routing.

Example:

"lac_abc123def456"

deferred_revenue_ledger_account_id
string | null
required

Deferred revenue ledger account ID used before revenue is recognized.

Example:

"lac_abc123def456"

contra_revenue_ledger_account_id
string | null
required

Contra revenue ledger account ID used for amounts that reduce revenue.

Example:

"lac_abc123def456"

discount_ledger_account_id
string | null
required

Discount ledger account ID used for recognized discounts.

Example:

"lac_abc123def456"

ar_ledger_account_id
string | null
required

Accounts receivable ledger account ID used for invoice posting.

Example:

"lac_abc123def456"

cash_ledger_account_id
string | null
required

Cash ledger account ID used for payment settlement.

Example:

"lac_abc123def456"

bad_debt_expense_ledger_account_id
string | null
required

Bad debt expense ledger account ID used for provider-side write-off routing.

Example:

"lac_abc123def456"

trace
object[]
required

Trace of which rules contributed which resolved fields.