Skip to content

Aiwyn API (1.0.0)

Welcome to Aiwyn API

The Aiwyn API provides programmatic access to our comprehensive suite of financial automation tools. Build powerful integrations and automate your accounting workflows with our RESTful APIs.

Key Features

  • 🔐 Secure Authentication - Industry-standard OAuth 2.0 and API key authentication
  • 📊 Real-time Data - Access up-to-date financial information
  • 🚀 High Performance - Low latency, high throughput API infrastructure
  • 📚 Comprehensive Coverage - Full access to clients, engagements, expenses, and more
  • 🛠️ Developer-Friendly - Extensive documentation, SDKs, and code examples

API Versioning

We use URL versioning for our APIs. The current version is v1. All endpoints are prefixed with the version number.

Download OpenAPI description
Overview
Languages
Servers
Mock server
https://api.doc.aiwyn.ai/_mock/bundle/
Staging Environment (Test Data)
https://demo.api.aiwyn.ai/

🔐 Authentication

Authentication endpoints for obtaining access tokens and managing API keys.

Operations

👤 Client

Manage client records, profiles, and related operations.

Operations

📇 Contact

Manage contact information and relationships for clients.

Operations

🧑‍💼 Staff

Manage staff accounts, roles, and permissions.

Operations

💳 Payments

Handle incoming and outgoing payments.

Operations

🧾 Billing

Manage billing cycles, statements, and billing configurations.

Operations

📄 Invoices

Create, send, and manage invoices.

Operations

📋 Projects

Handle engagements, projects, and workflow tracking.

Operations

⏱ Time

Track and manage billable and non-billable time entries.

Operations

✉️ Engagement

Create, send, and track engagement.

Operations

List engagements

Request

Project engagement tracking with comprehensive workflow management

This endpoint delivers complete project engagement management including:

  • Client engagement tracking with date-based filtering
  • Multi-level staff assignment management (partner and manager roles)
  • Project status workflow tracking and reporting
  • Template-driven engagement naming and standardization
  • Date range analysis for project timeline management

Project Management Capabilities:

  • Start and end date tracking for project lifecycles
  • Status-based workflow management (ACTIVE, COMPLETED, ON_HOLD, EXECUTED, etc.)
  • Staff assignment tracking at partner and manager levels
  • Client relationship management for engagement context

Workflow Features:

  • Template-based engagement creation for consistency
  • Status progression tracking for project milestones
  • Staff allocation and responsibility assignment
  • Client-specific engagement history and analysis

Business Intelligence:

  • Engagement duration analysis and reporting
  • Staff utilization and assignment tracking
  • Client engagement patterns and history
  • Project status distribution and workflow analysis

Filtering and Analysis:

  • Client-specific engagement retrieval
  • Status-based workflow filtering
  • Date range queries for period analysis
  • Staff assignment reporting and allocation

Real Example:

curl --location 'https://{{host}}/v1/engagements' \
--header 'Authorization: bearer {{token}} \
--header 'Content-Type: application/json' \
--data '{
  "pageSize": 25,
  "page": 0
}'
Security
BearerAuth
Bodyapplication/json
pageSizeinteger[ 1 .. 1000 ]

Maximum number of engagement records to return

Default 25
Example: 25
pageinteger>= 0

Page number for pagination (0-based)

Default 0
Example: 0
clientIdinteger

Filter engagements by specific client ID

Example: 420
statusstring

Filter by engagement status

Enum"ACTIVE""COMPLETED""ON_HOLD""EXECUTED""CANCELLED""PLANNED"
Example: "EXECUTED"
startDatestring(date)

Start date for engagement date range filter

Example: "2023-06-29"
endDatestring(date)

End date for engagement date range filter

Example: "2023-06-29"
sortOrderstring

Sort order for engagement dates

Default "desc"
Enum"asc""desc"
Example: "desc"
curl -i -X POST \
  https://api.doc.aiwyn.ai/_mock/bundle/gql/v1/engagements \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "pageSize": 25,
    "page": 0
  }'

Responses

Successfully retrieved engagement records

Bodyapplication/json
deid_engagementArray of objects
deid_engagement_aggregateobject
Response
application/json
{ "deid_engagement": [ {}, {} ], "deid_engagement_aggregate": { "aggregate": {} } }

Search engagements

Request

Search Engagements with Dynamic Filters

This endpoint allows you to search engagements using dynamic filters, enabling flexible querying based on various criteria.

Features:

  • Supports multiple filter conditions
  • Pagination for large result sets
  • Sorting options for results

Example Usage:

curl --location 'https://{{host}}/v1/engagements/search' \
--data '{
  "pageSize": 1,
  "where": {
    "_and": [
      {
        "_or": [
          {
            "name": {
              "_ilike": "%review%"
            }
          },
          {
            "engagementNameTemplate": {
              "_ilike": "%tax%"
            }
          }
        ]
      },
      {
        "status": {
          "_in": ["ACTIVE", "EXECUTED"]
        }
      },
      {
        "createdAt": {
          "_gte": "1900-01-01T00:00:00Z"
        }
      },
      {
        "partnerStaffId": {
          "_in": [
            5,
            6,
            7,
            8
          ]
        }
      }
    ]
  },
  "orderBy": [
    {
      "name": "asc"
    },
    {
      "createdAt": "desc"
    }
  ]
}'
Security
BearerAuth
Bodyapplication/jsonrequired
limitinteger[ 1 .. 1000 ]

Maximum number of engagements to return

Default 1
Example: 1
whereobject

GraphQL-style where clause for complex filtering

Example: {"_and":[{"_or":[{"name":{"_ilike":"%review%"}},{"engagementNameTemplate":{"_ilike":"%tax%"}}]},{"status":{"_in":["ACTIVE","EXECUTED"]}},{"createdAt":{"_gte":"1900-01-01T00:00:00Z"}},{"partnerStaffId":{"_in":[5,6,7,8]}}]}
orderByArray of objects

Dynamic ordering specifications

Example: [{"name":"asc"},{"createdAt":"desc"}]
curl -i -X POST \
  https://api.doc.aiwyn.ai/_mock/bundle/gql/v1/engagements/search \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "limit": 1,
    "where": {
      "_and": [
        {
          "_or": [
            {
              "name": {
                "_ilike": "%review%"
              }
            },
            {
              "engagementNameTemplate": {
                "_ilike": "%tax%"
              }
            }
          ]
        },
        {
          "status": {
            "_in": [
              "ACTIVE",
              "EXECUTED"
            ]
          }
        },
        {
          "createdAt": {
            "_gte": "1900-01-01T00:00:00Z"
          }
        },
        {
          "partnerStaffId": {
            "_in": [
              5,
              6,
              7,
              8
            ]
          }
        }
      ]
    },
    "orderBy": [
      {
        "name": "asc"
      },
      {
        "createdAt": "desc"
      }
    ]
  }'

Responses

Engagements retrieved successfully.

Bodyapplication/json
engagementsArray of objects(Engagement)
totalCountinteger

Total number of engagements matching the filters

Example: 100
Response
application/json
{ "engagements": [ {} ], "totalCount": 100 }

Get engagement by ID

Request

Retrieve a specific engagement by its unique identifier

This endpoint provides detailed engagement information including:

  • Complete engagement details and scope
  • Engagement status and lifecycle information
  • Client relationship and contact details
  • Project portfolio and deliverables
  • Team assignments and resource allocation
  • Financial terms and billing arrangements

Engagement Management Features:

  • Engagement lifecycle tracking
  • Client relationship management
  • Project portfolio oversight
  • Team resource allocation
  • Financial terms and billing setup

Engagement Details Include:

  • Engagement name and description
  • Engagement status and type
  • Client and contact information
  • Project portfolio details
  • Team assignments
  • Financial terms and billing

Business Applications:

  • Engagement status monitoring
  • Client relationship management
  • Project portfolio analysis
  • Resource allocation planning
  • Financial performance tracking

Real Example:

curl --location 'https://{{host}}/v1/engagement/34567' \
--header 'Authorization: bearer {{token}}' \
--header 'Content-Type: application/json'

Response Example:

{
  "id": 34567,
  "name": "Annual Audit Engagement 2024",
  "description": "Comprehensive annual audit engagement including financial statements, tax preparation, and compliance review",
  "status": "ACTIVE",
  "type": "AUDIT",
  "clientId": 789,
  "clientName": "Acme Corporation",
  "clientEmail": "finance@acme.com",
  "clientPhone": "+1-555-0123",
  "startDate": "2024-01-01T00:00:00Z",
  "endDate": "2024-12-31T23:59:59Z",
  "estimatedValue": 50000.00,
  "currency": "USD",
  "projects": [
    {
      "id": 67890,
      "name": "Q4 Financial Audit",
      "status": "IN_PROGRESS",
      "budget": 25000.00
    },
    {
      "id": 67891,
      "name": "Tax Preparation",
      "status": "PLANNING",
      "budget": 15000.00
    }
  ],
  "teamMembers": [
    {
      "staffId": 123,
      "name": "John Smith",
      "role": "ENGAGEMENT_PARTNER",
      "allocation": 0.3
    },
    {
      "staffId": 124,
      "name": "Jane Doe",
      "role": "SENIOR_MANAGER",
      "allocation": 0.8
    }
  ],
  "billingTerms": {
    "billingFrequency": "MONTHLY",
    "paymentTerms": "NET_30",
    "rateType": "HOURLY",
    "defaultRate": 250.00
  },
  "notes": "Annual engagement with quarterly reviews and monthly billing",
  "createdAt": "2023-12-15T10:00:00Z",
  "updatedAt": "2024-11-20T14:30:00Z"
}
Security
BearerAuth
Path
idinteger>= 1required

Unique identifier of the engagement

Example: 34567
curl -i -X GET \
  https://api.doc.aiwyn.ai/_mock/bundle/gql/v1/engagement/34567 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Engagement details retrieved successfully

Bodyapplication/json
idinteger

Unique engagement identifier

Example: 34567
namestring

Engagement name

Example: "Annual Audit Engagement 2024"
descriptionstring

Detailed engagement description

Example: "Comprehensive annual audit engagement including financial statements, tax preparation, and compliance review"
statusstring

Engagement status

Enum"PLANNING""ACTIVE""ON_HOLD""COMPLETED""CANCELLED"
Example: "ACTIVE"
typestring

Engagement type

Enum"AUDIT""REVIEW""COMPILATION""TAX""CONSULTING""ADVISORY"
Example: "AUDIT"
clientIdinteger

Associated client identifier

Example: 789
clientNamestring

Client name

Example: "Acme Corporation"
clientEmailstring

Primary client contact email

Example: "finance@acme.com"
clientPhonestring

Primary client contact phone

Example: "+1-555-0123"
startDatestring(date-time)

Engagement start date

Example: "2024-01-01T00:00:00Z"
endDatestring(date-time)

Engagement end date

Example: "2024-12-31T23:59:59Z"
estimatedValuenumber(decimal)

Estimated engagement value

Example: 50000
currencystring

Engagement currency code

Example: "USD"
projectsArray of objects

Projects within this engagement

teamMembersArray of objects

Team members assigned to the engagement

billingTermsobject

Billing terms and arrangements

notesstring

Additional notes or terms

Example: "Annual engagement with quarterly reviews and monthly billing"
createdAtstring(date-time)

Engagement creation timestamp

Example: "2023-12-15T10:00:00Z"
updatedAtstring(date-time)

Last update timestamp

Example: "2024-11-20T14:30:00Z"
Response
application/json
{ "id": 34567, "name": "Annual Audit Engagement 2024", "description": "Comprehensive annual audit engagement including financial statements, tax preparation, and compliance review", "status": "ACTIVE", "type": "AUDIT", "clientId": 789, "clientName": "Acme Corporation", "clientEmail": "finance@acme.com", "clientPhone": "+1-555-0123", "startDate": "2024-01-01T00:00:00Z", "endDate": "2024-12-31T23:59:59Z", "estimatedValue": 50000, "currency": "USD", "projects": [ {} ], "teamMembers": [ {} ], "billingTerms": { "billingFrequency": "MONTHLY", "paymentTerms": "NET_30", "rateType": "HOURLY", "defaultRate": 250 }, "notes": "Annual engagement with quarterly reviews and monthly billing", "createdAt": "2023-12-15T10:00:00Z", "updatedAt": "2024-11-20T14:30:00Z" }

🛤 Last Mile

Handle the final delivery stage and client closing processes.