Passer au contenu principal
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>",
  "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>"
      ]
    }
  ]
}

Autorisations

Authorization
string
header
requis

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

Corps

application/json
ledger_id
string
requis
category
enum<string>
requis
Options disponibles:
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

Réponse

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

Trace of which rules contributed which fields.