Authentication endpoints for obtaining access tokens and managing API keys.
Aiwyn API (1.0.0)
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.
- 🔐 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
Request
Retrieve all clients with basic pagination support
This endpoint provides simple client listing capabilities without any filtering restrictions. It's designed for scenarios where you need to browse through the entire client database with standard pagination controls.
Key Features:
- Basic pagination with configurable page sizes (default: 50 records)
- Default sorting by client name (ascending) then creation date (descending)
- Complete client information including contact details and staff assignments
- Total count aggregation for pagination metadata
- No filtering logic - returns all clients in the system
- Optimized for dashboard displays and data export operations
Performance Considerations:
- Default 50-record pageSize prevents memory issues with large datasets
- Indexed sorting on name and createdAt fields for optimal query performance
- Consider using filtered queries for large client databases (1000+ records)
- Suitable for datasets up to 10,000 clients with reasonable response times
Real Example:
curl --location 'https://{{host}}/v1/clients' \
--data '{
"pageSize": 25,
"page": 0
}'- Mock serverhttps://api.doc.aiwyn.ai/_mock/bundle/gql/v1/clients
- Staging Environment (Test Data)https://demo.api.aiwyn.ai/gql/v1/clients
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.doc.aiwyn.ai/_mock/bundle/gql/v1/clients \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"pageSize": 25,
"page": 0
}'{ "clients": [ { … }, { … }, { … }, { … }, { … } ], "total": { "aggregate": { … } } }
Request
Advanced client filtering with custom GraphQL where clauses and dynamic ordering
This query provides maximum flexibility for client data retrieval through custom GraphQL-style where clause construction and dynamic ordering specifications. It's designed for complex business requirements that need sophisticated filtering logic.
Key Features:
- Custom GraphQL where clause construction for unlimited filtering combinations
- Dynamic order_by specifications supporting multi-field sorting with custom directions
- Advanced boolean logic combining multiple filter conditions with _and, _or, _not
- Relationship-based filtering across connected entities (contacts, staff assignments)
- Custom pagination with flexible pageSize and page controls for any result set size
- Full access to GraphQL query capabilities through REST interface abstraction
- Enterprise-grade filtering supporting complex business logic requirements
- Support for nested queries and conditional logic patterns
Advanced Filtering Capabilities:
- Boolean Logic: _and, _or, _not operators for complex condition combinations
- Text Operations: _like, _ilike, _regex for pattern matching and search
- Comparison Operators: _gt, _gte, _lt, _lte, _eq, _neq for numerical/date comparisons
- Array Operations: _in, _nin for multi-value filtering and inclusion/exclusion
- Null Handling: _is_null for empty value detection and filtering
- Relationship Traversal: Filter on connected entities like contacts and staff
- Date Ranges: Precision timestamp filtering for time-based analysis
- Case Sensitivity: Both case-sensitive and case-insensitive text matching
Dynamic Ordering Options:
- Multi-field Sorting: Order by multiple columns with individual sort directions
- Relationship Sorting: Sort by connected entity fields (staff names, contact info)
- Custom Directions: Mix ascending and descending order across different fields
- Priority Ordering: Define primary, secondary, tertiary sort criteria
- Date-based Sorting: createdAt, updatedAt for chronological ordering
- Text Sorting: Alphabetical ordering with locale-aware collation
Real Example:
curl --location 'https://{{host}}/v1/clients/search' \
--header 'Authorization: bearer {{token}} \
--header 'Content-Type: application/json' \
--data '{
"pageSize": 1,
"where": {
"_and": [
{
"_or": [
{
"name": {
"_ilike": "%tech%"
}
},
{
"clientRef": {
"_ilike": "%45%"
}
}
]
},
{
"active": {
"_eq": true
}
},
{
"createdAt": {
"_gte": "1900-01-01T00:00:00Z"
}
},
{
"partnerStaffId": {
"_in": [
5,
6,
7,
8
]
}
}
]
},
"orderBy": [
{
"name": "asc"
},
{
"createdAt": "desc"
}
]
}'GraphQL-style where clause for complex filtering
- Mock serverhttps://api.doc.aiwyn.ai/_mock/bundle/gql/v1/clients/search
- Staging Environment (Test Data)https://demo.api.aiwyn.ai/gql/v1/clients/search
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.doc.aiwyn.ai/_mock/bundle/gql/v1/clients/search \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"limit": 1,
"where": {
"_and": [
{
"_or": [
{
"name": {
"_ilike": "%tech%"
}
},
{
"clientRef": {
"_ilike": "%45%"
}
}
]
},
{
"active": {
"_eq": true
}
},
{
"createdAt": {
"_gte": "1900-01-01T00:00:00Z"
}
},
{
"partnerStaffId": {
"_in": [
5,
6,
7,
8
]
}
}
]
},
"orderBy": [
{
"name": "asc"
},
{
"createdAt": "desc"
}
]
}'{ "clients": [ { … }, { … } ], "total": { "aggregate": { … } } }
Request
Retrieve a specific client by its unique identifier
This endpoint provides detailed client information including:
- Complete client details and demographics
- Client status and relationship information
- Contact and address information
- Engagement and project portfolio
- Financial and billing information
- Industry and business classification
Client Management Features:
- Client lifecycle tracking
- Relationship management
- Contact and address management
- Engagement portfolio oversight
- Financial and billing setup
Client Details Include:
- Client name and demographics
- Client status and type
- Contact information
- Address and location
- Engagement portfolio
- Financial information
Business Applications:
- Client relationship management
- Engagement portfolio analysis
- Financial performance tracking
- Contact management
- Business development planning
Real Example:
curl --location 'https://{{host}}/v1/client/789' \
--header 'Authorization: bearer {{token}}' \
--header 'Content-Type: application/json'Response Example:
{
"id": 789,
"name": "Acme Corporation",
"legalName": "Acme Corporation, Inc.",
"status": "ACTIVE",
"type": "CORPORATE",
"industry": "MANUFACTURING",
"size": "LARGE",
"website": "https://www.acme.com",
"taxId": "12-3456789",
"phone": "+1-555-0123",
"email": "info@acme.com",
"address": {
"street": "123 Business Ave",
"city": "New York",
"state": "NY",
"zipCode": "10001",
"country": "USA"
},
"billingAddress": {
"street": "456 Finance Blvd",
"city": "New York",
"state": "NY",
"zipCode": "10002",
"country": "USA"
},
"primaryContact": {
"id": 23456,
"name": "John Smith",
"title": "Chief Financial Officer",
"email": "john.smith@acme.com",
"phone": "+1-555-0123"
},
"engagements": [
{
"id": 34567,
"name": "Annual Audit Engagement 2024",
"status": "ACTIVE",
"type": "AUDIT",
"startDate": "2024-01-01T00:00:00Z",
"endDate": "2024-12-31T23:59:59Z"
}
],
"financialSummary": {
"totalRevenue": 150000.00,
"outstandingBalance": 25000.00,
"currency": "USD",
"lastPaymentDate": "2024-11-15T10:30:00Z"
},
"notes": "Long-term client with excellent payment history and strong relationship",
"createdAt": "2020-01-15T10:00:00Z",
"updatedAt": "2024-11-20T14:30:00Z"
}- Mock serverhttps://api.doc.aiwyn.ai/_mock/bundle/gql/v1/client/{id}
- Staging Environment (Test Data)https://demo.api.aiwyn.ai/gql/v1/client/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://api.doc.aiwyn.ai/_mock/bundle/gql/v1/client/789 \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Client details retrieved successfully
Industry classification
Additional notes about the client
{ "id": 789, "name": "Acme Corporation", "legalName": "Acme Corporation, Inc.", "status": "ACTIVE", "type": "CORPORATE", "industry": "MANUFACTURING", "size": "LARGE", "website": "https://www.acme.com", "taxId": "12-3456789", "phone": "+1-555-0123", "email": "info@acme.com", "address": { "street": "123 Business Ave", "city": "New York", "state": "NY", "zipCode": "10001", "country": "USA" }, "billingAddress": { "street": "456 Finance Blvd", "city": "New York", "state": "NY", "zipCode": "10002", "country": "USA" }, "primaryContact": { "id": 23456, "name": "John Smith", "title": "Chief Financial Officer", "email": "john.smith@acme.com", "phone": "+1-555-0123" }, "engagements": [ { … } ], "financialSummary": { "totalRevenue": 150000, "outstandingBalance": 25000, "currency": "USD", "lastPaymentDate": "2024-11-15T10:30:00Z" }, "notes": "Long-term client with excellent payment history and strong relationship", "createdAt": "2020-01-15T10:00:00Z", "updatedAt": "2024-11-20T14:30:00Z" }