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 invoices with comprehensive filtering and financial data
This endpoint delivers complete invoice management functionality with:
- Advanced pagination for large invoice datasets
- Multi-dimensional filtering (client, status, date ranges)
- Integration with AR transactions for complete financial context
- Tax, interest, and payment status tracking
- Client relationship data for each invoice
- Aggregate counting for reporting and analytics
Key Financial Features:
- Invoice status tracking (PENDING, PAID, OVERDUE, POSTED, etc.)
- Tax and interest calculations included
- Due date monitoring for collections management
- AR transaction linkage for payment reconciliation
- Amount and allocation tracking for financial reporting
Filtering Capabilities:
- Client-specific invoice retrieval
- Status-based filtering for workflow management
- Date range queries for period reporting
- Sorting by creation date or transaction date
Business Applications:
- Accounts receivable management and aging reports
- Client billing history and statement generation
- Collections management and overdue tracking
- Financial reporting and revenue recognition
- Payment reconciliation and allocation tracking
Real Example:
curl --location 'https://{{host}}/v1/invoices' \
--header 'Authorization: bearer {{token}} \
--header 'Content-Type: application/json' \
--data '{
"pageSize": 25,
"page": 0
}'Filter by invoice status
- Mock serverhttps://api.doc.aiwyn.ai/_mock/bundle/gql/v1/invoices
- Staging Environment (Test Data)https://demo.api.aiwyn.ai/gql/v1/invoices
- 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/invoices \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"pageSize": 25,
"page": 0
}'{ "deid_invoice": [ { … }, { … }, { … } ], "deid_invoice_aggregate": { "aggregate": { … } } }
Request
Advanced invoice filtering with custom GraphQL where clauses and dynamic ordering
Supports invoiceNumber text matching, status filtering, and date ranges.
Real Example:
curl --location 'https://{{host}}/v1/invoices/search' \
--header 'Authorization: bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
"pageSize": 1,
"where": {
"_and": [
{
"_or": [
{
"invoiceNumber": {
"_ilike": "%2024%"
}
},
{
"description": {
"_ilike": "%service%"
}
}
]
},
{
"status": {
"_in": ["POSTED", "CLOSED"]
}
},
{
"createdAt": {
"_gte": "1900-01-01T00:00:00Z"
}
},
{
"dueDate": {
"_gte": "2024-01-01T00:00:00Z"
}
}
]
},
"orderBy": [
{
"invoiceNumber": "asc"
},
{
"createdAt": "desc"
}
]
}'GraphQL-style where clause for complex invoice filtering
- Mock serverhttps://api.doc.aiwyn.ai/_mock/bundle/gql/v1/invoices/search
- Staging Environment (Test Data)https://demo.api.aiwyn.ai/gql/v1/invoices/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/invoices/search \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"pageSize": 1,
"where": {
"_and": [
{
"_or": [
{
"invoiceNumber": {
"_ilike": "%2024%"
}
},
{
"description": {
"_ilike": "%service%"
}
}
]
},
{
"status": {
"_in": [
"POSTED",
"CLOSED"
]
}
},
{
"createdAt": {
"_gte": "1900-01-01T00:00:00Z"
}
},
{
"dueDate": {
"_gte": "2024-01-01T00:00:00Z"
}
}
]
},
"orderBy": [
{
"invoiceNumber": "asc"
},
{
"createdAt": "desc"
}
]
}'Request
Retrieve a specific invoice by its unique identifier
This endpoint provides detailed invoice information including:
- Complete invoice details and line items
- Invoice status and payment tracking
- Client and project relationships
- Tax calculations and compliance data
- Payment history and outstanding balances
- Document generation and delivery status
Invoice Management Features:
- Invoice lifecycle tracking
- Payment status monitoring
- Tax calculation and compliance
- Client relationship integration
- Document generation and delivery
Invoice Details Include:
- Invoice number and reference
- Invoice status and payment status
- Client and project information
- Line items and amounts
- Tax calculations
- Payment history
Business Applications:
- Invoice status monitoring
- Payment tracking and reconciliation
- Client billing history
- Revenue recognition analysis
- Tax compliance reporting
Real Example:
curl --location 'https://{{host}}/v1/invoice/45678' \
--header 'Authorization: bearer {{token}}' \
--header 'Content-Type: application/json'Response Example:
{
"id": 45678,
"invoiceNumber": "INV-2024-001",
"reference": "Q4-AUDIT-2024",
"status": "SENT",
"paymentStatus": "PARTIALLY_PAID",
"clientId": 789,
"clientName": "Acme Corporation",
"clientEmail": "billing@acme.com",
"projectId": 67890,
"projectName": "Q4 Financial Audit",
"issueDate": "2024-12-01T00:00:00Z",
"dueDate": "2024-12-31T23:59:59Z",
"subtotal": 20000.00,
"taxAmount": 2000.00,
"totalAmount": 22000.00,
"currency": "USD",
"paidAmount": 15000.00,
"outstandingAmount": 7000.00,
"lineItems": [
{
"id": 1,
"description": "Financial Statement Audit",
"quantity": 80,
"unitPrice": 250.00,
"amount": 20000.00,
"taxRate": 0.10
}
],
"payments": [
{
"id": 12345,
"amount": 15000.00,
"paymentDate": "2024-12-15T10:30:00Z",
"paymentMethod": "CREDIT_CARD",
"status": "CONFIRMED"
}
],
"notes": "Payment due within 30 days of invoice date",
"createdAt": "2024-12-01T09:00:00Z",
"updatedAt": "2024-12-15T10:30:00Z"
}- Mock serverhttps://api.doc.aiwyn.ai/_mock/bundle/gql/v1/invoice/{id}
- Staging Environment (Test Data)https://demo.api.aiwyn.ai/gql/v1/invoice/{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/invoice/45678 \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'{ "id": 45678, "invoiceNumber": "INV-2024-001", "reference": "Q4-AUDIT-2024", "status": "SENT", "paymentStatus": "PARTIALLY_PAID", "clientId": 789, "clientName": "Acme Corporation", "clientEmail": "billing@acme.com", "projectId": 67890, "projectName": "Q4 Financial Audit", "issueDate": "2024-12-01T00:00:00Z", "dueDate": "2024-12-31T23:59:59Z", "subtotal": 20000, "taxAmount": 2000, "totalAmount": 22000, "currency": "USD", "paidAmount": 15000, "outstandingAmount": 7000, "lineItems": [ { … } ], "payments": [ { … } ], "notes": "Payment due within 30 days of invoice date", "createdAt": "2024-12-01T09:00:00Z", "updatedAt": "2024-12-15T10:30:00Z" }