# Get invoice by ID 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: bash curl --location 'https://{{host}}/v1/invoice/45678' \ --header 'Authorization: bearer {{token}}' \ --header 'Content-Type: application/json' Response Example: json { "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" } Endpoint: GET /gql/v1/invoice/{id} Version: 1.0.0 Security: BearerAuth ## Path parameters: - `id` (integer, required) Unique identifier of the invoice Example: 45678 ## Response 200 fields (application/json): - `id` (integer) Unique invoice identifier Example: 45678 - `invoiceNumber` (string) Invoice number Example: "INV-2024-001" - `reference` (string) Invoice reference or description Example: "Q4-AUDIT-2024" - `status` (string) Invoice status Enum: "DRAFT", "SENT", "VIEWED", "PAID", "OVERDUE", "CANCELLED" - `paymentStatus` (string) Payment status Enum: "UNPAID", "PARTIALLY_PAID", "PAID", "OVERDUE" - `clientId` (integer) Associated client identifier Example: 789 - `clientName` (string) Client name Example: "Acme Corporation" - `clientEmail` (string) Client billing email Example: "billing@acme.com" - `projectId` (integer) Associated project identifier Example: 67890 - `projectName` (string) Project name Example: "Q4 Financial Audit" - `issueDate` (string) Invoice issue date Example: "2024-12-01T00:00:00Z" - `dueDate` (string) Invoice due date Example: "2024-12-31T23:59:59Z" - `subtotal` (number) Invoice subtotal before tax Example: 20000 - `taxAmount` (number) Total tax amount Example: 2000 - `totalAmount` (number) Total invoice amount including tax Example: 22000 - `currency` (string) Invoice currency code Example: "USD" - `paidAmount` (number) Total amount paid to date Example: 15000 - `outstandingAmount` (number) Outstanding balance Example: 7000 - `lineItems` (array) Invoice line items - `lineItems.id` (integer) Line item identifier Example: 1 - `lineItems.description` (string) Line item description Example: "Financial Statement Audit" - `lineItems.quantity` (number) Quantity of units Example: 80 - `lineItems.unitPrice` (number) Unit price Example: 250 - `lineItems.amount` (number) Line item total amount Example: 20000 - `lineItems.taxRate` (number) Tax rate applied Example: 0.1 - `payments` (array) Payment history for this invoice - `payments.id` (integer) Payment identifier Example: 12345 - `payments.amount` (number) Payment amount Example: 15000 - `payments.paymentDate` (string) Payment date Example: "2024-12-15T10:30:00Z" - `payments.paymentMethod` (string) Payment method used Enum: "CREDIT_CARD", "DEBIT_CARD", "ACH", "BANK_TRANSFER", "CHECK", "WIRE", "PAYPAL" - `payments.status` (string) Payment status Enum: "PENDING", "CONFIRMED", "FAILED", "CANCELLED" - `notes` (string) Additional notes or terms Example: "Payment due within 30 days of invoice date" - `createdAt` (string) Invoice creation timestamp Example: "2024-12-01T09:00:00Z" - `updatedAt` (string) Last update timestamp Example: "2024-12-15T10:30:00Z" ## Response 404 fields (application/json): - `error` (string) Example: "Invoice not found" - `message` (string) Example: "Invoice with ID 45678 does not exist" ## Response 401 fields ## Response 403 fields ## Response 500 fields