# Get draft invoice by ID Retrieve a specific draft invoice by its unique identifier This endpoint provides detailed draft invoice information including: - Complete draft invoice details and line items - Draft status and review information - Client and project relationships - Tax calculations and compliance data - Review history and approval workflow - Document generation and delivery preparation Draft Invoice Management Features: - Draft invoice lifecycle tracking - Review and approval workflow - Tax calculation and compliance - Client relationship integration - Document preparation and delivery setup Draft Invoice Details Include: - Draft invoice number and reference - Draft status and review status - Client and project information - Line items and amounts - Tax calculations - Review history Business Applications: - Draft invoice review and approval - Tax compliance verification - Client billing preparation - Revenue recognition planning - Document generation preparation Real Example: bash curl --location 'https://{{host}}/v1/draft_invoice/56789' \ --header 'Authorization: bearer {{token}}' \ --header 'Content-Type: application/json' Response Example: json { "id": 56789, "draftNumber": "DRAFT-2024-001", "reference": "Q4-AUDIT-DRAFT-2024", "status": "UNDER_REVIEW", "reviewStatus": "PENDING_APPROVAL", "clientId": 789, "clientName": "Acme Corporation", "clientEmail": "billing@acme.com", "projectId": 67890, "projectName": "Q4 Financial Audit", "preparedDate": "2024-12-01T00:00:00Z", "proposedIssueDate": "2024-12-15T00:00:00Z", "proposedDueDate": "2025-01-15T23:59:59Z", "subtotal": 20000.00, "taxAmount": 2000.00, "totalAmount": 22000.00, "currency": "USD", "lineItems": [ { "id": 1, "description": "Financial Statement Audit", "quantity": 80, "unitPrice": 250.00, "amount": 20000.00, "taxRate": 0.10, "notes": "Includes fieldwork and report preparation" } ], "reviewHistory": [ { "id": 1, "reviewerId": 123, "reviewerName": "John Smith", "reviewDate": "2024-12-05T10:30:00Z", "status": "APPROVED", "comments": "All calculations verified and approved" }, { "id": 2, "reviewerId": 124, "reviewerName": "Jane Doe", "reviewDate": "2024-12-06T14:15:00Z", "status": "PENDING_APPROVAL", "comments": "Pending final review" } ], "notes": "Draft invoice for Q4 audit services - pending final review", "createdAt": "2024-12-01T09:00:00Z", "updatedAt": "2024-12-06T14:15:00Z" } Endpoint: GET /gql/v1/draft_invoice/{id} Version: 1.0.0 Security: BearerAuth ## Path parameters: - `id` (integer, required) Unique identifier of the draft invoice Example: 56789 ## Response 200 fields (application/json): - `id` (integer) Unique draft invoice identifier Example: 56789 - `draftNumber` (string) Draft invoice number Example: "DRAFT-2024-001" - `reference` (string) Draft invoice reference or description Example: "Q4-AUDIT-DRAFT-2024" - `status` (string) Draft invoice status Enum: "DRAFT", "UNDER_REVIEW", "APPROVED", "REJECTED", "CONVERTED" - `reviewStatus` (string) Review status Enum: "NOT_STARTED", "IN_REVIEW", "PENDING_APPROVAL", "APPROVED", "REJECTED" - `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" - `preparedDate` (string) Date when draft was prepared Example: "2024-12-01T00:00:00Z" - `proposedIssueDate` (string) Proposed invoice issue date Example: "2024-12-15T00:00:00Z" - `proposedDueDate` (string) Proposed invoice due date Example: "2025-01-15T23:59:59Z" - `subtotal` (number) Draft subtotal before tax Example: 20000 - `taxAmount` (number) Total tax amount Example: 2000 - `totalAmount` (number) Total draft amount including tax Example: 22000 - `currency` (string) Draft currency code Example: "USD" - `lineItems` (array) Draft 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 - `lineItems.notes` (string) Additional notes for line item Example: "Includes fieldwork and report preparation" - `reviewHistory` (array) Review history for this draft invoice - `reviewHistory.id` (integer) Review record identifier Example: 1 - `reviewHistory.reviewerId` (integer) Reviewer identifier Example: 123 - `reviewHistory.reviewerName` (string) Reviewer name Example: "John Smith" - `reviewHistory.reviewDate` (string) Review date Example: "2024-12-05T10:30:00Z" - `reviewHistory.status` (string) Review status Enum: "APPROVED", "REJECTED", "PENDING_APPROVAL", "COMMENTS" - `reviewHistory.comments` (string) Review comments Example: "All calculations verified and approved" - `notes` (string) Additional notes or terms Example: "Draft invoice for Q4 audit services - pending final review" - `createdAt` (string) Draft invoice creation timestamp Example: "2024-12-01T09:00:00Z" - `updatedAt` (string) Last update timestamp Example: "2024-12-06T14:15:00Z" ## Response 404 fields (application/json): - `error` (string) Example: "Draft invoice not found" - `message` (string) Example: "Draft invoice with ID 56789 does not exist" ## Response 401 fields ## Response 403 fields ## Response 500 fields