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

# List tasks

> Use when listing or searching async tasks (e.g. admin queue view). Returns list with optional filtering.



## OpenAPI

````yaml /api-reference/openapi.json get /tasks
openapi: 3.0.1
info:
  title: Flexprice API
  description: Flexprice API Service
  contact:
    name: API Support
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
  version: '1.0'
servers:
  - url: https://us.api.flexprice.io/v1
    description: US Region
  - url: https://api.cloud.flexprice.io/v1
    description: India Region
security: []
paths:
  /tasks:
    get:
      tags:
        - Tasks
      summary: List tasks
      description: >-
        Use when listing or searching async tasks (e.g. admin queue view).
        Returns list with optional filtering.
      operationId: listTasks
      parameters:
        - name: created_by
          in: query
          schema:
            type: string
        - name: end_time
          in: query
          schema:
            type: string
        - name: entity_type
          in: query
          schema:
            type: string
            enum:
              - EVENTS
              - PRICES
              - CUSTOMERS
              - FEATURES
            x-enum-varnames:
              - EntityTypeEvents
              - EntityTypePrices
              - EntityTypeCustomers
              - EntityTypeFeatures
          x-enum-varnames:
            - EntityTypeEvents
            - EntityTypePrices
            - EntityTypeCustomers
            - EntityTypeFeatures
        - name: expand
          in: query
          schema:
            type: string
        - name: limit
          in: query
          schema:
            maximum: 1000
            minimum: 1
            type: integer
        - name: offset
          in: query
          schema:
            minimum: 0
            type: integer
        - name: order
          in: query
          schema:
            type: string
            enum:
              - asc
              - desc
        - name: scheduled_task_id
          in: query
          schema:
            type: string
        - name: sort
          in: query
          schema:
            type: string
        - name: start_time
          in: query
          schema:
            type: string
        - name: status
          in: query
          schema:
            type: string
            enum:
              - published
              - deleted
              - archived
            x-enum-varnames:
              - StatusPublished
              - StatusDeleted
              - StatusArchived
          x-enum-varnames:
            - StatusPublished
            - StatusDeleted
            - StatusArchived
        - name: task_status
          in: query
          schema:
            type: string
            enum:
              - PENDING
              - PROCESSING
              - COMPLETED
              - FAILED
            x-enum-varnames:
              - TaskStatusPending
              - TaskStatusProcessing
              - TaskStatusCompleted
              - TaskStatusFailed
          x-enum-varnames:
            - TaskStatusPending
            - TaskStatusProcessing
            - TaskStatusCompleted
            - TaskStatusFailed
        - name: task_type
          in: query
          schema:
            type: string
            enum:
              - IMPORT
              - EXPORT
            x-enum-varnames:
              - TaskTypeImport
              - TaskTypeExport
          x-enum-varnames:
            - TaskTypeImport
            - TaskTypeExport
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTasksResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ListTasksResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/TaskResponse'
        pagination:
          $ref: '#/components/schemas/types.PaginationResponse'
    errors.ErrorResponse:
      type: object
      properties:
        code:
          type: string
          enum:
            - not_found
            - already_exists
            - version_conflict
            - validation_error
            - invalid_operation
            - permission_denied
            - http_client_error
            - database_error
            - system_error
            - internal_error
            - service_unavailable
        details:
          type: object
          additionalProperties:
            type: object
        http_status_code:
          type: integer
        message:
          type: string
      x-speakeasy-name-override: ErrorResponse
    TaskResponse:
      type: object
      properties:
        completed_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
        entity_type:
          $ref: '#/components/schemas/types.EntityType'
        environment_id:
          type: string
        error_summary:
          type: string
        failed_at:
          type: string
          format: date-time
        failed_records:
          type: integer
        file_name:
          type: string
        file_type:
          $ref: '#/components/schemas/types.FileType'
        file_url:
          type: string
        id:
          type: string
        metadata:
          type: object
          additionalProperties: true
        processed_records:
          type: integer
        scheduled_task_id:
          type: string
        started_at:
          type: string
          format: date-time
        status:
          $ref: '#/components/schemas/types.Status'
        successful_records:
          type: integer
        task_status:
          $ref: '#/components/schemas/types.TaskStatus'
        task_type:
          $ref: '#/components/schemas/types.TaskType'
        tenant_id:
          type: string
        total_records:
          type: integer
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: string
        workflow_id:
          type: string
    types.PaginationResponse:
      type: object
      properties:
        limit:
          type: integer
        offset:
          type: integer
        total:
          type: integer
      x-speakeasy-name-override: PaginationResponse
    types.EntityType:
      type: string
      enum:
        - EVENTS
        - PRICES
        - CUSTOMERS
        - FEATURES
      x-enum-varnames:
        - EntityTypeEvents
        - EntityTypePrices
        - EntityTypeCustomers
        - EntityTypeFeatures
      x-speakeasy-name-override: EntityType
    types.FileType:
      type: string
      enum:
        - CSV
        - JSON
      x-enum-varnames:
        - FileTypeCSV
        - FileTypeJSON
      x-speakeasy-name-override: FileType
    types.Status:
      type: string
      enum:
        - published
        - deleted
        - archived
      x-enum-varnames:
        - StatusPublished
        - StatusDeleted
        - StatusArchived
      x-speakeasy-name-override: Status
    types.TaskStatus:
      type: string
      enum:
        - PENDING
        - PROCESSING
        - COMPLETED
        - FAILED
      x-enum-varnames:
        - TaskStatusPending
        - TaskStatusProcessing
        - TaskStatusCompleted
        - TaskStatusFailed
      x-speakeasy-name-override: TaskStatus
    types.TaskType:
      type: string
      enum:
        - IMPORT
        - EXPORT
      x-enum-varnames:
        - TaskTypeImport
        - TaskTypeExport
      x-speakeasy-name-override: TaskType
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: Enter your API key in the format *x-api-key &lt;api-key&gt;**
      name: x-api-key
      in: header

````