Skip to main content
POST
Create revenue policy

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 the record belongs to.

Minimum string length: 1
Example:

"led_8Hq2nZ0kLm4x1P"

name
string
required

Name of the revenue policy.

Minimum string length: 1
Example:

"Enterprise contracts"

priority
integer
required

Rank among the ledger's live policies: when several policies match a contract, the highest priority wins. Unique among the ledger's live policies.

Example:

10

match_conditions
object
required

Which contracts the policy governs. Every non-empty list must match; an empty list matches any contract.

effective_from
string<date-time>
required

The version governs the contract terms starting on or after this date.

Example:

"2026-01-01T00:00:00Z"

config
object
required

How the policy assesses and recognizes the contracts it governs.

description
string | null

Free-text description of the revenue policy.

Response

id
string
required

Unique identifier of the revenue policy.

Example:

"rpol_3fJ8kZx1Lq9a2B"

ledger_id
string
required

Identifier of the ledger the record belongs to.

Example:

"led_8Hq2nZ0kLm4x1P"

name
string
required

Name of the revenue policy.

Example:

"Enterprise contracts"

description
string | null
required

Free-text description of the revenue policy.

priority
integer
required

Rank among the ledger's live policies: when several policies match a contract, the highest priority wins. Unique among the ledger's live policies.

Example:

10

match_conditions
object
required

Which contracts the policy governs. Every non-empty list must match; an empty list matches any contract.

published_version
object | null
required

Latest published version of the policy, or null when no version is published yet.

draft_version
object | null
required

Draft version of the policy, or null when there is none.

assessment_count
integer
required

Number of contracts assessed under the policy.

archived_at
string<date-time> | null
required

When the policy was archived. An archived policy matches no new contract; null while it is live.

Example:

"2024-12-20T16:04:11Z"

created_at
string<date-time>
required

When the record was created.

Example:

"2024-12-20T16:04:11Z"

versions
object[]
required

Every version of the policy, newest first.