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

# List deals

> Returns a paginated list of deals in the workspace.

<Accordion title="Required scope">
`deals:read`
</Accordion>



## OpenAPI

````yaml /en/api-reference/openapi.json get /v1/deals
openapi: 3.1.0
info:
  title: OAuth 2.1
  description: Endpoints for registering applications and managing OAuth 2.1 tokens.
  version: 1.0.0
  contact:
    name: Vendaze Support
    email: suporte@vendaze.com
servers:
  - url: https://api.vendaze.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: OAuth
  - name: People
  - name: Companies
  - name: Deals
  - name: Pipelines
  - name: Tasks
  - name: Task Types
  - name: Products
  - name: Tags
  - name: Lists
  - name: Custom Fields
  - name: Webhooks
paths:
  /v1/deals:
    get:
      tags:
        - Deals
      summary: List deals
      description: |-
        Returns a paginated list of deals in the workspace.

        <Accordion title="Required scope">
        `deals:read`
        </Accordion>
      operationId: listDeals
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            minimum: 1
            default: 1
          description: Page number.
        - name: per_page
          in: query
          schema:
            type: integer
            default: 50
            minimum: 1
            maximum: 100
          description: 'Number of records per page. Maximum: 100.'
        - name: order_by
          in: query
          schema:
            type: string
            enum:
              - created_at
              - updated_at
              - name
            default: created_at
          description: Field to sort by.
        - name: order
          in: query
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
          description: Sort direction.
        - name: name
          in: query
          schema:
            type: string
          description: Filter by deal name (case-insensitive partial match).
        - name: pipeline_id
          in: query
          schema:
            type: string
            format: uuid
          description: Filter by pipeline UUID.
        - name: stage_id
          in: query
          schema:
            type: string
            format: uuid
          description: Filter by stage UUID.
        - name: source
          in: query
          schema:
            type: string
          description: >-
            Filter by source (exact match). The source is the name of the OAuth
            app that created the deal.
        - name: forecast_after
          in: query
          schema:
            type: string
            format: date-time
          description: Filter deals with forecast_date on or after this date (ISO 8601).
        - name: forecast_before
          in: query
          schema:
            type: string
            format: date-time
          description: Filter deals with forecast_date on or before this date (ISO 8601).
        - name: created_after
          in: query
          schema:
            type: string
            format: date-time
          description: Filter deals created on or after this date (ISO 8601).
        - name: created_before
          in: query
          schema:
            type: string
            format: date-time
          description: Filter deals created on or before this date (ISO 8601).
        - name: updated_after
          in: query
          schema:
            type: string
            format: date-time
          description: Filter deals updated on or after this date (ISO 8601).
        - name: updated_before
          in: query
          schema:
            type: string
            format: date-time
          description: Filter deals updated on or before this date (ISO 8601).
      responses:
        '200':
          description: Deals listed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DealListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/InsufficientScope'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    DealListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Deal'
        meta:
          type: object
          properties:
            total:
              type: integer
              example: 42
            page:
              type: integer
              example: 1
            per_page:
              type: integer
              example: 50
            has_more:
              type: boolean
              example: false
    Deal:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          example: Acme Corp Annual Contract
        amount:
          type: integer
          example: 250000
        currency:
          $ref: '#/components/schemas/CurrencyCode'
        formatted_amount:
          type: string
          nullable: true
          example: R$ 2.500,00
        pipeline:
          type: object
          nullable: true
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
        stage:
          type: object
          nullable: true
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
            type:
              type: string
              enum:
                - open
                - win
                - lost
        owner:
          $ref: '#/components/schemas/Owner'
        source:
          type: string
          example: My Integration App
        forecast_date:
          type: string
          format: date-time
          nullable: true
        entity_id:
          type: string
          example: NEG-0001
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            request_id:
              type: string
              format: uuid
    ValidationErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: validation_error
            message:
              type: string
              example: Validation failed.
            fields:
              type: object
              additionalProperties:
                type: string
            request_id:
              type: string
              format: uuid
    CurrencyCode:
      type: string
      description: ISO 4217 currency code supported by Vendaze.
      enum:
        - AED
        - ARS
        - AUD
        - BRL
        - CAD
        - CHF
        - CLP
        - CNY
        - COP
        - DKK
        - EGP
        - EUR
        - GBP
        - HKD
        - ILS
        - INR
        - JPY
        - KWD
        - MAD
        - MXN
        - MYR
        - NGN
        - NOK
        - NZD
        - PEN
        - QAR
        - SAR
        - SEK
        - SGD
        - TRY
        - USD
        - UYU
        - ZAR
      example: USD
    Owner:
      type: object
      nullable: true
      description: >-
        Workspace member responsible for this task. `null` when no owner is
        assigned.
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          example: John Smith
        email:
          type: string
          format: email
          example: john@company.com
  responses:
    Unauthorized:
      description: >-
        Token missing, invalid, or expired. Possible error codes:
        `unauthorized`, `token_expired`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: unauthorized
              message: Missing or invalid Authorization header.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    InsufficientScope:
      description: 'Token lacks the required scope. Error code: `insufficient_scope`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: insufficient_scope
              message: This endpoint requires the 'webhooks:read' scope.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    ValidationError:
      description: >-
        Input validation failed. Error code: `validation_error`. The `fields`
        object maps each invalid field to a description of the problem.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
          example:
            error:
              code: validation_error
              message: Validation failed.
              fields:
                url: url must use HTTPS.
                events: At least one event is required.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    RateLimitExceeded:
      description: 'Rate limit exceeded. Error code: `rate_limit_exceeded`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: rate_limit_exceeded
              message: Rate limit exceeded. Try again in 60 seconds.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    InternalError:
      description: 'Unexpected server error. Error code: `internal_error`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: internal_error
              message: An unexpected error occurred.
              request_id: 550e8400-e29b-41d4-a716-446655440000
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: OAuth 2.1 access token.

````