> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyperline.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create revenue policy version

> Create the draft of the next version of a revenue policy, copying the latest published configuration when none is given; refused while a draft exists.



## OpenAPI

````yaml post /v1/accounting/revenue-policies/{id}/versions
openapi: 3.1.0
info:
  title: Hyperline API
  version: 0.0.0
servers:
  - url: https://api.hyperline.co
  - url: https://sandbox.api.hyperline.co
security: []
paths:
  /v1/accounting/revenue-policies/{id}/versions:
    post:
      tags:
        - Accounting > Revenue policies
      summary: Create revenue policy version
      description: >-
        Create the draft of the next version of a revenue policy, copying the
        latest published configuration when none is given; refused while a draft
        exists.
      operationId: createRevenuePolicyVersion
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                effective_from:
                  type: string
                  format: date-time
                  description: >-
                    The version governs the contract terms starting on or after
                    this date.
                  example: '2026-01-01T00:00:00Z'
                config:
                  allOf:
                    - $ref: '#/components/schemas/RevenuePolicyConfigInput'
                    - description: >-
                        How the policy assesses and recognizes the contracts it
                        governs. Defaults to the latest published version's
                        configuration.
              required:
                - effective_from
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/RevenuePolicyVersion'
                  - type: object
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '404':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
      security:
        - bearer: []
components:
  schemas:
    RevenuePolicyConfigInput:
      type: object
      properties:
        eligibility:
          type: object
          properties:
            collectability:
              type: string
              enum:
                - assumed
                - review
              description: >-
                `assumed` for every matching contract, or `review` to have a
                reviewer confirm collectability on each one.
          required:
            - collectability
          description: How a contract is confirmed as a contract to account for.
        obligations:
          type: object
          properties:
            mappings:
              type: array
              items:
                $ref: '#/components/schemas/RevenuePolicyObligationMappingInput'
              description: >-
                Groups of products forming one performance obligation. A product
                belongs to at most one mapping.
            unmapped_products:
              type: string
              enum:
                - own_obligation
                - excluded
                - exception
              description: >-
                What a product no mapping names becomes: its own obligation,
                excluded from the allocation, or an exception for a reviewer.
          required:
            - mappings
            - unmapped_products
          description: How the products of a contract form performance obligations.
        allocation:
          type: object
          properties:
            method:
              type: string
              enum:
                - relative_ssp
                - commercial_price
              description: >-
                `relative_ssp` allocates by relative standalone selling price,
                `commercial_price` keeps each obligation's commercial amount.
            catalog_price_fallback:
              type: boolean
              description: >-
                Whether a product with no standalone selling price in effect at
                the term start takes its base catalog price (no price book,
                customer or segment price; matched on the contract's currency,
                the customer's country, the product's billing interval and the
                commitment), valued at the term's quantities without discounts.
                The catalog price is read when the term is first assessed and
                kept for the term. Defaults to `true` when omitted; `false`
                leaves such a product without a price
                (`missing_standalone_selling_price`).
            discounts:
              type: string
              enum:
                - proportional
                - discounted_products
              description: >-
                How a discount the subscription applies to some of the
                contract's products and not others (a coupon scoped to products)
                is allocated. `proportional` spreads it with the rest of the
                transaction price by relative standalone selling price.
                `discounted_products` keeps it on the products it targets: the
                transaction price plus those discounts is allocated by relative
                standalone selling price, then each obligation takes its
                products' discounts back (a contract where they exceed an
                obligation's share raises `discount_exceeds_allocation`). A
                coupon on every product stays proportional. Only with
                `relative_ssp`; defaults to `proportional` when omitted.
          required:
            - method
          description: How the transaction price is allocated across obligations.
        recognition:
          type: object
          properties:
            consumption:
              $ref: '#/components/schemas/RevenuePolicyConsumption'
            default_accounts:
              $ref: '#/components/schemas/RevenuePolicyDefaultAccounts'
          required:
            - consumption
          description: How the obligations are recognized.
        review:
          $ref: '#/components/schemas/RevenuePolicyReviewInput'
        modifications:
          type: object
          properties:
            amendment:
              type: string
              enum:
                - prospective
                - review
              description: >-
                A contract amendment is applied `prospective`ly, or held for
                `review`.
            cancellation:
              type: string
              enum:
                - prospective
                - review
              description: >-
                A contract cancellation is applied `prospective`ly, or held for
                `review`.
          required:
            - amendment
            - cancellation
          description: How contract changes are assessed.
      required:
        - eligibility
        - obligations
        - allocation
        - recognition
        - review
        - modifications
      description: How the policy assesses and recognizes the contracts it governs.
    RevenuePolicyVersion:
      type:
        - object
        - 'null'
      properties:
        id:
          type: string
          description: Unique identifier of the revenue policy version.
          example: rpv_7Gk2Lm9xQ1z4Ha
        version:
          type: integer
          description: Version number, starting at 1.
          example: 1
        status:
          type: string
          enum:
            - draft
            - published
          description: >-
            `draft` while it can still change, `published` once it governs
            contracts. A published version never changes.
        effective_from:
          type: string
          format: date-time
          description: >-
            The version governs the contract terms starting on or after this
            date.
          example: '2026-01-01T00:00:00Z'
        config:
          $ref: '#/components/schemas/RevenuePolicyConfig'
        published_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the version was published, or null for a draft.
          example: '2024-12-20T16:04:11Z'
        published_by_user_id:
          type:
            - string
            - 'null'
          description: >-
            User who published the version, or null when it is a draft or was
            published with an API key.
        created_at:
          type: string
          format: date-time
          description: When the record was created.
          example: '2024-12-20T16:04:11Z'
      required:
        - id
        - version
        - status
        - effective_from
        - config
        - published_at
        - published_by_user_id
        - created_at
      description: >-
        Latest published version of the policy, or null when no version is
        published yet.
    RevenuePolicyObligationMappingInput:
      oneOf:
        - $ref: >-
            #/components/schemas/RevenuePolicyServicePeriodObligationMappingInput
        - $ref: '#/components/schemas/RevenuePolicyOtherObligationMappingInput'
      discriminator:
        propertyName: kind
        mapping:
          service_period: >-
            #/components/schemas/RevenuePolicyServicePeriodObligationMappingInput
          consumption: '#/components/schemas/RevenuePolicyOtherObligationMappingInput'
          point_in_time: '#/components/schemas/RevenuePolicyOtherObligationMappingInput'
          milestone: '#/components/schemas/RevenuePolicyOtherObligationMappingInput'
    RevenuePolicyConsumption:
      oneOf:
        - $ref: '#/components/schemas/RevenuePolicyBreakageAtExpiry'
        - $ref: '#/components/schemas/RevenuePolicyBreakageReview'
        - $ref: '#/components/schemas/RevenuePolicyBreakageProportional'
      discriminator:
        propertyName: breakage
        mapping:
          recognize_at_expiry: '#/components/schemas/RevenuePolicyBreakageAtExpiry'
          review: '#/components/schemas/RevenuePolicyBreakageReview'
          proportional: '#/components/schemas/RevenuePolicyBreakageProportional'
      description: Recognition of consumption obligations.
    RevenuePolicyDefaultAccounts:
      type:
        - object
        - 'null'
      properties:
        deferred_revenue_ledger_account_id:
          type: string
          minLength: 1
          description: >-
            Deferred revenue account an allocated product takes when its rules
            give none: a liability account of the policy's ledger.
        unbilled_revenue_ledger_account_id:
          type: string
          minLength: 1
          description: >-
            Unbilled revenue account an allocated product takes when its rules
            give none: an asset account of the policy's ledger, other than the
            deferred revenue one.
      required:
        - deferred_revenue_ledger_account_id
        - unbilled_revenue_ledger_account_id
      description: >-
        Default Deferred and Unbilled revenue accounts of an allocated product:
        its accounting rules give its Revenue, Deferred and Unbilled accounts,
        and this pair only fills a Deferred or Unbilled account they leave empty
        (a one-off product's, a credit product's Unbilled). Products of one
        contract may post to different Deferred and Unbilled accounts: what the
        contract bills is attributed to them by allocated share. Null: no
        fallback. Kept by a contract term for the version it is assessed under.
    RevenuePolicyReviewInput:
      oneOf:
        - $ref: '#/components/schemas/RevenuePolicyUnconditionalReviewInput'
        - $ref: '#/components/schemas/RevenuePolicyConditionalReviewInput'
      discriminator:
        propertyName: mode
        mapping:
          exceptions_and_overrides: '#/components/schemas/RevenuePolicyUnconditionalReviewInput'
          every_contract: '#/components/schemas/RevenuePolicyUnconditionalReviewInput'
          conditional: '#/components/schemas/RevenuePolicyConditionalReviewInput'
      description: >-
        Which contracts need a reviewer's approval before they drive
        recognition.
    RevenuePolicyConfig:
      type: object
      properties:
        eligibility:
          type: object
          properties:
            collectability:
              type: string
              enum:
                - assumed
                - review
              description: >-
                `assumed` for every matching contract, or `review` to have a
                reviewer confirm collectability on each one.
          required:
            - collectability
          description: How a contract is confirmed as a contract to account for.
        obligations:
          type: object
          properties:
            mappings:
              type: array
              items:
                $ref: '#/components/schemas/RevenuePolicyObligationMapping'
              description: >-
                Groups of products forming one performance obligation. A product
                belongs to at most one mapping.
            unmapped_products:
              type: string
              enum:
                - own_obligation
                - excluded
                - exception
              description: >-
                What a product no mapping names becomes: its own obligation,
                excluded from the allocation, or an exception for a reviewer.
          required:
            - mappings
            - unmapped_products
          description: How the products of a contract form performance obligations.
        allocation:
          type: object
          properties:
            method:
              type: string
              enum:
                - relative_ssp
                - commercial_price
              description: >-
                `relative_ssp` allocates by relative standalone selling price,
                `commercial_price` keeps each obligation's commercial amount.
            catalog_price_fallback:
              type: boolean
              description: >-
                Whether a product with no standalone selling price in effect at
                the term start takes its base catalog price (no price book,
                customer or segment price; matched on the contract's currency,
                the customer's country, the product's billing interval and the
                commitment), valued at the term's quantities without discounts.
                The catalog price is read when the term is first assessed and
                kept for the term. Defaults to `true` when omitted; `false`
                leaves such a product without a price
                (`missing_standalone_selling_price`).
            discounts:
              type: string
              enum:
                - proportional
                - discounted_products
              description: >-
                How a discount the subscription applies to some of the
                contract's products and not others (a coupon scoped to products)
                is allocated. `proportional` spreads it with the rest of the
                transaction price by relative standalone selling price.
                `discounted_products` keeps it on the products it targets: the
                transaction price plus those discounts is allocated by relative
                standalone selling price, then each obligation takes its
                products' discounts back (a contract where they exceed an
                obligation's share raises `discount_exceeds_allocation`). A
                coupon on every product stays proportional. Only with
                `relative_ssp`; defaults to `proportional` when omitted.
          required:
            - method
            - catalog_price_fallback
            - discounts
          description: How the transaction price is allocated across obligations.
        recognition:
          type: object
          properties:
            consumption:
              $ref: '#/components/schemas/RevenuePolicyConsumption'
            default_accounts:
              $ref: '#/components/schemas/RevenuePolicyDefaultAccounts'
          required:
            - consumption
            - default_accounts
          description: How the obligations are recognized.
        review:
          $ref: '#/components/schemas/RevenuePolicyReview'
        modifications:
          type: object
          properties:
            amendment:
              type: string
              enum:
                - prospective
                - review
              description: >-
                A contract amendment is applied `prospective`ly, or held for
                `review`.
            cancellation:
              type: string
              enum:
                - prospective
                - review
              description: >-
                A contract cancellation is applied `prospective`ly, or held for
                `review`.
          required:
            - amendment
            - cancellation
          description: How contract changes are assessed.
      required:
        - eligibility
        - obligations
        - allocation
        - recognition
        - review
        - modifications
      description: How the policy assesses and recognizes the contracts it governs.
    RevenuePolicyServicePeriodObligationMappingInput:
      type: object
      properties:
        key:
          type: string
          minLength: 1
          description: >-
            Stable identifier of the obligation across contracts and assessment
            versions, unique in the configuration.
          example: platform
        name:
          type: string
          minLength: 1
          description: Name of the obligation.
        kind:
          type: string
          enum:
            - service_period
          description: >-
            How the obligation is delivered: `service_period` over its service
            periods, `consumption` as its units are consumed, `point_in_time` at
            the start of its first service period, `milestone` on the day a
            reviewer records its delivery. For an `allocated` obligation the
            kind sets when it is recognized; its products' accounting rules only
            supply the accounts.
        treatment:
          type: string
          enum:
            - allocated
            - excluded
          description: >-
            `allocated` takes a share of the transaction price; `excluded` keeps
            its commercial amount and the recognition it has without a policy.
        granularity:
          type:
            - string
            - 'null'
          enum:
            - day
            - month
            - quarter
            - year
          description: >-
            How the `service_period` obligation spreads over its periods (`day`,
            `month`, `quarter`, `year`). Defaults to `month` when omitted or
            null; only a `service_period` mapping takes one.
        product_ids:
          type: array
          items:
            type: string
          minItems: 1
          description: Products forming the obligation.
      required:
        - key
        - name
        - kind
        - treatment
        - product_ids
      additionalProperties: false
      title: Service period
    RevenuePolicyOtherObligationMappingInput:
      type: object
      properties:
        key:
          type: string
          minLength: 1
          description: >-
            Stable identifier of the obligation across contracts and assessment
            versions, unique in the configuration.
          example: platform
        name:
          type: string
          minLength: 1
          description: Name of the obligation.
        kind:
          type: string
          enum:
            - consumption
            - point_in_time
            - milestone
          description: >-
            How the obligation is delivered: `service_period` over its service
            periods, `consumption` as its units are consumed, `point_in_time` at
            the start of its first service period, `milestone` on the day a
            reviewer records its delivery. For an `allocated` obligation the
            kind sets when it is recognized; its products' accounting rules only
            supply the accounts.
        treatment:
          type: string
          enum:
            - allocated
            - excluded
          description: >-
            `allocated` takes a share of the transaction price; `excluded` keeps
            its commercial amount and the recognition it has without a policy.
        product_ids:
          type: array
          items:
            type: string
          minItems: 1
          description: Products forming the obligation.
      required:
        - key
        - name
        - kind
        - treatment
        - product_ids
      additionalProperties: false
      title: Consumption, point in time or milestone
    RevenuePolicyBreakageAtExpiry:
      type: object
      properties:
        breakage:
          type: string
          enum:
            - recognize_at_expiry
          description: >-
            What an expired, unconsumed entitlement does to revenue:
            `recognize_at_expiry` recognizes it when the grant lapses, `review`
            waits for a reviewer's decision, `proportional` recognizes the
            expected breakage as the grant is consumed (consumed units ÷ (1 −
            expected breakage rate), capped at the grant's units) and the rest
            when it lapses. A grant that never expires only counts its consumed
            units.
      required:
        - breakage
      additionalProperties: false
      title: At expiry
    RevenuePolicyBreakageReview:
      type: object
      properties:
        breakage:
          type: string
          enum:
            - review
          description: >-
            What an expired, unconsumed entitlement does to revenue:
            `recognize_at_expiry` recognizes it when the grant lapses, `review`
            waits for a reviewer's decision, `proportional` recognizes the
            expected breakage as the grant is consumed (consumed units ÷ (1 −
            expected breakage rate), capped at the grant's units) and the rest
            when it lapses. A grant that never expires only counts its consumed
            units.
      required:
        - breakage
      additionalProperties: false
      title: Reviewed
    RevenuePolicyBreakageProportional:
      type: object
      properties:
        breakage:
          type: string
          enum:
            - proportional
          description: >-
            What an expired, unconsumed entitlement does to revenue:
            `recognize_at_expiry` recognizes it when the grant lapses, `review`
            waits for a reviewer's decision, `proportional` recognizes the
            expected breakage as the grant is consumed (consumed units ÷ (1 −
            expected breakage rate), capped at the grant's units) and the rest
            when it lapses. A grant that never expires only counts its consumed
            units.
        expected_breakage_percent:
          type: number
          exclusiveMinimum: 0
          exclusiveMaximum: 100
          description: >-
            Share of an expiring grant expected to lapse unconsumed, in percent,
            greater than 0 and less than 100. Kept by a contract term for the
            version it is assessed under.
          example: 10
      required:
        - breakage
        - expected_breakage_percent
      additionalProperties: false
      title: Proportional
    RevenuePolicyUnconditionalReviewInput:
      type: object
      properties:
        mode:
          type: string
          enum:
            - exceptions_and_overrides
            - every_contract
          description: >-
            `exceptions_and_overrides` reviews only contracts with an exception
            or an override, `every_contract` reviews every contract,
            `conditional` reviews contracts meeting one of the conditions.
      required:
        - mode
      additionalProperties: false
      title: Unconditional
    RevenuePolicyConditionalReviewInput:
      type: object
      properties:
        mode:
          type: string
          enum:
            - conditional
          description: >-
            `exceptions_and_overrides` reviews only contracts with an exception
            or an override, `every_contract` reviews every contract,
            `conditional` reviews contracts meeting one of the conditions.
        conditions:
          type: object
          properties:
            transaction_price_at_least:
              type:
                - array
                - 'null'
              items:
                type: object
                properties:
                  currency:
                    type: string
                    enum:
                      - EUR
                      - AED
                      - AFN
                      - XCD
                      - ALL
                      - AMD
                      - AOA
                      - ARS
                      - USD
                      - AUD
                      - AWG
                      - AZN
                      - BAM
                      - BBD
                      - BDT
                      - BGN
                      - BHD
                      - BIF
                      - XOF
                      - BMD
                      - BND
                      - BOB
                      - BRL
                      - BSD
                      - BTN
                      - NOK
                      - BWP
                      - BYR
                      - BZD
                      - CAD
                      - CDF
                      - XAF
                      - CHF
                      - NZD
                      - CLP
                      - CNY
                      - COP
                      - CRC
                      - CUP
                      - CVE
                      - ANG
                      - CZK
                      - DJF
                      - DKK
                      - DOP
                      - DZD
                      - EGP
                      - MAD
                      - ERN
                      - ETB
                      - FJD
                      - FKP
                      - GBP
                      - GEL
                      - GHS
                      - GIP
                      - GMD
                      - GNF
                      - GTQ
                      - GYD
                      - HKD
                      - HNL
                      - HRK
                      - HTG
                      - HUF
                      - IDR
                      - ILS
                      - INR
                      - IQD
                      - IRR
                      - ISK
                      - JMD
                      - JOD
                      - JPY
                      - KES
                      - KGS
                      - KHR
                      - KMF
                      - KPW
                      - KRW
                      - KWD
                      - KYD
                      - KZT
                      - LAK
                      - LBP
                      - LKR
                      - LRD
                      - LSL
                      - LYD
                      - MDL
                      - MGA
                      - MKD
                      - MMK
                      - MNT
                      - MOP
                      - MRO
                      - MUR
                      - MVR
                      - MWK
                      - MXN
                      - MYR
                      - MZN
                      - NAD
                      - XPF
                      - NGN
                      - NIO
                      - NPR
                      - OMR
                      - PAB
                      - PEN
                      - PGK
                      - PHP
                      - PKR
                      - PLN
                      - PYG
                      - QAR
                      - RON
                      - RSD
                      - RUB
                      - RWF
                      - SAR
                      - SBD
                      - SCR
                      - SDG
                      - SEK
                      - SGD
                      - SHP
                      - SLL
                      - SOS
                      - SRD
                      - SSP
                      - STD
                      - SYP
                      - SZL
                      - THB
                      - TJS
                      - TMT
                      - TND
                      - TOP
                      - TRY
                      - TTD
                      - TWD
                      - TZS
                      - UAH
                      - UGX
                      - UYU
                      - UZS
                      - VEF
                      - VND
                      - VUV
                      - WST
                      - YER
                      - ZAR
                      - ZMW
                      - ZWL
                    description: Currency of the threshold.
                    example: EUR
                  amount:
                    type: number
                    minimum: 0
                    description: >-
                      Transaction price from which a contract is reviewed.
                      Expressed in currency's smallest unit.
                    example: 5000000
                required:
                  - currency
                  - amount
              description: >-
                Review a contract whose transaction price reaches the amount set
                for its currency, or null for no such condition.
            allocation_shift_percent_at_least:
              type:
                - number
                - 'null'
              minimum: 0
              description: >-
                Review a contract when the allocation moves at least this share
                of the transaction price from or to one obligation, in percent,
                or null for no such condition.
              example: 10
            has_free_product:
              type:
                - boolean
                - 'null'
              description: >-
                Review a contract holding a product sold for free, or null for
                no such condition.
          description: >-
            Conditions of a `conditional` review: a contract meeting any of them
            is reviewed. Only a `conditional` review takes them.
      required:
        - mode
        - conditions
      additionalProperties: false
      title: Conditional
    RevenuePolicyObligationMapping:
      oneOf:
        - $ref: '#/components/schemas/RevenuePolicyServicePeriodObligationMapping'
        - $ref: '#/components/schemas/RevenuePolicyOtherObligationMapping'
      discriminator:
        propertyName: kind
        mapping:
          service_period: '#/components/schemas/RevenuePolicyServicePeriodObligationMapping'
          consumption: '#/components/schemas/RevenuePolicyOtherObligationMapping'
          point_in_time: '#/components/schemas/RevenuePolicyOtherObligationMapping'
          milestone: '#/components/schemas/RevenuePolicyOtherObligationMapping'
    RevenuePolicyReview:
      oneOf:
        - $ref: '#/components/schemas/RevenuePolicyUnconditionalReview'
        - $ref: '#/components/schemas/RevenuePolicyConditionalReview'
      discriminator:
        propertyName: mode
        mapping:
          exceptions_and_overrides: '#/components/schemas/RevenuePolicyUnconditionalReview'
          every_contract: '#/components/schemas/RevenuePolicyUnconditionalReview'
          conditional: '#/components/schemas/RevenuePolicyConditionalReview'
      description: >-
        Which contracts need a reviewer's approval before they drive
        recognition.
    RevenuePolicyServicePeriodObligationMapping:
      type: object
      properties:
        key:
          type: string
          minLength: 1
          description: >-
            Stable identifier of the obligation across contracts and assessment
            versions, unique in the configuration.
          example: platform
        name:
          type: string
          minLength: 1
          description: Name of the obligation.
        kind:
          type: string
          enum:
            - service_period
          description: >-
            How the obligation is delivered: `service_period` over its service
            periods, `consumption` as its units are consumed, `point_in_time` at
            the start of its first service period, `milestone` on the day a
            reviewer records its delivery. For an `allocated` obligation the
            kind sets when it is recognized; its products' accounting rules only
            supply the accounts.
        treatment:
          type: string
          enum:
            - allocated
            - excluded
          description: >-
            `allocated` takes a share of the transaction price; `excluded` keeps
            its commercial amount and the recognition it has without a policy.
        granularity:
          type: string
          enum:
            - day
            - month
            - quarter
            - year
          description: >-
            How the `service_period` obligation spreads over its periods (`day`,
            `month`, `quarter`, `year`), resolved: `month` when it was left out.
        product_ids:
          type: array
          items:
            type: string
          minItems: 1
          description: Products forming the obligation.
      required:
        - key
        - name
        - kind
        - treatment
        - granularity
        - product_ids
      additionalProperties: false
      title: Service period
    RevenuePolicyOtherObligationMapping:
      type: object
      properties:
        key:
          type: string
          minLength: 1
          description: >-
            Stable identifier of the obligation across contracts and assessment
            versions, unique in the configuration.
          example: platform
        name:
          type: string
          minLength: 1
          description: Name of the obligation.
        kind:
          type: string
          enum:
            - consumption
            - point_in_time
            - milestone
          description: >-
            How the obligation is delivered: `service_period` over its service
            periods, `consumption` as its units are consumed, `point_in_time` at
            the start of its first service period, `milestone` on the day a
            reviewer records its delivery. For an `allocated` obligation the
            kind sets when it is recognized; its products' accounting rules only
            supply the accounts.
        treatment:
          type: string
          enum:
            - allocated
            - excluded
          description: >-
            `allocated` takes a share of the transaction price; `excluded` keeps
            its commercial amount and the recognition it has without a policy.
        product_ids:
          type: array
          items:
            type: string
          minItems: 1
          description: Products forming the obligation.
      required:
        - key
        - name
        - kind
        - treatment
        - product_ids
      additionalProperties: false
      title: Consumption, point in time or milestone
    RevenuePolicyUnconditionalReview:
      type: object
      properties:
        mode:
          type: string
          enum:
            - exceptions_and_overrides
            - every_contract
          description: >-
            `exceptions_and_overrides` reviews only contracts with an exception
            or an override, `every_contract` reviews every contract,
            `conditional` reviews contracts meeting one of the conditions.
      required:
        - mode
      additionalProperties: false
      title: Unconditional
    RevenuePolicyConditionalReview:
      type: object
      properties:
        mode:
          type: string
          enum:
            - conditional
          description: >-
            `exceptions_and_overrides` reviews only contracts with an exception
            or an override, `every_contract` reviews every contract,
            `conditional` reviews contracts meeting one of the conditions.
        conditions:
          type: object
          properties:
            transaction_price_at_least:
              type:
                - array
                - 'null'
              items:
                type: object
                properties:
                  currency:
                    type: string
                    enum:
                      - EUR
                      - AED
                      - AFN
                      - XCD
                      - ALL
                      - AMD
                      - AOA
                      - ARS
                      - USD
                      - AUD
                      - AWG
                      - AZN
                      - BAM
                      - BBD
                      - BDT
                      - BGN
                      - BHD
                      - BIF
                      - XOF
                      - BMD
                      - BND
                      - BOB
                      - BRL
                      - BSD
                      - BTN
                      - NOK
                      - BWP
                      - BYR
                      - BZD
                      - CAD
                      - CDF
                      - XAF
                      - CHF
                      - NZD
                      - CLP
                      - CNY
                      - COP
                      - CRC
                      - CUP
                      - CVE
                      - ANG
                      - CZK
                      - DJF
                      - DKK
                      - DOP
                      - DZD
                      - EGP
                      - MAD
                      - ERN
                      - ETB
                      - FJD
                      - FKP
                      - GBP
                      - GEL
                      - GHS
                      - GIP
                      - GMD
                      - GNF
                      - GTQ
                      - GYD
                      - HKD
                      - HNL
                      - HRK
                      - HTG
                      - HUF
                      - IDR
                      - ILS
                      - INR
                      - IQD
                      - IRR
                      - ISK
                      - JMD
                      - JOD
                      - JPY
                      - KES
                      - KGS
                      - KHR
                      - KMF
                      - KPW
                      - KRW
                      - KWD
                      - KYD
                      - KZT
                      - LAK
                      - LBP
                      - LKR
                      - LRD
                      - LSL
                      - LYD
                      - MDL
                      - MGA
                      - MKD
                      - MMK
                      - MNT
                      - MOP
                      - MRO
                      - MUR
                      - MVR
                      - MWK
                      - MXN
                      - MYR
                      - MZN
                      - NAD
                      - XPF
                      - NGN
                      - NIO
                      - NPR
                      - OMR
                      - PAB
                      - PEN
                      - PGK
                      - PHP
                      - PKR
                      - PLN
                      - PYG
                      - QAR
                      - RON
                      - RSD
                      - RUB
                      - RWF
                      - SAR
                      - SBD
                      - SCR
                      - SDG
                      - SEK
                      - SGD
                      - SHP
                      - SLL
                      - SOS
                      - SRD
                      - SSP
                      - STD
                      - SYP
                      - SZL
                      - THB
                      - TJS
                      - TMT
                      - TND
                      - TOP
                      - TRY
                      - TTD
                      - TWD
                      - TZS
                      - UAH
                      - UGX
                      - UYU
                      - UZS
                      - VEF
                      - VND
                      - VUV
                      - WST
                      - YER
                      - ZAR
                      - ZMW
                      - ZWL
                    description: Currency of the threshold.
                    example: EUR
                  amount:
                    type: number
                    minimum: 0
                    description: >-
                      Transaction price from which a contract is reviewed.
                      Expressed in currency's smallest unit.
                    example: 5000000
                required:
                  - currency
                  - amount
              description: >-
                Review a contract whose transaction price reaches the amount set
                for its currency, or null for no such condition.
            allocation_shift_percent_at_least:
              type:
                - number
                - 'null'
              minimum: 0
              description: >-
                Review a contract when the allocation moves at least this share
                of the transaction price from or to one obligation, in percent,
                or null for no such condition.
              example: 10
            has_free_product:
              type:
                - boolean
                - 'null'
              description: >-
                Review a contract holding a product sold for free, or null for
                no such condition.
          required:
            - transaction_price_at_least
            - allocation_shift_percent_at_least
            - has_free_product
          description: >-
            Conditions of a `conditional` review: a contract meeting any of them
            is reviewed. Only a `conditional` review takes them.
      required:
        - mode
        - conditions
      additionalProperties: false
      title: Conditional
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.