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

# Update a line item

> Update a line item on an invoice



## OpenAPI

````yaml invoices.2024-07-30.product.live PUT /invoices/{invoice}/line-items/{id}
openapi: 3.0.0
info:
  title: Invoices
  description: Create and issue invoices
  version: '0.1'
servers:
  - url: https://dev.seqhq.io/api
    description: DEV
  - url: https://sandbox.sequencehq.com/api
    description: SANDBOX
  - url: https://eu.sequencehq.com/api
    description: PRODUCTION
security: []
tags: []
paths:
  /invoices/{invoice}/line-items/{id}:
    servers: []
    parameters: []
    put:
      tags:
        - Invoice Line Items
      summary: Update a line item
      description: Update a line item on an invoice
      operationId: putInvoicesByInvoiceLineItemsById
      parameters:
        - name: invoice
          in: path
          description: The Invoice ID
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Line Item ID
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: >-
            Your [API credentials](/reference/authentication). Eg. `Basic
            {credentials}`.
          required: true
          schema:
            type: string
        - name: Sequence-Version
          in: header
          description: Use this header to select an API version
          required: false
          schema:
            type: string
            enum:
              - '2024-07-30'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Stable20240101CreateOrUpdateLineItem'
              example:
                title: Ferraris
                description: Red
                quantity: '2'
                rate: '20000.10'
                taxRate: '0.2'
                servicePeriodStart: '2022-10-20T00:00:00Z'
                servicePeriodEnd: '2022-10-24T00:00:00Z'
                servicePeriod:
                  startDate: '2022-10-20'
                  endDate: '2022-10-24'
                groupId: cd11218d-fa00-4faa-8684-a43113d076a8
                priceId: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
                rateDisplay: ABSOLUTE
                externalIds:
                  - key: Xero
                    value: '123'
                revenueClassification: EARNED
                creditGrantId: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
                revenueRecognitionMethod: STRAIGHT_LINE
            examples:
              Stable20240101CreateOrUpdateLineItem:
                summary: ''
                value:
                  title: Ferraris
                  description: Red
                  quantity: '2'
                  rate: '20000.10'
                  taxRate: '0.2'
                  servicePeriodStart: '2022-10-20T00:00:00Z'
                  servicePeriodEnd: '2022-10-24T00:00:00Z'
                  servicePeriod:
                    startDate: '2022-10-20'
                    endDate: '2022-10-24'
                  groupId: cd11218d-fa00-4faa-8684-a43113d076a8
                  priceId: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
                  rateDisplay: ABSOLUTE
                  externalIds:
                    - key: Xero
                      value: '123'
                  revenueClassification: EARNED
                  creditGrantId: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
                  revenueRecognitionMethod: STRAIGHT_LINE
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Stable20240101LineItemResponse'
                example:
                  id: af60cab3-812d-4250-a051-0fb7133a00c7
                  invoiceId: cd11218d-fa00-4faa-8684-a43113d076a8
                  title: Ferraris
                  description: Red
                  quantity: '2'
                  rate: '20000.10'
                  taxRate: '0.2'
                  servicePeriodStart: '2022-10-20T00:00:00Z'
                  servicePeriodEnd: '2022-10-24T00:00:00Z'
                  servicePeriod:
                    startDate: '2022-10-20'
                    endDate: '2022-10-24'
                  index: 2
                  groupId: cd11218d-fa00-4faa-8684-a43113d076a8
                  netTotal: '51.20'
                  totalTax: '2.50'
                  grossTotal: '101.23'
                  priceId: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
                  rateDisplay: ABSOLUTE
                  externalIds:
                    - key: Xero
                      value: '123'
                  revenueClassification: EARNED
                  creditGrantId: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
                  productId: dd55bf30-3b97-4644-a9fc-b15e0f59a110
                  revenueRecognitionMethod: USAGE
              examples:
                Stable20240101LineItemResponse:
                  summary: ''
                  value:
                    id: af60cab3-812d-4250-a051-0fb7133a00c7
                    invoiceId: cd11218d-fa00-4faa-8684-a43113d076a8
                    title: Ferraris
                    description: Red
                    quantity: '2'
                    rate: '20000.10'
                    taxRate: '0.2'
                    servicePeriodStart: '2022-10-20T00:00:00Z'
                    servicePeriodEnd: '2022-10-24T00:00:00Z'
                    servicePeriod:
                      startDate: '2022-10-20'
                      endDate: '2022-10-24'
                    index: 2
                    groupId: cd11218d-fa00-4faa-8684-a43113d076a8
                    netTotal: '51.20'
                    totalTax: '2.50'
                    grossTotal: '101.23'
                    priceId: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
                    rateDisplay: ABSOLUTE
                    externalIds:
                      - key: Xero
                        value: '123'
                    revenueClassification: EARNED
                    creditGrantId: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
                    productId: dd55bf30-3b97-4644-a9fc-b15e0f59a110
                    revenueRecognitionMethod: USAGE
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not Found
          content: {}
        '500':
          description: Internal Server Error
          content: {}
components:
  schemas:
    Stable20240101CreateOrUpdateLineItem:
      required:
        - externalIds
        - quantity
        - rate
        - taxRate
        - title
      type: object
      example:
        title: Ferraris
        description: Red
        quantity: '2'
        rate: '20000.10'
        taxRate: '0.2'
        servicePeriodStart: '2022-10-20T00:00:00Z'
        servicePeriodEnd: '2022-10-24T00:00:00Z'
        servicePeriod:
          startDate: '2022-10-20'
          endDate: '2022-10-24'
        groupId: cd11218d-fa00-4faa-8684-a43113d076a8
        priceId: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
        rateDisplay: ABSOLUTE
        externalIds:
          - key: Xero
            value: '123'
        revenueClassification: EARNED
        creditGrantId: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
        revenueRecognitionMethod: STRAIGHT_LINE
      properties:
        title:
          type: string
          description: Item Title
          example: Ferraris
        description:
          type: string
          description: Item Description
          example: Red
        quantity:
          type: string
          description: Quantity
          example: '2'
        rate:
          type: string
          description: Price per Item
          example: '20000.10'
        taxRate:
          type: string
          description: Tax Rate
          example: '0.2'
        servicePeriodStart:
          type: string
          description: >-
            Start of the service period (the time period in which the service
            was provided)
          example: '2022-10-20T00:00:00Z'
        servicePeriodEnd:
          type: string
          description: >-
            End of the service period (the time period in which the service was
            provided)
          example: '2022-10-24T00:00:00Z'
        servicePeriod:
          $ref: '#/components/schemas/DateRange'
        groupId:
          type: string
          description: Line Item Group ID
          example: cd11218d-fa00-4faa-8684-a43113d076a8
        priceId:
          type: string
          description: Price ID
          example: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
        rateDisplay:
          $ref: '#/components/schemas/RateDisplay'
          description: >-
            Determines whether rate is displayed as an absolute value or
            percentage
        externalIds:
          type: array
          description: IDs in external integrations
          example:
            - key: Xero
              value: '123'
          items:
            $ref: '#/components/schemas/IntegrationExternalIdentifier'
        revenueClassification:
          $ref: '#/components/schemas/RevenueClassification'
          description: Revenue classification
        creditGrantId:
          type: string
          description: Credit Grant ID
          example: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
        revenueRecognitionMethod:
          $ref: '#/components/schemas/RevenueRecognitionMethod'
          description: Revenue recognition method
    Stable20240101LineItemResponse:
      required:
        - externalIds
        - grossTotal
        - id
        - index
        - invoiceId
        - netTotal
        - quantity
        - rate
        - rateDisplay
        - taxRate
        - title
        - totalTax
      type: object
      example:
        id: af60cab3-812d-4250-a051-0fb7133a00c7
        invoiceId: cd11218d-fa00-4faa-8684-a43113d076a8
        title: Ferraris
        description: Red
        quantity: '2'
        rate: '20000.10'
        taxRate: '0.2'
        servicePeriodStart: '2022-10-20T00:00:00Z'
        servicePeriodEnd: '2022-10-24T00:00:00Z'
        servicePeriod:
          startDate: '2022-10-20'
          endDate: '2022-10-24'
        index: 2
        groupId: cd11218d-fa00-4faa-8684-a43113d076a8
        netTotal: '51.20'
        totalTax: '2.50'
        grossTotal: '101.23'
        priceId: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
        rateDisplay: ABSOLUTE
        externalIds:
          - key: Xero
            value: '123'
        revenueClassification: EARNED
        creditGrantId: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
        productId: dd55bf30-3b97-4644-a9fc-b15e0f59a110
        revenueRecognitionMethod: USAGE
      properties:
        id:
          type: string
          description: Line Item ID
          example: af60cab3-812d-4250-a051-0fb7133a00c7
        invoiceId:
          type: string
          description: Invoice ID
          example: cd11218d-fa00-4faa-8684-a43113d076a8
        title:
          type: string
          description: Item Title
          example: Ferraris
        description:
          type: string
          description: Item Description
          example: Red
        quantity:
          type: string
          description: Quantity
          example: '2'
        rate:
          type: string
          description: Price per Item
          example: '20000.10'
        taxRate:
          type: string
          description: Tax Rate
          example: '0.2'
        servicePeriodStart:
          type: string
          description: >-
            Start of the service period (the time period in which the service
            was provided)
          example: '2022-10-20T00:00:00Z'
        servicePeriodEnd:
          type: string
          description: >-
            End of the service period (the time period in which the service was
            provided)
          example: '2022-10-24T00:00:00Z'
        servicePeriod:
          $ref: '#/components/schemas/DateRange'
        index:
          type: integer
          description: Index (for maintaining order)
          example: 2
        groupId:
          type: string
          description: Line Item Group ID
          example: cd11218d-fa00-4faa-8684-a43113d076a8
        netTotal:
          type: string
          description: Net total, in decimal format of the Invoice's currency
          example: '51.20'
        totalTax:
          type: string
          description: Total tax, in decimal format of the Invoice's currency
          example: '2.50'
        grossTotal:
          type: string
          description: Gross total, in decimal format of the Invoice's currency
          example: '101.23'
        priceId:
          type: string
          description: Price ID
          example: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
        rateDisplay:
          $ref: '#/components/schemas/RateDisplay'
          description: >-
            Determines whether rate is displayed as an absolute value or
            percentage
        externalIds:
          type: array
          description: IDs in external integrations
          example:
            - key: Xero
              value: '123'
          items:
            $ref: '#/components/schemas/IntegrationExternalIdentifier'
        revenueClassification:
          $ref: '#/components/schemas/RevenueClassification'
          description: Revenue classification
        creditGrantId:
          type: string
          description: Credit Grant ID
          example: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
        productId:
          type: string
          description: Product ID
          example: dd55bf30-3b97-4644-a9fc-b15e0f59a110
        revenueRecognitionMethod:
          $ref: '#/components/schemas/RevenueRecognitionMethod'
          description: Revenue recognition method
    DateRange:
      required:
        - endDate
        - startDate
      type: object
      description: Service Period
      example:
        startDate: '2022-10-20'
        endDate: '2022-10-24'
      properties:
        startDate:
          type: string
          format: date
          example: '2022-10-20'
        endDate:
          type: string
          format: date
          example: '2022-10-24'
    RateDisplay:
      type: string
      example: ABSOLUTE
      enum:
        - ABSOLUTE
        - PERCENTAGE
    IntegrationExternalIdentifier:
      required:
        - key
        - value
      type: object
      example:
        key: Xero
        value: '123'
      properties:
        key:
          $ref: '#/components/schemas/IntegrationService'
        value:
          type: string
          example: '123'
    RevenueClassification:
      type: string
      example: EARNED
      enum:
        - PREPAYMENT
        - EARNED
        - BURNDOWN
    RevenueRecognitionMethod:
      type: string
      example: STRAIGHT_LINE
      enum:
        - STRAIGHT_LINE
        - USAGE
        - MILESTONE
        - POINT_IN_TIME
    IntegrationService:
      type: string
      example: Xero
      enum:
        - Amazon_Redshift
        - GoCardless
        - Google_BigQuery
        - Google_Sheets
        - HubSpot
        - NetSuite
        - QuickBooks_Online
        - Salesforce
        - Slack
        - Snowflake
        - Stripe
        - Xero
        - Avalara
        - Anrok
        - Attio
        - Numeral
        - Rillet
        - Sphere

````