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

# List all deals

> Retrieve a list of deals for the authenticated team.



## OpenAPI

````yaml get /deals
openapi: 3.1.0
info:
  version: 0.0.1
  title: Abacus API
  description: Abacus is the operating system for Merchant Cash Advance businesses.
  contact:
    name: Abacus Support
    email: support@abacuslabs.co
    url: https://abacuslabs.co
  license:
    name: AGPL-3.0 license
    url: https://github.com/Suphian/abacus/blob/main/LICENSE
servers:
  - url: https://api.abacuslabs.co
    description: Production API
security:
  - oauth2: []
  - token: []
paths:
  /deals:
    get:
      tags:
        - Deals
      summary: List all deals
      description: Retrieve a list of deals for the authenticated team.
      operationId: listDeals
      parameters:
        - schema:
            type: string
            nullable: true
            description: >-
              A cursor for pagination, representing the last item from the
              previous page.
            example: '25'
          required: false
          description: >-
            A cursor for pagination, representing the last item from the
            previous page.
          in: query
          name: cursor
        - schema:
            type: array
            nullable: true
            items:
              type: string
              minLength: 1
            minItems: 2
            maxItems: 2
            description: >-
              Sorting order as a tuple: [field, direction]. Example:
              ['createdAt', 'desc'].
            example:
              - createdAt
              - desc
          required: false
          description: >-
            Sorting order as a tuple: [field, direction]. Example: ['createdAt',
            'desc'].
          in: query
          name: sort
        - schema:
            type: number
            minimum: 1
            maximum: 100
            description: Number of deals to return per page (1-100).
            example: 25
          required: false
          description: Number of deals to return per page (1-100).
          in: query
          name: pageSize
        - schema:
            type: string
            nullable: true
            description: Search query string to filter deals by text.
            example: Acme
          required: false
          description: Search query string to filter deals by text.
          in: query
          name: q
        - schema:
            type: string
            nullable: true
            description: Start date (inclusive) for filtering deals, in ISO 8601 format.
            example: '2024-01-01'
          required: false
          description: Start date (inclusive) for filtering deals, in ISO 8601 format.
          in: query
          name: start
        - schema:
            type: string
            nullable: true
            description: End date (inclusive) for filtering deals, in ISO 8601 format.
            example: '2024-01-31'
          required: false
          description: End date (inclusive) for filtering deals, in ISO 8601 format.
          in: query
          name: end
        - schema:
            type: array
            nullable: true
            items:
              type: string
            description: >-
              List of deal statuses to filter by (e.g., 'paid', 'unpaid',
              'overdue').
            example:
              - paid
              - unpaid
          required: false
          description: >-
            List of deal statuses to filter by (e.g., 'paid', 'unpaid',
            'overdue').
          in: query
          name: statuses
        - schema:
            type: array
            nullable: true
            items:
              type: string
            description: List of merchant IDs to filter deals.
            example:
              - merchant-uuid-1
              - merchant-uuid-2
          required: false
          description: List of merchant IDs to filter deals.
          in: query
          name: merchants
        - schema:
            type: array
            nullable: true
            items:
              type: string
            description: List of deal IDs to filter by.
            example:
              - deal-uuid-1
              - deal-uuid-2
          required: false
          description: List of deal IDs to filter by.
          in: query
          name: ids
        - schema:
            type: array
            nullable: true
            items:
              type: string
            description: >-
              List of recurring series IDs to filter deals by (shows all deals
              from these series).
            example:
              - recurring-uuid-1
              - recurring-uuid-2
          required: false
          description: >-
            List of recurring series IDs to filter deals by (shows all deals
            from these series).
          in: query
          name: recurringIds
        - schema:
            type: boolean
            nullable: true
            description: >-
              Filter by recurring status. true = only recurring deals, false =
              only non-recurring deals.
            example: true
          required: false
          description: >-
            Filter by recurring status. true = only recurring deals, false =
            only non-recurring deals.
          in: query
          name: recurring
      responses:
        '200':
          description: A list of deals for the authenticated team.
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      cursor:
                        type: string
                        nullable: true
                        description: Cursor for pagination; null if there is no next page
                        example: '25'
                      hasPreviousPage:
                        type: boolean
                        description: Indicates if there is a previous page of results
                        example: false
                      hasNextPage:
                        type: boolean
                        description: Indicates if there is a next page of results
                        example: true
                    required:
                      - cursor
                      - hasPreviousPage
                      - hasNextPage
                    description: Pagination metadata
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: Unique identifier for the deal
                          example: b3b7e6e2-8c2a-4e2a-9b1a-2e4b5c6d7f8a
                        status:
                          type: string
                          enum:
                            - draft
                            - overdue
                            - paid
                            - unpaid
                            - canceled
                            - scheduled
                          description: Current status of the deal
                          example: paid
                        dueDate:
                          type: string
                          description: Due date of the deal in ISO 8601 format
                          example: '2024-06-30T23:59:59.000Z'
                        issueDate:
                          type: string
                          description: Issue date of the deal in ISO 8601 format
                          example: '2024-06-01T00:00:00.000Z'
                        dealNumber:
                          type: string
                          description: >-
                            Deal number as shown on the deal (auto-generated if
                            not provided)
                          example: D-0001
                        amount:
                          type: number
                          description: Total amount of the deal
                          example: 1500.75
                        currency:
                          type: string
                          description: Currency code (ISO 4217) for the deal amount
                          example: USD
                        merchant:
                          type: object
                          nullable: true
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: Unique identifier for the merchant
                              example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                            name:
                              type: string
                              description: Name of the merchant
                              example: Acme Corporation
                            website:
                              type: string
                              nullable: true
                              description: Website URL of the merchant
                              example: https://acme.com
                            email:
                              type: string
                              nullable: true
                              format: email
                              description: Email address of the merchant
                              example: info@acme.com
                          required:
                            - id
                            - name
                            - website
                            - email
                          description: Merchant details
                        paidAt:
                          type: string
                          nullable: true
                          description: >-
                            Timestamp when the deal was paid (ISO 8601), or null
                            if unpaid
                          example: '2024-06-15T12:00:00.000Z'
                        reminderSentAt:
                          type: string
                          nullable: true
                          description: >-
                            Timestamp when a payment reminder was sent (ISO
                            8601), or null if never sent
                          example: '2024-06-10T09:00:00.000Z'
                        note:
                          type: string
                          nullable: true
                          description: Optional note attached to the deal
                          example: Thank you for your business.
                        discount:
                          type: number
                          nullable: true
                          description: Discount amount applied to the deal, or null if none
                          example: 50
                        subtotal:
                          type: number
                          nullable: true
                          description: Subtotal before discounts, or null if not calculated
                          example: 1400
                        viewedAt:
                          type: string
                          nullable: true
                          description: >-
                            Timestamp when the deal was viewed by the merchant
                            (ISO 8601), or null if never viewed
                          example: '2024-06-05T14:30:00.000Z'
                        merchantName:
                          type: string
                          nullable: true
                          description: >-
                            Name of the merchant as shown on the deal, or null
                            if not set
                          example: Acme Corporation
                        sentTo:
                          type: string
                          nullable: true
                          format: email
                          description: >-
                            Email address to which the deal was sent, or null if
                            not sent
                          example: billing@acme.com
                        sentAt:
                          type: string
                          nullable: true
                          description: >-
                            Timestamp when the deal was sent (ISO 8601), or null
                            if not sent
                          example: '2024-06-02T08:00:00.000Z'
                        createdAt:
                          type: string
                          description: Timestamp when the deal was created (ISO 8601)
                          example: '2024-06-01T07:00:00.000Z'
                        updatedAt:
                          type: string
                          description: Timestamp when the deal was last updated (ISO 8601)
                          example: '2024-06-15T10:00:00.000Z'
                        pdfUrl:
                          type: string
                          nullable: true
                          format: uri
                          description: >-
                            URL to download the deal PDF, or null if not
                            generated
                          example: >-
                            https://app.abacuslabs.co/api/download/deal?token=eef58951-1682-4062-b010-425866032390
                        previewUrl:
                          type: string
                          nullable: true
                          format: uri
                          description: >-
                            URL to preview the deal in the browser, or null if
                            not generated
                          example: >-
                            https://app.abacuslabs.co/i/eef58951-1682-4062-b010-425866032390
                      required:
                        - id
                        - status
                        - dueDate
                        - issueDate
                        - amount
                        - currency
                        - merchant
                        - paidAt
                        - reminderSentAt
                        - note
                        - discount
                        - subtotal
                        - viewedAt
                        - merchantName
                        - sentTo
                        - sentAt
                        - createdAt
                        - updatedAt
                        - pdfUrl
                        - previewUrl
                      description: Deal object
                    description: Array of deal objects
                required:
                  - meta
                  - data
                description: Response containing a list of deals and pagination metadata
components:
  securitySchemes:
    token:
      type: http
      scheme: bearer
      description: Default authentication mechanism
      x-speakeasy-example: ABACUS_API_KEY

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.