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

# Contract List Api

> List contracts with optional filtering.



## OpenAPI

````yaml get /api/v1/contract/
openapi: 3.1.0
info:
  title: NinjaAPI
  version: 1.0.0
  description: ''
servers:
  - url: https://api.justpaid.io
security: []
paths:
  /api/v1/contract/:
    get:
      summary: Contract List Api
      description: List contracts with optional filtering.
      operationId: loopfour_backend_contract_api_external_contract_list_api
      parameters:
        - in: query
          name: customer
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Customer
          required: false
        - in: query
          name: external_customer_id
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: External Customer Id
          required: false
        - in: query
          name: contract_status
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Contract Status
          required: false
        - in: query
          name: contract_start_date_gte
          schema:
            anyOf:
              - format: date
                type: string
              - type: 'null'
            title: Contract Start Date Gte
          required: false
        - in: query
          name: contract_start_date_lte
          schema:
            anyOf:
              - format: date
                type: string
              - type: 'null'
            title: Contract Start Date Lte
          required: false
        - in: query
          name: contract_end_date_gte
          schema:
            anyOf:
              - format: date
                type: string
              - type: 'null'
            title: Contract End Date Gte
          required: false
        - in: query
          name: contract_end_date_lte
          schema:
            anyOf:
              - format: date
                type: string
              - type: 'null'
            title: Contract End Date Lte
          required: false
        - in: query
          name: is_evergreen
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Is Evergreen
          required: false
        - in: query
          name: limit
          schema:
            default: 20
            maximum: 100
            minimum: 1
            title: Limit
            type: integer
          required: false
        - in: query
          name: offset
          schema:
            default: 0
            minimum: 0
            title: Offset
            type: integer
          required: false
        - name: customer
          in: query
          description: Filter by customer UUID
          required: false
          schema:
            type: string
          example: 123e4567-e89b-12d3-a456-426614174000
        - name: external_customer_id
          in: query
          description: Filter by external customer ID
          required: false
          schema:
            type: string
          example: CUST-001
        - name: contract_status
          in: query
          description: Filter by contract status (e.g., 'draft', 'pending', 'accepted')
          required: false
          schema:
            type: string
        - name: contract_start_date_gte
          in: query
          description: Filter contracts starting on or after this date
          required: false
          schema:
            format: date
            type: string
          example: '2024-01-01'
        - name: contract_start_date_lte
          in: query
          description: Filter contracts starting on or before this date
          required: false
          schema:
            format: date
            type: string
          example: '2024-12-31'
        - name: contract_end_date_gte
          in: query
          description: Filter contracts ending on or after this date
          required: false
          schema:
            format: date
            type: string
          example: '2024-01-01'
        - name: contract_end_date_lte
          in: query
          description: Filter contracts ending on or before this date
          required: false
          schema:
            format: date
            type: string
          example: '2024-12-31'
        - name: is_evergreen
          in: query
          description: Filter by evergreen status
          required: false
          schema:
            type: boolean
        - name: limit
          in: query
          description: Number of results to return per page
          required: false
          schema:
            type: integer
          example: 50
        - name: offset
          in: query
          description: The initial index from which to return the results
          required: false
          schema:
            type: integer
          example: 0
      responses:
        '200':
          description: List of contracts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedContractListOut'
              example:
                - uuid: 123e4567-e89b-12d3-a456-426614174000
                  title: Enterprise Agreement
                  contract_status: accepted
                  contract_start_date: '2024-01-01'
                  contract_end_date: '2025-01-01'
                  contract_amount: 120000
                  currency: USD
                  is_evergreen: false
                  customer:
                    uuid: customer-uuid
                    name: Acme Corp
                    email: contact@acme.com
                    external_id: CUST-001
                  file_url: https://api.justpaid.io/files/contract.pdf
                  created_at: '2024-01-01T00:00:00Z'
      security:
        - HttpBearerAuth: []
components:
  schemas:
    PagedContractListOut:
      properties:
        items:
          items:
            $ref: '#/components/schemas/ContractListOut'
          title: Items
          type: array
        count:
          title: Count
          type: integer
      required:
        - items
        - count
      title: PagedContractListOut
      type: object
    ContractListOut:
      description: Simplified contract information for list view.
      properties:
        customer:
          anyOf:
            - $ref: '#/components/schemas/CustomerBasicOut'
            - type: 'null'
          description: Customer information
        contract_status:
          description: The current status of the contract
          example: accepted
          title: Contract Status
          type: string
        file_url:
          anyOf:
            - type: string
            - type: 'null'
          description: URL to download the contract PDF
          example: https://api.justpaid.io/files/contract.pdf
          title: File Url
        uuid:
          format: uuid
          title: Uuid
          type: string
        title:
          anyOf:
            - maxLength: 255
              type: string
            - type: 'null'
          title: Title
        contract_start_date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Contract Start Date
        contract_end_date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Contract End Date
        contract_amount:
          anyOf:
            - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
              type: string
            - type: 'null'
          title: Contract Amount
        currency:
          anyOf:
            - maxLength: 3
              type: string
            - type: 'null'
          default: USD
          title: Currency
        is_evergreen:
          default: false
          title: Is Evergreen
          type: boolean
        created_at:
          format: date-time
          title: Created At
          type: string
      required:
        - contract_status
      title: ContractListOut
      type: object
    CustomerBasicOut:
      description: Basic customer information for contract responses.
      properties:
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          description: External identifier for the customer
          example: CUST-001
          title: External Id
        uuid:
          format: uuid
          title: Uuid
          type: string
        name:
          anyOf:
            - maxLength: 100
              type: string
            - type: 'null'
          description: Customer name
          title: Name
        email:
          anyOf:
            - maxLength: 100
              type: string
            - type: 'null'
          title: Email
      title: CustomerBasicOut
      type: object
  securitySchemes:
    HttpBearerAuth:
      type: http
      scheme: bearer

````