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

# Update Revenue Booking



## OpenAPI

````yaml https://app.usequanta.com/openapi/quanta-services-api/openapi.json post /api/revenue-booking/update
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://app.usequanta.com
    description: Production
security:
  - HTTPBearer: []
paths:
  /api/revenue-booking/update:
    post:
      tags:
        - revenue_booking
        - quanta-services-api
      summary: Update Revenue Booking
      operationId: update_revenue_booking
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/UpdateInvoiceItemRevenueBookingRequest'
                - $ref: >-
                    #/components/schemas/UpdateDependentRevenueItemBookingRequest
              title: Request
              discriminator:
                propertyName: type
                mapping:
                  InvoiceItem: '#/components/schemas/UpdateInvoiceItemRevenueBookingRequest'
                  DependentRevenueItem: >-
                    #/components/schemas/UpdateDependentRevenueItemBookingRequest
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateRevenueBookingResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    UpdateInvoiceItemRevenueBookingRequest:
      properties:
        type:
          type: string
          const: InvoiceItem
          title: Type
        line_item_qid:
          type: string
          title: Line Item Qid
        booking_item:
          $ref: '#/components/schemas/InvoiceItemBookingItemRequest'
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
      type: object
      required:
        - type
        - line_item_qid
        - booking_item
      title: UpdateInvoiceItemRevenueBookingRequest
    UpdateDependentRevenueItemBookingRequest:
      properties:
        type:
          type: string
          const: DependentRevenueItem
          title: Type
        line_item_qid:
          type: string
          title: Line Item Qid
        booking_item:
          $ref: '#/components/schemas/RevenueLineItemBookingItemRequest'
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
      type: object
      required:
        - type
        - line_item_qid
        - booking_item
      title: UpdateDependentRevenueItemBookingRequest
    UpdateRevenueBookingResponse:
      properties:
        event_qid:
          type: string
          title: Event Qid
      type: object
      required:
        - event_qid
      title: UpdateRevenueBookingResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    InvoiceItemBookingItemRequest:
      properties:
        gl_account_qid:
          type: string
          title: Gl Account Qid
        recognition:
          anyOf:
            - $ref: '#/components/schemas/RevenueScheduleSpec'
            - $ref: '#/components/schemas/RevenueScheduleData-Input'
            - type: 'null'
          title: Recognition
        product_qid:
          type: string
          title: Product Qid
      additionalProperties: false
      type: object
      required:
        - gl_account_qid
        - product_qid
      title: InvoiceItemBookingItemRequest
    RevenueLineItemBookingItemRequest:
      properties:
        gl_account_qid:
          type: string
          title: Gl Account Qid
        recognition:
          anyOf:
            - $ref: '#/components/schemas/RevenueScheduleSpec'
            - $ref: '#/components/schemas/RevenueScheduleData-Input'
            - type: 'null'
          title: Recognition
      additionalProperties: false
      type: object
      required:
        - gl_account_qid
      title: RevenueLineItemBookingItemRequest
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    RevenueScheduleSpec:
      properties:
        service_period:
          $ref: '#/components/schemas/ServicePeriodDates'
        amortization_granularity:
          anyOf:
            - $ref: '#/components/schemas/AmortizationGranularity'
            - type: 'null'
        apply_catch_up_revenue:
          type: boolean
          title: Apply Catch Up Revenue
          default: false
      type: object
      required:
        - service_period
      title: RevenueScheduleSpec
    RevenueScheduleData-Input:
      properties:
        service_period:
          $ref: '#/components/schemas/ServicePeriodDates'
        amortization_granularity:
          $ref: '#/components/schemas/AmortizationGranularity'
        items:
          items:
            $ref: '#/components/schemas/RevenueScheduleItemData-Input'
          type: array
          minItems: 1
          title: Items
        apply_catch_up_revenue:
          type: boolean
          title: Apply Catch Up Revenue
          default: false
      type: object
      required:
        - service_period
        - amortization_granularity
        - items
      title: RevenueScheduleData
    ServicePeriodDates:
      properties:
        service_start_date:
          type: string
          format: date
          title: Service Start Date
        end_date_inclusive:
          type: string
          format: date
          title: End Date Inclusive
      type: object
      required:
        - service_start_date
        - end_date_inclusive
      title: ServicePeriodDates
    AmortizationGranularity:
      type: string
      enum:
        - monthly_evenly
        - monthly_ends_prorated
        - millisecond
        - manual
      title: AmortizationGranularity
    RevenueScheduleItemData-Input:
      properties:
        amount:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount
        effective_date:
          type: string
          format: date
          title: Effective Date
      type: object
      required:
        - amount
        - effective_date
      title: RevenueScheduleItemData
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Quanta Services API scoped bearer token. Supported only on Services API
        routes.

````

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