Skip to main content
POST
/
v1
/
accounting
/
rules
/
resolve
Resolve accounting rule
curl --request POST \
  --url https://api.hyperline.co/v1/accounting/rules/resolve \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "ledger_id": "<string>",
  "category": "invoice_posted",
  "product_id": "<string>",
  "product_type": "<string>",
  "currency": "<string>",
  "country": "<string>",
  "customer_id": "<string>",
  "interval_period": "<string>",
  "interval_count": 123
}
'
{
  "revenue_ledger_account_id": "<string>",
  "deferred_revenue_ledger_account_id": "<string>",
  "contra_revenue_ledger_account_id": "<string>",
  "discount_ledger_account_id": "<string>",
  "ar_ledger_account_id": "<string>",
  "cash_ledger_account_id": "<string>",
  "trace": [
    {
      "rule_id": "<string>",
      "applied_fields": [
        "<string>"
      ]
    }
  ]
}

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
category
enum<string>
required
Available options:
invoice_posted,
invoice_settled,
revenue_recognition,
credit_note_created,
accounting_software
product_id
string
product_type
string
currency
string
country
string
customer_id
string
interval_period
string
interval_count
number

Response

200 - application/json
revenue_ledger_account_id
string | null
required
deferred_revenue_ledger_account_id
string | null
required
contra_revenue_ledger_account_id
string | null
required
discount_ledger_account_id
string | null
required
ar_ledger_account_id
string | null
required
cash_ledger_account_id
string | null
required
trace
object[]
required

Trace of which rules contributed which fields.