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

# List Deals



## OpenAPI

````yaml /api/openapi-cutmake.json get /api/v1/deals
openapi: 3.1.0
info:
  title: VM App API
  version: 0.1.0
servers:
  - url: https://vinmake-erp.onrender.com
security: []
paths:
  /api/v1/deals:
    get:
      tags:
        - Deals
      summary: List Deals
      operationId: list_deals_api_v1_deals_get
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
            title: Page
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 20
            title: Limit
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Q
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Status
        - name: styleId
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Styleid
        - name: clientId
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Clientid
        - name: source
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Source
        - name: sort
          in: query
          required: false
          schema:
            type: string
            default: '-updated_at'
            title: Sort
        - name: X-Org-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Org-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDealsResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    PaginatedDealsResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/DealResponse'
          type: array
          title: Data
        summary:
          $ref: '#/components/schemas/DealSummary'
        pagination:
          $ref: '#/components/schemas/routers__external__deals__PaginationInfo'
      type: object
      required:
        - data
        - summary
        - pagination
      title: PaginatedDealsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DealResponse:
      properties:
        id:
          type: string
          title: Id
        persistedDealId:
          anyOf:
            - type: string
            - type: 'null'
          title: Persisteddealid
        source:
          type: string
          title: Source
        status:
          type: string
          title: Status
        sourceStatus:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcestatus
        dealName:
          anyOf:
            - type: string
            - type: 'null'
          title: Dealname
        styleId:
          anyOf:
            - type: string
            - type: 'null'
          title: Styleid
        styleCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Stylecode
        styleName:
          anyOf:
            - type: string
            - type: 'null'
          title: Stylename
        clientId:
          anyOf:
            - type: string
            - type: 'null'
          title: Clientid
        clientName:
          anyOf:
            - type: string
            - type: 'null'
          title: Clientname
        merchandiser:
          anyOf:
            - type: string
            - type: 'null'
          title: Merchandiser
        salesOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Salesorderid
        salesOrderDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Salesorderdocumentid
        quoteId:
          anyOf:
            - type: string
            - type: 'null'
          title: Quoteid
        quoteVersionNumber:
          anyOf:
            - type: integer
            - type: 'null'
          title: Quoteversionnumber
        quoteIsFinal:
          type: boolean
          title: Quoteisfinal
          default: false
        costSheetId:
          anyOf:
            - type: string
            - type: 'null'
          title: Costsheetid
        costSheetDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Costsheetdocumentid
        currency:
          type: string
          title: Currency
          default: USD
        estQuantity:
          anyOf:
            - type: number
            - type: 'null'
          title: Estquantity
        estUnitPrice:
          anyOf:
            - type: number
            - type: 'null'
          title: Estunitprice
        estimatedRevenue:
          type: number
          title: Estimatedrevenue
          default: 0
        quotePrice:
          anyOf:
            - type: number
            - type: 'null'
          title: Quoteprice
        trueCostPrice:
          anyOf:
            - type: number
            - type: 'null'
          title: Truecostprice
        expectedRevenue:
          type: number
          title: Expectedrevenue
          default: 0
        expectedMargin:
          anyOf:
            - type: number
            - type: 'null'
          title: Expectedmargin
        droppedValue:
          type: number
          title: Droppedvalue
          default: 0
        droppedQuantity:
          type: number
          title: Droppedquantity
          default: 0
        salesOrderCount:
          type: integer
          title: Salesordercount
          default: 0
        quoteCount:
          type: integer
          title: Quotecount
          default: 0
        quotingProgressCount:
          type: integer
          title: Quotingprogresscount
          default: 0
        droppedDealCount:
          type: integer
          title: Droppeddealcount
          default: 0
        totalQuantity:
          anyOf:
            - type: number
            - type: 'null'
          title: Totalquantity
        probability:
          anyOf:
            - type: number
            - type: 'null'
          title: Probability
        dropReason:
          anyOf:
            - type: string
            - type: 'null'
          title: Dropreason
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        latestActivityAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Latestactivityat
      type: object
      required:
        - id
        - source
        - status
      title: DealResponse
    DealSummary:
      properties:
        totalDeals:
          type: integer
          title: Totaldeals
        linkedSalesOrders:
          type: integer
          title: Linkedsalesorders
        linkedQuotes:
          type: integer
          title: Linkedquotes
        quotingProgressCount:
          type: integer
          title: Quotingprogresscount
        droppedDealCount:
          type: integer
          title: Droppeddealcount
        pipelineRevenue:
          type: number
          title: Pipelinerevenue
        quotedRevenue:
          type: number
          title: Quotedrevenue
        convertedRevenue:
          type: number
          title: Convertedrevenue
        droppedRevenue:
          type: number
          title: Droppedrevenue
        trueCostValue:
          type: number
          title: Truecostvalue
        expectedMargin:
          type: number
          title: Expectedmargin
      type: object
      required:
        - totalDeals
        - linkedSalesOrders
        - linkedQuotes
        - quotingProgressCount
        - droppedDealCount
        - pipelineRevenue
        - quotedRevenue
        - convertedRevenue
        - droppedRevenue
        - trueCostValue
        - expectedMargin
      title: DealSummary
    routers__external__deals__PaginationInfo:
      properties:
        page:
          type: integer
          title: Page
        limit:
          type: integer
          title: Limit
        total:
          type: integer
          title: Total
        totalPages:
          type: integer
          title: Totalpages
        hasNext:
          type: boolean
          title: Hasnext
        hasPrev:
          type: boolean
          title: Hasprev
      type: object
      required:
        - page
        - limit
        - total
        - totalPages
        - hasNext
        - hasPrev
      title: PaginationInfo
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /auth/login

````