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

# Update an invoice item

> Update an invoice item on a draft invoice. <h3>OAuth</h3>Required scopes: <code>invoices</code>



## OpenAPI

````yaml /assets/openapi.json patch /billing/invoices/v1/items/{id}
openapi: 3.0.2
info:
  title: Spacebring
  version: 1.0.0
  termsOfService: https://www.spacebring.com/terms
servers:
  - url: https://api.spacebring.com
security: []
paths:
  /billing/invoices/v1/items/{id}:
    patch:
      tags:
        - Billing
      summary: Update an invoice item
      description: >-
        Update an invoice item on a draft invoice. <h3>OAuth</h3>Required
        scopes: <code>invoices</code>
      operationId: updateInvoiceItem
      parameters:
        - name: id
          in: path
          description: The id of an invoice item.
          schema:
            type: string
            format: uuid
          required: true
        - in: header
          name: spacebring-network-id
          schema:
            type: string
            format: uuid
          required: false
          description: >-
            The id of the network. Required when using bearer token
            authentication
      requestBody:
        $ref: '#/components/requestBodies/patchInvoiceItem'
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseError'
      security:
        - OAuth2:
            - invoices
components:
  requestBodies:
    patchInvoiceItem:
      content:
        application/json:
          schema:
            type: object
            properties:
              invoiceItem:
                description: Invoice line item to update.
                type: object
                properties:
                  product:
                    description: Product fields to update.
                    type: object
                    properties:
                      title:
                        description: Product title.
                        type: string
                        minLength: 1
                  quantity:
                    description: Number of units.
                    type: integer
                    exclusiveMinimum: true
                    maximum: 9007199254740991
                  unitAmount:
                    description: Unit price in major units.
                    type: number
                    minimum: 0
            required:
              - invoiceItem
      required: true
  schemas:
    responseError:
      type: object
      properties:
        message:
          type: string
        type:
          type: string
  securitySchemes:
    OAuth2:
      type: oauth2
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/api-reference/authentication#oauth2)
        for how to authorize your requests
      flows:
        authorizationCode:
          authorizationUrl: https://api.spacebring.com/oauth2/authorize
          tokenUrl: https://api.spacebring.com/oauth2/token
          refreshUrl: https://api.spacebring.com/oauth2/token
          scopes:
            benefits.readonly: Read benefits and applications
            benefits: Read and write benefits and applications
            community.readonly: Read community companies and memberships
            community: Read and write community companies and memberships
            events.readonly: Read events and tickets
            events: Read and write events and tickets
            feed.readonly: Read feed posts
            feed: Read and write feed posts
            invoices.readonly: Read invoices
            invoices: Read and write invoices
            locations.readonly: Read locations
            locations: Read and write locations
            plans.readonly: Read plans
            plans: Read and write plans
            resources.readonly: Read resources and bookings
            resources: Read and write resources and bookings
            subscriptions.readonly: Read subscriptions
            subscriptions: Read and write subscriptions
            shop.readonly: Read products and orders
            shop: Read and write products and orders
            support.readonly: Read support tickets
            support: Read and write support tickets
            transactions.readonly: Read transactions
            transactions: Read and write transactions
            visitors.readonly: Read visitors
            visitors: Read and write visitors

````