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

List WIP entries

Request

Work in Progress tracking with comprehensive financial lifecycle management

This advanced endpoint provides complete WIP management including:

  • WIP value tracking from creation through billing completion
  • Outstanding balance calculations for unbilled work
  • Multi-dimensional analysis (client, job, date-based)
  • Financial aggregations for WIP reporting and analysis
  • Integration with client and job data for complete context

Financial Tracking Features:

  • WIP value recording and outstanding balance calculation
  • Billed amount tracking for revenue recognition
  • Write-off amount management for uncollectible WIP
  • Job and client correlation for project profitability

WIP Lifecycle Management:

  • Creation date logging for aging analysis
  • WIP type categorization (TIME, EXPENSE, FIXED_FEE, etc.)
  • Outstanding value calculation for billing preparation
  • Billed amount reconciliation for revenue tracking

Business Intelligence & Reporting:

  • Client-specific WIP analysis and aging
  • Job-based profitability and WIP tracking
  • WIP aging reports for collections management
  • Revenue recognition and billing pipeline analysis

Financial Aggregations:

  • Total WIP value across filtered records
  • Outstanding WIP calculations for billing preparation
  • Billed amount summaries for revenue analysis
  • Write-off tracking for financial reporting

Advanced Filtering:

  • Client-specific WIP retrieval and analysis
  • Job-based WIP tracking for project management
  • Date range queries for period-specific reporting
  • WIP type filtering for category analysis

Real Example:

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

Maximum number of WIP records to return

Default 25
Example: 25
pageinteger>= 0

Page number for pagination (0-based)

Default 0
Example: 0
clientIdinteger

Filter WIP records by specific client ID

Example: 1561
jobIdinteger

Filter WIP records by specific job ID

Example: 2514
wipTypestring

Filter by WIP type

Enum"Time""Expense""Fixed_Fee""Disbursement"
Example: "Time"
startDatestring(date-time)

Start date for WIP logged date range filter

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

End date for WIP logged date range filter

Example: "2024-12-31T23:59:59"
sortOrderstring

Sort order for logged date

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

Responses

Successfully retrieved WIP records with financial aggregations

Bodyapplication/json
deid_wipArray of objects
deid_wip_aggregateobject
Response
application/json
{ "deid_wip": [ {}, {}, {} ], "deid_wip_aggregate": { "aggregate": {} } }

Search WIP entries

Request

Advanced WIP filtering with custom GraphQL where clauses and dynamic ordering

Supports wipType selection, date ranges, and client/job constraints.

Real Example:

curl --location 'https://{{host}}/v1/wips/search' \
--header 'Authorization: bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
  "pageSize": 1,
  "where": {
    "_and": [
      {
        "_or": [
          {
            "type": {
              "_in": ["TIME", "EXPENSE"]
            }
          },
          {
            "notes": {
              "_ilike": "%consultation%"
            }
          }
        ]
      },
      {
        "approved": {
          "_eq": true
        }
      },
      {
        "loggedDate": {
          "_gte": "1900-01-01T00:00:00Z"
        }
      },
      {
        "clientId": {
          "_in": [
            1001,
            1002,
            1003
          ]
        }
      }
    ]
  },
  "orderBy": [
    {
      "loggedDate": "desc"
    },
    {
      "value": "desc"
    }
  ]
}'
Security
BearerAuth
Bodyapplication/json
pageSizeinteger[ 1 .. 1000 ]
Default 1
whereobject

GraphQL-style where clause for complex WIP filtering

Example: {"_and":[{"_or":[{"type":{"_in":["TIME","EXPENSE"]}},{"notes":{"_ilike":"%consultation%"}}]},{"approved":{"_eq":true}},{"loggedDate":{"_gte":"1900-01-01T00:00:00Z"}},{"clientId":{"_in":[1001,1002,1003]}}]}
orderByArray of objects

Dynamic ordering specifications

Example: [{"loggedDate":"desc"},{"value":"desc"}]
curl -i -X POST \
  https://api.doc.aiwyn.ai/_mock/bundle/gql/v1/wips/search \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "pageSize": 1,
    "where": {
      "_and": [
        {
          "_or": [
            {
              "type": {
                "_in": [
                  "TIME",
                  "EXPENSE"
                ]
              }
            },
            {
              "notes": {
                "_ilike": "%consultation%"
              }
            }
          ]
        },
        {
          "approved": {
            "_eq": true
          }
        },
        {
          "loggedDate": {
            "_gte": "1900-01-01T00:00:00Z"
          }
        },
        {
          "clientId": {
            "_in": [
              1001,
              1002,
              1003
            ]
          }
        }
      ]
    },
    "orderBy": [
      {
        "loggedDate": "desc"
      },
      {
        "value": "desc"
      }
    ]
  }'

Responses

Successfully retrieved filtered WIP entries

Get WIP time entry by ID

Request

Retrieve a specific work-in-progress (WIP) time entry by its unique identifier

This endpoint provides detailed WIP time entry information including:

  • Complete time entry details and descriptions
  • Time entry status and approval information
  • Client, project, and task relationships
  • Billable and non-billable time tracking
  • Rate calculations and billing preparation
  • Time entry history and modifications

WIP Time Management Features:

  • Time entry lifecycle tracking
  • Billable vs non-billable time classification
  • Rate calculation and billing preparation
  • Project and task relationship management
  • Approval workflow integration

WIP Time Details Include:

  • Time entry description and details
  • Time entry status and type
  • Client, project, and task information
  • Time duration and rates
  • Billable calculations
  • Approval status

Business Applications:

  • Time entry review and approval
  • Billable time calculation
  • Project time tracking
  • Client billing preparation
  • Productivity analysis

Real Example:

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

Response Example:

{
  "id": 89012,
  "description": "Financial statement review and analysis",
  "status": "PENDING_APPROVAL",
  "type": "BILLABLE",
  "staffId": 123,
  "staffName": "John Smith",
  "clientId": 789,
  "clientName": "Acme Corporation",
  "projectId": 67890,
  "projectName": "Q4 Financial Audit",
  "taskId": 456,
  "taskName": "Financial Statement Review",
  "date": "2024-11-20T00:00:00Z",
  "startTime": "2024-11-20T09:00:00Z",
  "endTime": "2024-11-20T17:00:00Z",
  "duration": 8.0,
  "billableHours": 8.0,
  "nonBillableHours": 0.0,
  "hourlyRate": 250.00,
  "billableAmount": 2000.00,
  "currency": "USD",
  "notes": "Completed comprehensive review of Q4 financial statements including variance analysis",
  "approvalHistory": [
    {
      "id": 1,
      "approverId": 124,
      "approverName": "Jane Doe",
      "approvalDate": "2024-11-21T10:30:00Z",
      "status": "PENDING",
      "comments": "Under review"
    }
  ],
  "createdAt": "2024-11-20T17:30:00Z",
  "updatedAt": "2024-11-21T10:30:00Z"
}
Security
BearerAuth
Path
idinteger>= 1required

Unique identifier of the WIP time entry

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

Responses

WIP time entry details retrieved successfully

Bodyapplication/json
idinteger

Unique WIP time entry identifier

Example: 89012
descriptionstring

Time entry description

Example: "Financial statement review and analysis"
statusstring

Time entry status

Enum"DRAFT""SUBMITTED""PENDING_APPROVAL""APPROVED""REJECTED""BILLED"
Example: "PENDING_APPROVAL"
typestring

Time entry type

Enum"BILLABLE""NON_BILLABLE""PTO""TRAINING""ADMINISTRATIVE"
Example: "BILLABLE"
staffIdinteger

Staff member identifier

Example: 123
staffNamestring

Staff member name

Example: "John Smith"
clientIdinteger

Associated client identifier

Example: 789
clientNamestring

Client name

Example: "Acme Corporation"
projectIdinteger

Associated project identifier

Example: 67890
projectNamestring

Project name

Example: "Q4 Financial Audit"
taskIdinteger

Associated task identifier

Example: 456
taskNamestring

Task name

Example: "Financial Statement Review"
datestring(date)

Date of time entry

Example: "2024-11-20T00:00:00Z"
startTimestring(date-time)

Start time of work

Example: "2024-11-20T09:00:00Z"
endTimestring(date-time)

End time of work

Example: "2024-11-20T17:00:00Z"
durationnumber(decimal)

Total duration in hours

Example: 8
billableHoursnumber(decimal)

Billable hours

Example: 8
nonBillableHoursnumber(decimal)

Non-billable hours

Example: 0
hourlyRatenumber(decimal)

Hourly rate for this time entry

Example: 250
billableAmountnumber(decimal)

Total billable amount

Example: 2000
currencystring

Currency code

Example: "USD"
notesstring

Additional notes about the time entry

Example: "Completed comprehensive review of Q4 financial statements including variance analysis"
approvalHistoryArray of objects

Approval history for this time entry

createdAtstring(date-time)

Time entry creation timestamp

Example: "2024-11-20T17:30:00Z"
updatedAtstring(date-time)

Last update timestamp

Example: "2024-11-21T10:30:00Z"
Response
application/json
{ "id": 89012, "description": "Financial statement review and analysis", "status": "PENDING_APPROVAL", "type": "BILLABLE", "staffId": 123, "staffName": "John Smith", "clientId": 789, "clientName": "Acme Corporation", "projectId": 67890, "projectName": "Q4 Financial Audit", "taskId": 456, "taskName": "Financial Statement Review", "date": "2024-11-20T00:00:00Z", "startTime": "2024-11-20T09:00:00Z", "endTime": "2024-11-20T17:00:00Z", "duration": 8, "billableHours": 8, "nonBillableHours": 0, "hourlyRate": 250, "billableAmount": 2000, "currency": "USD", "notes": "Completed comprehensive review of Q4 financial statements including variance analysis", "approvalHistory": [ {} ], "createdAt": "2024-11-20T17:30:00Z", "updatedAt": "2024-11-21T10:30:00Z" }

✉️ Engagement

Create, send, and track engagement.

Operations

🛤 Last Mile

Handle the final delivery stage and client closing processes.