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

# Update the line items of a receivable

> Replace all line items of an existing invoice or quote with a new list of line items.



## OpenAPI

````yaml /.tooling/schemas/rest/tags/product-finops.json put /finops/v1/receivables/{receivable_id}/line-items
openapi: 3.1.0
info:
  title: Tesouro Partner API
  version: '2025-06-23'
  description: The Tesouro REST API, for Tesouro partners to integrate with our solution.
  termsOfService: https://tesouro.com/terms
  contact:
    name: Tesouro team
    url: https://tesouro.com/about/
    email: developers@tesouro.com
servers:
  - url: https://api.sandbox.tesouro.com
    description: Sandbox
security: []
tags:
  - name: Accounting connections
  - name: Accounting data pull
  - name: Accounting synchronized records
  - name: Accounting tax rates
  - name: Analytics
  - name: Approval policies
  - name: Approval requests
  - name: Bank details
  - name: Comments
  - name: Cost centers
  - name: Counterpart VAT IDs
  - name: Counterpart addresses
  - name: Counterpart bank accounts
  - name: Counterpart contacts
  - name: Counterparts
  - name: Credit notes
  - name: Custom tax rates
  - name: Delivery notes
  - name: Documents
  - name: Entities
  - name: Entity users
  - name: Events
  - name: Files
  - name: Identity
  - name: Ledger accounts
  - name: Mail templates
  - name: Mailbox domains
  - name: Mailboxes
  - name: Measure units
  - name: OCR
  - name: Overdue reminders
  - name: PDF templates
  - name: Payable line items
  - name: Payables
  - name: Payment intents
  - name: Payment links
  - name: Payment methods
  - name: Payment records
  - name: Payment reminders
  - name: Payment terms
  - name: Products
  - name: Projects
  - name: Purchase orders
  - name: Receipts
  - name: Receivables
  - name: Recurrences
  - name: Tags
  - name: Text templates
  - name: Transactions
  - name: VAT rates
  - name: Webhook deliveries
  - name: Webhook subscriptions
paths:
  /finops/v1/receivables/{receivable_id}/line-items:
    put:
      tags:
        - Receivables
      summary: Update the line items of a receivable
      description: >-
        Replace all line items of an existing invoice or quote with a new list
        of line items.
      operationId: put_receivables_id_line-items
      parameters:
        - required: true
          schema:
            type: string
            format: date
          example: '2025-06-23'
          name: x-finops-version
          in: header
        - required: true
          schema:
            type: string
            format: uuid
          name: receivable_id
          in: path
        - required: false
          schema:
            type: string
          name: authorization
          in: header
        - description: The ID of the entity that owns the requested resource.
          required: true
          schema:
            type: string
            format: uuid
            examples:
              - 9d2b4c8f-2087-4738-ba91-7359683c49a4
          name: x-organization-id
          in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLineItems'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LineItemsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '409':
          description: Business logic error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    UpdateLineItems:
      properties:
        data:
          items:
            $ref: '#/components/schemas/LineItem'
          type: array
      additionalProperties: false
      type: object
      required:
        - data
    LineItemsResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/ResponseItem'
          type: array
      additionalProperties: false
      type: object
      required:
        - data
    ErrorSchemaResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorSchema'
      type: object
      required:
        - error
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    LineItem:
      properties:
        accounting_tax_rate_id:
          type: string
          format: uuid
          description: >-
            ID of the tax rate in the connected accounting system, to be used
            when pushing the invoice to that accounting system. Use `GET
            /accounting_tax_rates` to get these IDs. If omitted, Monite will
            attempt to match the tax rates based on their numeric value.
        custom_tax_rate_id:
          type: string
          format: uuid
          description: Unique identifier of the user-defined tax rate object.
        discount:
          allOf:
            - $ref: '#/components/schemas/Discount'
          description: The discount for a product.
        product:
          allOf:
            - $ref: '#/components/schemas/LineItemProductCreate'
          description: >-
            Object of product. Can be used instead of product_id, created in
            product's catalog
        product_id:
          type: string
          format: uuid
          description: Unique identifier of the product.
        quantity:
          type: number
          maximum: 2147483647
          minimum: 0
          description: >-
            The quantity of each of the goods, materials, or services listed in
            the receivable.
        tax_rate_name:
          type: string
          maxLength: 64
          minLength: 1
          description: >-
            Specifies the display name of the tax rate. This field is applicable
            only when tax_rate_value is also provided.
        tax_rate_value:
          type: integer
          maximum: 10000
          minimum: 0
          description: >-
            Percent minor units. Example: 12.5% is 1250. This field is only
            required on invoices issued by entities in the US, Pakistan, and
            other unsupported countries.
        tax_status:
          allOf:
            - $ref: '#/components/schemas/TaxStatusEnum'
          description: >-
            Tax applicability status of the line item. Possible values:


            * `taxable` (default) - Standard tax behavior. Requires the tax rate
            to be specified.

            * `exempt` - Line item is exempt from taxes. Exempt items are not
            included in total tax calculations.

            * `non_taxable` - Line item is outside the tax scope entirely,
            cannot have tax rates.
          default: taxable
      additionalProperties: false
      type: object
      required:
        - quantity
    ResponseItem:
      properties:
        discount:
          allOf:
            - $ref: '#/components/schemas/Discount'
          description: The discount for a product.
        product:
          $ref: '#/components/schemas/LineItemProduct'
        quantity:
          type: number
          maximum: 2147483647
          minimum: 0
          description: >-
            The quantity of each of the goods, materials, or services listed in
            the receivable.
        tax_status:
          allOf:
            - $ref: '#/components/schemas/TaxStatusEnum'
          description: >-
            Tax applicability status of the line item. Possible values:


            * `taxable` (default) - Standard tax behavior. Requires the tax rate
            to be specified.

            * `exempt` - Line item is exempt from taxes. Exempt items are not
            included in total tax calculations.

            * `non_taxable` - Line item is outside the tax scope entirely,
            cannot have tax rates.
          default: taxable
        total_after_tax:
          type: integer
          maximum: 9007199254740991
          description: >-
            Total of line_item after tax with applied line item discount in
            [minor
            units](https://docs.monite.com/references/currencies#minor-units).
        total_before_tax:
          type: integer
          maximum: 9007199254740991
          description: >-
            Total of line_item before tax in [minor
            units](https://docs.monite.com/references/currencies#minor-units).
      type: object
      required:
        - product
        - quantity
        - total_after_tax
        - total_before_tax
    ErrorSchema:
      properties:
        message:
          type: string
      type: object
      required:
        - message
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
      type: object
      required:
        - loc
        - msg
        - type
    Discount:
      properties:
        amount:
          type: integer
          maximum: 9007199254740991
          minimum: 0
          description: >-
            The actual discount of the product in [minor
            units](https://docs.monite.com/references/currencies#minor-units) if
            type field equals amount, else in percent minor units
        type:
          allOf:
            - $ref: '#/components/schemas/DiscountType'
          description: The field specifies whether to use product currency or %.
      additionalProperties: false
      type: object
      required:
        - amount
        - type
    LineItemProductCreate:
      properties:
        description:
          type: string
          maxLength: 2000
          description: Description of the product.
        external_reference:
          type: string
          maxLength: 255
          minLength: 1
          description: >-
            A user-defined identifier of the product. For example, an internal
            product code or SKU (stock keeping unit). Client applications can
            use this field to map the products in Monite to an external product
            catalog.
          examples:
            - HT-1234-S-BL
            - SERVICE-67890
        ledger_account_id:
          type: string
          format: uuid
        measure_unit:
          $ref: '#/components/schemas/UnitRequest'
        name:
          type: string
          maxLength: 100
          minLength: 1
          description: Name of the product.
        price:
          $ref: '#/components/schemas/Price'
        smallest_amount:
          type: number
          maximum: 2147483647
          minimum: 0
          description: The smallest amount allowed for this product.
        type:
          allOf:
            - $ref: '#/components/schemas/ProductServiceTypeEnum'
          description: >-
            Specifies whether this offering is a product or service. This may
            affect the applicable tax rates.
          default: product
      type: object
      required:
        - name
        - price
    TaxStatusEnum:
      type: string
      enum:
        - taxable
        - exempt
        - non_taxable
    LineItemProduct:
      properties:
        id:
          type: string
          format: uuid
          description: Unique ID of the product.
        accounting_tax_rate_id:
          type: string
          format: uuid
          description: Unique identifier of the accounting tax rate object.
        description:
          type: string
          description: Description of the product.
        external_reference:
          type: string
          maxLength: 255
          minLength: 1
          description: >-
            A user-defined identifier of the product. For example, an internal
            product code or SKU (stock keeping unit). Client applications can
            use this field to map the products in Monite to an external product
            catalog.
          examples:
            - HT-1234-S-BL
            - SERVICE-67890
        is_inline:
          type: boolean
          description: Indicates whether the product is inline
          default: false
        ledger_account_id:
          type: string
          format: uuid
        measure_unit:
          $ref: '#/components/schemas/LineItemProductMeasureUnit'
        name:
          type: string
          description: Name of the product.
        price:
          $ref: '#/components/schemas/Price'
        price_after_tax:
          $ref: '#/components/schemas/Price'
        smallest_amount:
          type: number
          maximum: 2147483647
          minimum: 0
          description: The smallest amount allowed for this product.
        tax_rate:
          $ref: '#/components/schemas/LineItemProductTaxRate'
        type:
          allOf:
            - $ref: '#/components/schemas/ProductServiceTypeEnum'
          description: >-
            Specifies whether this offering is a product or service. This may
            affect the applicable tax rates.
          default: product
      type: object
      required:
        - id
        - name
        - price
        - price_after_tax
        - tax_rate
    DiscountType:
      type: string
      enum:
        - amount
        - percentage
    UnitRequest:
      properties:
        description:
          type: string
          maxLength: 200
        name:
          type: string
          maxLength: 100
          minLength: 1
      type: object
      required:
        - name
    Price:
      properties:
        currency:
          allOf:
            - $ref: '#/components/schemas/CurrencyEnum'
          description: The currency in which the price of the product is set.
        value:
          type: integer
          maximum: 9007199254740991
          minimum: 0
          description: The actual price of the product.
      additionalProperties: false
      type: object
      required:
        - currency
        - value
    ProductServiceTypeEnum:
      type: string
      enum:
        - product
        - service
    LineItemProductMeasureUnit:
      properties:
        id:
          type: string
          format: uuid
        description:
          type: string
          maxLength: 200
        name:
          type: string
          maxLength: 100
          minLength: 1
      type: object
      required:
        - name
    LineItemProductTaxRate:
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the tax rate object.
        components:
          items:
            $ref: '#/components/schemas/VatRateComponent'
          type: array
          minItems: 1
          description: Sub-taxes included in the VAT.
        country:
          allOf:
            - $ref: '#/components/schemas/AllowedCountries'
          description: >-
            Two-letter ISO country code ([ISO 3166-1
            alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
          example: US
        is_custom:
          type: boolean
          description: Indicates whether this tax rate is defined by user.
          default: false
        name:
          type: string
          description: Display name of the tax rate.
        value:
          type: number
          maximum: 10000
          minimum: 0
          description: 'Percent minor units. Example: 12.5% is 1250.'
      type: object
      required:
        - country
        - value
    CurrencyEnum:
      type: string
      enum:
        - AED
        - AFN
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BRL
        - BSD
        - BTN
        - BWP
        - BYN
        - BZD
        - CAD
        - CDF
        - CHF
        - CLP
        - CNY
        - COP
        - CRC
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HTG
        - HUF
        - IDR
        - ILS
        - INR
        - IQD
        - ISK
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LYD
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MUR
        - MVR
        - MWK
        - MXN
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SEK
        - SGD
        - SHP
        - SLE
        - SOS
        - SRD
        - SSP
        - SVC
        - SZL
        - THB
        - TJS
        - TMT
        - TND
        - TOP
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - UYU
        - UZS
        - VND
        - VUV
        - WST
        - XAF
        - XCD
        - XOF
        - XPF
        - YER
        - ZAR
        - ZMW
    VatRateComponent:
      properties:
        name:
          type: string
          maxLength: 64
          description: Display name of the Tax.
        value:
          type: number
          maximum: 10000
          minimum: 0
          description: >-
            Percent multiplied by a 100. Example: 12.125% is 1212.5. Will be
            rounded to 2 decimal places
      additionalProperties: false
      type: object
      required:
        - name
        - value
    AllowedCountries:
      type: string
      enum:
        - AF
        - AX
        - AL
        - DZ
        - AS
        - AD
        - AO
        - AI
        - AQ
        - AG
        - AR
        - AM
        - AW
        - AU
        - AT
        - AZ
        - BS
        - BH
        - BD
        - BB
        - BY
        - BE
        - BZ
        - BJ
        - BM
        - BT
        - BO
        - BA
        - BW
        - BV
        - BR
        - IO
        - BN
        - BG
        - BF
        - BI
        - KH
        - CM
        - CA
        - IC
        - CV
        - KY
        - CF
        - EA
        - TD
        - CL
        - CN
        - CX
        - CC
        - CO
        - KM
        - CG
        - CD
        - CK
        - CR
        - CI
        - HR
        - CU
        - CY
        - CZ
        - DK
        - DJ
        - DM
        - DO
        - EC
        - EG
        - SV
        - GQ
        - ER
        - EE
        - SZ
        - ET
        - FK
        - FO
        - FJ
        - FI
        - FR
        - GF
        - PF
        - TF
        - GA
        - GM
        - GE
        - DE
        - GH
        - GI
        - GR
        - GL
        - GD
        - GP
        - GU
        - GT
        - GG
        - GN
        - GW
        - GY
        - HT
        - HM
        - VA
        - HN
        - HK
        - HU
        - IS
        - IN
        - ID
        - IR
        - IQ
        - IE
        - IM
        - IL
        - IT
        - JM
        - JP
        - JE
        - JO
        - KZ
        - KE
        - KI
        - KP
        - KR
        - KW
        - KG
        - LA
        - LV
        - LB
        - LS
        - LR
        - LY
        - LI
        - LT
        - LU
        - MO
        - MG
        - MW
        - MY
        - MV
        - ML
        - MT
        - MH
        - MQ
        - MR
        - MU
        - YT
        - MX
        - FM
        - MD
        - MC
        - MN
        - ME
        - MS
        - MA
        - MZ
        - MM
        - NA
        - NR
        - NP
        - NL
        - AN
        - NC
        - NZ
        - NI
        - NE
        - NG
        - NU
        - NF
        - MP
        - MK
        - 'NO'
        - OM
        - PK
        - PW
        - PS
        - PA
        - PG
        - PY
        - PE
        - PH
        - PN
        - PL
        - PT
        - PR
        - QA
        - RE
        - RO
        - RU
        - RW
        - SH
        - KN
        - LC
        - PM
        - VC
        - WS
        - SM
        - ST
        - SA
        - SN
        - RS
        - SC
        - SL
        - SG
        - SK
        - SI
        - SB
        - SO
        - ZA
        - SS
        - GS
        - ES
        - LK
        - SD
        - SR
        - SJ
        - SE
        - CH
        - SY
        - TW
        - TJ
        - TZ
        - TH
        - TL
        - TG
        - TK
        - TO
        - TT
        - TN
        - TR
        - TM
        - TC
        - TV
        - UG
        - UA
        - AE
        - GB
        - US
        - UM
        - UY
        - UZ
        - VU
        - VE
        - VN
        - VG
        - VI
        - WF
        - EH
        - YE
        - ZM
        - ZW
        - BL
        - BQ
        - CW
        - MF
        - SX
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````