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

# Delete Line Item

> Removes a single line item from a draft invoice and recalculates totals.



## OpenAPI

````yaml https://app.dimepayments.com/openapi.yaml post /api/invoice/line-item/delete
openapi: 3.0.3
info:
  title: Dime Payments API Documentation
  description: >-
    A simple, basic API for managing Merchants through Dime Payments. JSON based
    REST API
  version: 1.0.0
servers:
  - url: https://app.dimepayments.com
security:
  - default: []
tags:
  - name: Merchant management
    description: ''
  - name: Transaction management
    description: >-

      APIs for managing transactions.  Depending on API KEY permissions, one
      should be able to

      charge credit cards, ACH, Google/Apple Pay wallets along with other
      functions.
  - name: Addresses
    description: |-

      APIs for managing customer addresses
  - name: Customer management
    description: >-

      APIs for managing customers.  Depending on API KEY permissions, one should
      be able to

      list, create, update, and delete customers along with several other
      customer specific requests.
  - name: Deposit management
    description: ''
  - name: Invoice management
    description: >-

      APIs for managing invoices. Depending on API KEY permissions, one should
      be

      able to list, create, update, delete, and send invoices, manage their line

      items, and manage recurring-invoice schedules. Every request is scoped to
      a

      single Merchant via the required `data.sid`.
  - name: Payment Method management
    description: >-

      APIs for managing payment methods associated with customers.  Depending on
      API KEY permissions, one should be able to

      list, show, create, update, and delete payment methods.
  - name: Recurring Payments management
    description: >-

      APIs for managing recurring payments.  Depending on API KEY permissions,
      one should be able to

      create, edit, pause, cancel along with other functions.
  - name: Zapier
    description: >-

      APIs for use through Zapier.  Depending on API KEY permissions, one should
      be able to

      see customers and transactions data.
paths:
  /api/invoice/line-item/delete:
    post:
      tags:
        - Invoice management
      summary: Delete Line Item
      description: Removes a single line item from a draft invoice and recalculates totals.
      operationId: deleteLineItem
      parameters: []
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  description: ''
                  example:
                    sid: 12345
                  properties:
                    sid:
                      type: integer
                      description: The SID of the Merchant.
                      example: 12345
                    invoice_id:
                      type: integer
                      description: The id of the draft invoice.
                      example: 42
                    line_item_id:
                      type: integer
                      description: The id of the line item to remove.
                      example: 9
                  required:
                    - sid
                    - invoice_id
                    - line_item_id
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: null
                    token: 60954JY1h44qQvoGLAmHFeUkiuCSUpVJSYfICNZp
                    invoice_number: INV-92439
                    status: draft
                    payment_terms: net_15
                    issue_date: '2026-07-20'
                    due_date: '2026-08-04'
                    is_overdue: false
                    subtotal: 0
                    total: 0
                    amount_paid: 0
                    balance: 0
                    allow_partial_payment: true
                    thank_you_note: Ipsum nostrum omnis autem et consequatur aut dolores enim.
                    public_url: >-
                      http://app.dimepayments.com/invoice/60954JY1h44qQvoGLAmHFeUkiuCSUpVJSYfICNZp
                    customer:
                      id: 15129
                      name: Domingo Leuschke
                      email: jleffler@example.com
                    items: []
                    payments: []
                    events: []
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: null
                        nullable: true
                      token:
                        type: string
                        example: 60954JY1h44qQvoGLAmHFeUkiuCSUpVJSYfICNZp
                      invoice_number:
                        type: string
                        example: INV-92439
                      status:
                        type: string
                        example: draft
                      payment_terms:
                        type: string
                        example: net_15
                      issue_date:
                        type: string
                        example: '2026-07-20'
                      due_date:
                        type: string
                        example: '2026-08-04'
                      is_overdue:
                        type: boolean
                        example: false
                      subtotal:
                        type: integer
                        example: 0
                      total:
                        type: integer
                        example: 0
                      amount_paid:
                        type: integer
                        example: 0
                      balance:
                        type: integer
                        example: 0
                      allow_partial_payment:
                        type: boolean
                        example: true
                      thank_you_note:
                        type: string
                        example: >-
                          Ipsum nostrum omnis autem et consequatur aut dolores
                          enim.
                      public_url:
                        type: string
                        example: >-
                          http://app.dimepayments.com/invoice/60954JY1h44qQvoGLAmHFeUkiuCSUpVJSYfICNZp
                      customer:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 15129
                          name:
                            type: string
                            example: Domingo Leuschke
                          email:
                            type: string
                            example: jleffler@example.com
                      items:
                        type: array
                        example: []
                      payments:
                        type: array
                        example: []
                      events:
                        type: array
                        example: []
        '401':
          description: Token unauthorized
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    message: Permission Denied.
                properties:
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Permission Denied.
        '404':
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  - description: Invalid sid
                    type: object
                    example:
                      data:
                        message: No such Merchant
                    properties:
                      data:
                        type: object
                        properties:
                          message:
                            type: string
                            example: No such Merchant
                  - description: Invoice not found
                    type: object
                    example:
                      data:
                        message: Invoice not found
                    properties:
                      data:
                        type: object
                        properties:
                          message:
                            type: string
                            example: Invoice not found
                  - description: Line item not found
                    type: object
                    example:
                      data:
                        message: Line item not found
                    properties:
                      data:
                        type: object
                        properties:
                          message:
                            type: string
                            example: Line item not found
        '422':
          description: Invoice locked
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    message: Only draft invoices can be edited.
                properties:
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Only draft invoices can be edited.
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: >-
        You can retrieve your token by visiting your dashboard and clicking
        <b>Generate API token under your profile in top right</b>.

````