> ## 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.

# Retrieve a deal

> Retrieve a deal by its unique identifier for the authenticated team.



## OpenAPI

````yaml get /deals/{id}
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/{id}:
    get:
      tags:
        - Deals
      summary: Retrieve a deal
      description: Retrieve a deal by its unique identifier for the authenticated team.
      operationId: getDealById
      parameters:
        - schema:
            type: string
          required: true
          in: path
          name: id
      responses:
        '200':
          description: Retrieve a deal by its unique identifier for the authenticated team.
          content:
            application/json:
              schema:
                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
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.