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

# List deleted elements



## OpenAPI

````yaml https://public.leanpay.fr/openapi/leanpay_api_documentation.swagger.yaml get /deleted-elements
openapi: 3.1.1
info:
  version: 1.0.0
  title: LeanPay Api documentation
  contact:
    email: integration@leanpay.fr
servers:
  - url: https://api.leanpay.fr/v1/public
security: []
tags:
  - name: clients
    description: Routes related to clients
  - name: invoices
    description: Routes related to invoices
  - name: credit-notes
    description: Routes related to credit notes
  - name: misc-operations
    description: Routes related to misc operations
  - name: contacts
    description: Routes related to client contacts
  - name: addresses
    description: Routes related to client addresses
  - name: payments
    description: Routes related to invoice payments
  - name: portal-payments
    description: >-
      Routes related to portal payments (online payments made by debtors from
      the customer portal)
  - name: paybacks
    description: Routes related to credit note paybacks
  - name: links
    description: Routes related to invoice/credit note links
  - name: comments
    description: Routes related to comments
  - name: deleted-elements
    description: Routes related to deleted elements
  - name: client-properties
    description: Routes related to client properties
paths:
  /deleted-elements:
    get:
      tags:
        - deleted-elements
      summary: List deleted elements
      parameters:
        - in: query
          name: s
          required: false
          description: >
            Filter deleted elements with a **JSON-encoded** condition passed as
            a string in the URL — `?s={"field":{"$operator":value}}` — and
            combine conditions with `$and` / `$or`.


            **Operators** — `$eq` equals · `$ne` not equals · `$gt` `$gte` `$lt`
            `$lte` range · `$between` `[min, max]` · `$cont` `$starts` `$ends`
            text match · `$in` `$notin` value list · `$isnull` `$notnull` null
            check. Append `L` for case-insensitive text match (`$contL`,
            `$startsL`, …). Shorthand: `{"field": value}` is the same as
            `{"field": {"$eq": value}}`. Dates accept `YYYY-MM-DD` or full ISO
            8601 (`2026-06-01T00:00:00.000Z`); filtering an unlisted field
            returns `400`.


            ### Filterable fields


            | Field | Type | Common operators |

            | --- | --- | --- |

            | `id` | uuid | `$eq` `$in` |

            | `type` | enum | `$eq` `$ne` `$in` `$notin` |

            | `deletedElementId` | uuid | `$eq` `$in` |

            | `deletedElementExternalId` | string | `$eq` `$cont` `$starts`
            `$ends` `$in` |

            | `createdAt` | date | `$gt` `$gte` `$lt` `$lte` `$between` |

            | `updatedAt` | date | `$gt` `$gte` `$lt` `$lte` `$between` |


            `type` values: `payback`, `payment`, `invoice_credit_note_link`,
            `address`, `client`, `contact`, `invoice`, `credit_note`.


            ### Examples


            ```json

            { "type": { "$in": ["invoice", "credit_note"] } }

            ```

            ```json

            { "createdAt": { "$gte": "2026-06-01T00:00:00.000Z" } }

            ```

            ```json

            { "type": { "$eq": "client" } }

            ```
          schema:
            type: string
            examples:
              - '{"type":{"$in":["invoice","credit_note"]}}'
        - in: query
          name: page
          schema:
            type: integer
          description: The page number to retrieve starting at 1
      responses:
        '200':
          description: List of deleted elements
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedElementsResponse'
      security:
        - authorization: []
components:
  schemas:
    DeletedElementsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/DeletedElementResponse'
        count:
          type: integer
        total:
          type: integer
        page:
          type: integer
        pageCount:
          type: integer
    DeletedElementResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - payback
            - payment
            - link
            - address
            - client
            - contact
            - invoice
            - credit_note
        deletedElementId:
          type: string
          format: uuid
        deletedElementExternalId:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
  securitySchemes:
    authorization:
      type: apiKey
      name: Authorization
      in: header

````