> ## 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.

# Reshape revenue recognition schedule

> Recognize an amount now and optionally spread the remainder over a new window.



## OpenAPI

````yaml post /v1/accounting/revrec/schedules/{schedule_id}/reshape
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/revrec/schedules/{schedule_id}/reshape:
    post:
      tags:
        - Accounting > Revenue recognition
      summary: Reshape revenue recognition schedule
      description: >-
        Recognize an amount now and optionally spread the remainder over a new
        window.
      operationId: reshapeRevRecSchedule
      parameters:
        - schema:
            type: string
          required: true
          name: schedule_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                recognize_now_amount:
                  type: string
                  pattern: ^\d+(\.\d+)?$
                  description: Amount to recognize immediately in ledger currency.
                window:
                  type:
                    - object
                    - 'null'
                  properties:
                    start_date:
                      type: string
                      format: date
                      description: Inclusive start of the new recognition window.
                    end_date:
                      type: string
                      format: date
                      description: Inclusive end of the new recognition window.
                  required:
                    - start_date
                    - end_date
                  description: Window over which to spread the remaining amount.
                reason_code:
                  type: string
                  enum:
                    - obligation_satisfied_early
                    - renegotiated_delivery
                    - service_period_change
                    - setup_error
                    - other
                  description: Stable reason code for the adjustment.
                reason_detail:
                  type:
                    - string
                    - 'null'
                  description: Required explanation when reason_code is `other`.
              required:
                - recognize_now_amount
                - reason_code
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountingRevRecSchedule'
      security:
        - bearer: []
components:
  schemas:
    AccountingRevRecSchedule:
      type: object
      properties:
        id:
          type: string
          description: Unique recognition-schedule identifier.
        method:
          type: string
          enum:
            - none
            - point_in_time
            - over_time
            - usage_based
            - milestone
            - manual
          description: Revenue-recognition method.
        discount_recognition_method:
          type:
            - string
            - 'null'
          enum:
            - immediate
            - deferred
            - use_net_amount
          description: Method used to recognize discounts.
        granularity:
          type:
            - string
            - 'null'
          enum:
            - day
            - month
            - quarter
            - year
          description: Recognition-slice granularity.
        curve:
          type:
            - string
            - 'null'
          enum:
            - straight_line
            - custom
          description: Recognition allocation curve.
        status:
          type: string
          enum:
            - pending
            - in_progress
            - completed
            - cancelled
          description: Recognition-schedule status.
        origin:
          type: string
          enum:
            - auto
            - manual
          description: Origin of the recognition schedule.
        is_arrears:
          type: boolean
          description: Whether the schedule recognizes in-arrears revenue.
        currency:
          type: string
          description: ISO 4217 ledger currency.
        total_amount:
          type: string
          description: Total scheduled amount in ledger currency.
        cancelled_amount:
          type: string
          description: Cancelled amount in ledger currency.
        discount_amount:
          type: string
          description: Total discount amount in ledger currency.
        recognized_amount:
          type: string
          description: Recognized amount in ledger currency.
        recognized_discount_amount:
          type: string
          description: Recognized discount amount in ledger currency.
        remaining_amount:
          type: string
          description: Remaining amount in ledger currency.
        remaining_discount_amount:
          type: string
          description: Remaining discount amount in ledger currency.
        original_currency:
          type: string
          description: ISO 4217 original currency.
        original_currency_exchange_rate:
          type: string
          description: Exchange rate into ledger currency.
        original_currency_exchange_rate_date:
          type:
            - string
            - 'null'
          format: date
          description: Date of the exchange rate.
        total_amount_in_original_currency:
          type: string
          description: Total scheduled amount in the original currency.
        cancelled_amount_in_original_currency:
          type: string
          description: Cancelled amount in the original currency.
        discount_amount_in_original_currency:
          type: string
          description: Discount amount in the original currency.
        recognized_amount_in_original_currency:
          type: string
          description: Recognized amount in the original currency.
        recognized_discount_amount_in_original_currency:
          type: string
          description: Recognized discount amount in the original currency.
        remaining_amount_in_original_currency:
          type: string
          description: Remaining amount in the original currency.
        remaining_discount_amount_in_original_currency:
          type: string
          description: Remaining discount amount in the original currency.
        service_period_starts_at:
          type:
            - string
            - 'null'
          format: date
          description: Inclusive service-period start timestamp.
        service_period_ends_at:
          type:
            - string
            - 'null'
          format: date
          description: Inclusive service-period end timestamp.
        recognition_date:
          type:
            - string
            - 'null'
          format: date
          description: Recognition timestamp for point-in-time schedules.
        total_units_snapshot:
          type:
            - string
            - 'null'
          description: Usage-unit snapshot captured by the schedule.
        credit_transaction_id:
          type:
            - string
            - 'null'
          description: Related credit transaction identifier.
        deferred_ledger_account_id:
          type:
            - string
            - 'null'
          description: Deferred-revenue ledger account identifier.
        revenue_ledger_account_id:
          type: string
          description: Revenue ledger account identifier.
        deferred_discount_ledger_account_id:
          type:
            - string
            - 'null'
          description: Deferred-discount ledger account identifier.
        contra_revenue_ledger_account_id:
          type:
            - string
            - 'null'
          description: Contra-revenue ledger account identifier.
        unbilled_ledger_account_id:
          type:
            - string
            - 'null'
          description: Unbilled-revenue ledger account identifier.
        revenue_rule_id:
          type:
            - string
            - 'null'
          description: Revenue accounting-rule identifier.
        deferred_rule_id:
          type:
            - string
            - 'null'
          description: Deferred-revenue accounting-rule identifier.
        unbilled_rule_id:
          type:
            - string
            - 'null'
          description: Unbilled-revenue accounting-rule identifier.
        contra_revenue_rule_id:
          type:
            - string
            - 'null'
          description: Contra-revenue accounting-rule identifier.
        deferred_discount_rule_id:
          type:
            - string
            - 'null'
          description: Deferred-discount accounting-rule identifier.
        invoicing_entity_id:
          type: string
          description: Owning invoicing entity identifier.
        ledger_id:
          type: string
          description: Owning ledger identifier.
        invoice_id:
          type:
            - string
            - 'null'
          description: Related invoice identifier.
        invoice_line_item_id:
          type:
            - string
            - 'null'
          description: Related invoice line-item identifier.
        journal_entry_id:
          type:
            - string
            - 'null'
          description: Related manual journal-entry identifier.
        subscription_id:
          type:
            - string
            - 'null'
          description: Related subscription identifier.
        customer_id:
          type:
            - string
            - 'null'
          description: Related customer identifier.
        billing_item_id:
          type:
            - string
            - 'null'
          description: Related billing-item identifier.
        billing_item_on_subscription_id:
          type:
            - string
            - 'null'
          description: Related subscription billing-item identifier.
        amount_excluding_tax:
          type: string
          description: Schedule amount excluding tax.
        tax_amount:
          type: string
          description: Schedule tax amount.
        amount_including_tax:
          type: string
          description: Schedule amount including tax.
        invoice_line_item_name:
          type:
            - string
            - 'null'
          description: Display name of the related invoice line item or product.
        earliest_spread_start:
          type: string
          format: date
          description: Earliest permitted date for a forward reshape window.
        timezone:
          type: string
          description: IANA timezone used for schedule boundaries.
        slices:
          type: array
          items:
            $ref: '#/components/schemas/AccountingRevRecSlice'
          description: Recognition slices in the schedule.
        created_at:
          type:
            - string
            - 'null'
          format: date
          description: Timestamp when the schedule was created.
        updated_at:
          type:
            - string
            - 'null'
          format: date
          description: Timestamp when the schedule was last updated.
      required:
        - id
        - method
        - discount_recognition_method
        - granularity
        - curve
        - status
        - origin
        - is_arrears
        - currency
        - total_amount
        - cancelled_amount
        - discount_amount
        - recognized_amount
        - recognized_discount_amount
        - remaining_amount
        - remaining_discount_amount
        - original_currency
        - original_currency_exchange_rate
        - original_currency_exchange_rate_date
        - total_amount_in_original_currency
        - cancelled_amount_in_original_currency
        - discount_amount_in_original_currency
        - recognized_amount_in_original_currency
        - recognized_discount_amount_in_original_currency
        - remaining_amount_in_original_currency
        - remaining_discount_amount_in_original_currency
        - service_period_starts_at
        - service_period_ends_at
        - recognition_date
        - total_units_snapshot
        - credit_transaction_id
        - deferred_ledger_account_id
        - revenue_ledger_account_id
        - deferred_discount_ledger_account_id
        - contra_revenue_ledger_account_id
        - unbilled_ledger_account_id
        - revenue_rule_id
        - deferred_rule_id
        - unbilled_rule_id
        - contra_revenue_rule_id
        - deferred_discount_rule_id
        - invoicing_entity_id
        - ledger_id
        - invoice_id
        - invoice_line_item_id
        - journal_entry_id
        - subscription_id
        - customer_id
        - billing_item_id
        - billing_item_on_subscription_id
        - amount_excluding_tax
        - tax_amount
        - amount_including_tax
        - invoice_line_item_name
        - earliest_spread_start
        - timezone
        - slices
        - created_at
        - updated_at
    AccountingRevRecSlice:
      type: object
      properties:
        id:
          type: string
          description: Unique recognition-slice identifier.
        schedule_id:
          type: string
          description: Parent recognition-schedule identifier.
        kind:
          type: string
          enum:
            - planned
            - actual
          description: Recognition-slice kind.
        status:
          type: string
          enum:
            - pending
            - recognized
            - cancelled
            - reversed
          description: Recognition-slice status.
        period_starts_at:
          type:
            - string
            - 'null'
          format: date
          description: Inclusive service-period start timestamp.
        period_ends_at:
          type:
            - string
            - 'null'
          format: date
          description: Inclusive service-period end timestamp.
        recognition_planned_at:
          type:
            - string
            - 'null'
          format: date
          description: Timestamp when recognition is planned.
        sequence:
          type: number
          description: Ordering sequence within the schedule.
        amount:
          type: string
          description: Amount in ledger currency.
        discount_amount:
          type: string
          description: Discount amount in ledger currency.
        original_currency:
          type: string
          description: ISO 4217 original currency.
        original_currency_exchange_rate:
          type: string
          description: Exchange rate into ledger currency.
        original_currency_exchange_rate_date:
          type:
            - string
            - 'null'
          format: date
          description: Date of the exchange rate.
        amount_in_original_currency:
          type: string
          description: Amount in the original currency.
        discount_amount_in_original_currency:
          type: string
          description: Discount amount in the original currency.
        recognized_at:
          type:
            - string
            - 'null'
          format: date
          description: Timestamp when the slice was recognized.
        journal_entry_id:
          type:
            - string
            - 'null'
          description: Recognition journal-entry identifier.
        reversing_journal_entry_id:
          type:
            - string
            - 'null'
          description: Reversing journal-entry identifier.
        usage_event_id:
          type:
            - string
            - 'null'
          description: Related usage-event identifier.
        milestone_event_id:
          type:
            - string
            - 'null'
          description: Related milestone-event identifier.
        last_observed_units:
          type:
            - string
            - 'null'
          description: Last observed usage units for this slice.
        ledger_id:
          type: string
          description: Owning ledger identifier.
        invoicing_entity_id:
          type: string
          description: Owning invoicing entity identifier.
        amount_excluding_tax:
          type: string
          description: Amount excluding tax when schedule tax data is included.
        tax_amount:
          type: string
          description: Tax amount when schedule tax data is included.
        amount_including_tax:
          type: string
          description: Amount including tax when schedule tax data is included.
      required:
        - id
        - schedule_id
        - kind
        - status
        - period_starts_at
        - period_ends_at
        - recognition_planned_at
        - sequence
        - amount
        - discount_amount
        - original_currency
        - original_currency_exchange_rate
        - original_currency_exchange_rate_date
        - amount_in_original_currency
        - discount_amount_in_original_currency
        - recognized_at
        - journal_entry_id
        - reversing_journal_entry_id
        - usage_event_id
        - milestone_event_id
        - last_observed_units
        - ledger_id
        - invoicing_entity_id
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````