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

List staff

Request

Staff directory and human resource management with organizational structure

This comprehensive HR endpoint provides complete staff management including:

  • Employee directory with advanced search capabilities
  • Department and organizational structure integration
  • Role-based staff categorization and filtering
  • Active/inactive employee status management
  • Multi-field name search with partial matching

HR Management Capabilities:

  • Complete employee directory with contact information
  • Department-based organizational structure tracking
  • Staff type and role classification system
  • Active employee status for current workforce analysis
  • Employee search across first and last names

Organizational Features:

  • Department hierarchy and staff allocation
  • Role-based access and staff type categorization
  • Employee status management (active/inactive)
  • Contact information and communication data
  • Staff reference and external system integration

Search and Filter Options:

  • Multi-field name search (first name, last name)
  • Department-based staff filtering
  • Active status filtering for current employees
  • Role and staff type categorization
  • Alphabetical sorting for directory listings

Business Applications:

  • Employee directory and contact management
  • HR reporting and organizational analysis
  • Department staff allocation and planning
  • Employee onboarding and management workflows
  • Integration with external HR and payroll systems

Directory Features:

  • Complete contact information management
  • Department and role relationship tracking
  • Staff reference system for external integration
  • Employee status and lifecycle management

Real Example:

curl --location 'https://{{host}}/v1/staff' \
--data '{
  "pageSize": 25,
  "page": 0
}'

Permissions:

Security
BearerAuth
Bodyapplication/json
pageSizeinteger[ 1 .. 1000 ]

Maximum number of staff records to return

Default 25
Example: 25
pageinteger>= 0

Page number for pagination (0-based)

Default 0
Example: 0
isActiveboolean

Filter by active employee status

Example: true
departmentIdinteger

Filter staff by specific department ID

Example: 7
nameSearchstring

Search term for first and last names (use % for wildcard)

Example: "%"
sortOrderstring

Sort order for staff names

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

Responses

Successfully retrieved staff records

Bodyapplication/json
deid_staffArray of objects
deid_staff_aggregateobject
Response
application/json
{ "deid_staff": [ {}, {}, {} ], "deid_staff_aggregate": { "aggregate": {} } }

Search staff

Request

Advanced staff filtering with custom GraphQL where clauses and dynamic ordering

Provides flexible, enterprise-grade filtering for staff directory queries with boolean logic, relationship traversal, and multi-field ordering.

Key capabilities include boolean operators (_and, _or, _not), text matching (_ilike), comparison operators (_gt, _gte, _lt, _lte, _eq, _neq), array operators (_in, _nin), and nested/related filtering (e.g., by office or manager).

Real Example:

curl --location 'https://{{host}}/v1/staff/search' \
--header 'Authorization: bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
  "pageSize": 1,
  "where": {
    "_and": [
      {
        "_or": [
          {
            "firstName": {
              "_ilike": "%john%"
            }
          },
          {
            "lastName": {
              "_ilike": "%doe%"
            }
          }
        ]
      },
      {
        "active": {
          "_eq": true
        }
      },
      {
        "createdAt": {
          "_gte": "1900-01-01T00:00:00Z"
        }
      },
      {
        "deptId": {
          "_in": [
            1,
            2,
            3
          ]
        }
      }
    ]
  },
  "orderBy": [
    {
      "lastName": "asc"
    },
    {
      "firstName": "asc"
    }
  ]
}'
Security
BearerAuth
Bodyapplication/json
limitinteger[ 1 .. 1000 ]

Maximum number of staff to return

Default 1
Example: 1
whereobject

GraphQL-style where clause for complex staff filtering

Example: {"_and":[{"_or":[{"firstName":{"_ilike":"%john%"}},{"lastName":{"_ilike":"%doe%"}}]},{"active":{"_eq":true}},{"createdAt":{"_gte":"1900-01-01T00:00:00Z"}},{"deptId":{"_in":[1,2,3]}}]}
orderByArray of objects

Dynamic ordering specifications with multiple fields

Example: [{"lastName":"asc"},{"firstName":"asc"}]
curl -i -X POST \
  https://api.doc.aiwyn.ai/_mock/bundle/gql/v1/staff/search \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "limit": 1,
    "where": {
      "_and": [
        {
          "_or": [
            {
              "firstName": {
                "_ilike": "%john%"
              }
            },
            {
              "lastName": {
                "_ilike": "%doe%"
              }
            }
          ]
        },
        {
          "active": {
            "_eq": true
          }
        },
        {
          "createdAt": {
            "_gte": "1900-01-01T00:00:00Z"
          }
        },
        {
          "deptId": {
            "_in": [
              1,
              2,
              3
            ]
          }
        }
      ]
    },
    "orderBy": [
      {
        "lastName": "asc"
      },
      {
        "firstName": "asc"
      }
    ]
  }'

Responses

Successfully retrieved filtered staff with dynamic ordering

Bodyapplication/json
staffArray of objects
totalobject
Response
application/json
{ "staff": [ {} ], "total": { "aggregate": {} } }

Get staff member by ID

Request

Retrieve a specific staff member by their unique identifier

This endpoint provides basic staff member information including:

  • Staff member identification and PMS reference
  • Personal details (name and email)
  • Employment status and organizational structure
  • Department and office assignments
  • Management hierarchy information

Staff Details Include:

  • Staff member ID and PMS reference
  • Personal information (first name, last name, email)
  • Active status indicator
  • Department and office identifiers
  • Job title and staff type (when available)
  • Manager assignment (when applicable)

Business Applications:

  • Staff member lookup and verification
  • Organizational structure queries
  • Basic staff information retrieval
  • Department and office staff management

Real Example:

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

Response Example:

{
  "id": 202,
  "pmsRef": "2254",
  "firstName": "Holley",
  "lastName": "Abbott",
  "email": "ena.toy@hotmail.com",
  "active": true,
  "deptId": 8,
  "jobTitle": null,
  "type": null,
  "officeId": 2,
  "staffManagerId": null
}
Security
BearerAuth
Path
idinteger>= 1required

Unique identifier of the staff member

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

Responses

Staff member details retrieved successfully

Bodyapplication/json
idinteger

Unique staff member identifier

Example: 202
pmsRefstring

PMS reference identifier

Example: "2254"
firstNamestring

Staff member first name

Example: "Holley"
lastNamestring

Staff member last name

Example: "Abbott"
emailstring(email)

Primary email address

Example: "ena.toy@hotmail.com"
activeboolean

Whether the staff member is active

Example: true
deptIdinteger

Department identifier

Example: 8
jobTitlestring or null

Job title of the staff member

Example: null
typestring or null

Staff member type or category

Example: null
officeIdinteger

Office identifier where the staff member is based

Example: 2
staffManagerIdinteger or null

Identifier of the staff member's manager

Example: null
Response
application/json
{ "id": 202, "pmsRef": "2254", "firstName": "Holley", "lastName": "Abbott", "email": "ena.toy@hotmail.com", "active": true, "deptId": 8, "jobTitle": null, "type": null, "officeId": 2, "staffManagerId": null }

💳 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

🛤 Last Mile

Handle the final delivery stage and client closing processes.