Agave Contracts API

Prime contracts and commitment management.

OpenAPI Specification

agave-contracts-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Agave Unified Construction Budgets Contracts API
  description: The Agave Unified Construction API provides a single REST API to read and write data from 100+ construction and accounting software systems. It normalizes data across platforms including projects, budgets, contracts, commitments, purchase orders, invoices, cost codes, vendors, timesheets, and employees.
  version: '1.0'
  contact:
    name: Agave API Support
    url: https://docs.agaveapi.com
  x-generated-from: documentation
servers:
- url: https://api.agaveapi.com/v1
  description: Production Server
- url: https://sandbox.agaveapi.com/v1
  description: Sandbox Server
security:
- apiKey: []
tags:
- name: Contracts
  description: Prime contracts and commitment management.
paths:
  /contracts:
    get:
      operationId: listContracts
      summary: Agave List Contracts
      description: Retrieve prime contracts from the linked source system.
      tags:
      - Contracts
      parameters:
      - name: source_system_id
        in: header
        required: true
        description: The linked account source system identifier.
        schema:
          type: string
        example: linked-account-abc123
      - name: project_id
        in: query
        description: Filter by project ID.
        schema:
          type: string
        example: proj-500123
      responses:
        '200':
          description: A list of contracts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractList'
              examples:
                listContracts200Example:
                  summary: Default listContracts 200 response
                  x-microcks-default: true
                  value:
                    data:
                    - {}
                    next_cursor: example_value
                    count: 1
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                listContracts401Example:
                  summary: Default listContracts 401 response
                  x-microcks-default: true
                  value:
                    error: example_value
                    message: example_value
                    request_id: '500123'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    ContractList:
      type: object
      description: Paginated list of contracts.
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Contract'
          example:
          - example_value
        next_cursor:
          type: string
          example: eyJpZCI6MTIzfQ==
        count:
          type: integer
          example: 10
    Error:
      type: object
      description: API error response.
      properties:
        error:
          type: string
          description: Error code.
          example: not_found
        message:
          type: string
          description: Human-readable error description.
          example: The requested resource was not found.
        request_id:
          type: string
          description: Unique request ID for support.
          example: req-a1b2c3d4e5
    Contract:
      type: object
      description: A prime contract for a construction project.
      properties:
        id:
          type: string
          description: Contract identifier.
          example: con-778899
        project_id:
          type: string
          description: Associated project identifier.
          example: proj-500123
        name:
          type: string
          description: Contract name.
          example: Prime Construction Contract
        number:
          type: string
          description: Contract number.
          example: GC-2025-001
        status:
          type: string
          description: Contract status.
          enum:
          - draft
          - approved
          - executed
          - completed
          - voided
          example: executed
        original_value:
          type: number
          description: Original contract value in USD.
          example: 4500000.0
        revised_value:
          type: number
          description: Revised contract value including change orders.
          example: 4750000.0
        executed_date:
          type: string
          format: date
          description: Date the contract was executed.
          example: '2025-01-20'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: API-Key
      description: Agave API key for authentication.