# Get an invoice Retrieve an invoice by ID. The response includes payments, credits, and document info. Endpoint: GET /invoices/{id} Version: 1.0.0 Security: BearerAuth ## Path parameters: - `id` (string, required) Resource ID (UUID) or client key Example: "550e8400-e29b-41d4-a716-446655440000" ## Query parameters: - `by` (string) Specify lookup type for faster retrieval. If omitted, defaults to looking up by ID first, then falls back to client key if not found. Use by=key when you know you're providing a client key for best performance. Enum: "id", "key" ## Response 200 fields (application/json): - `id` (string, required) Example: "550e8400-e29b-41d4-a716-446655440000" - `friendlyId` (string, required) Human-readable invoice ID Example: "INV-00001" - `key` (string,null) Client-defined key - `orderId` (string) Associated order ID - `orderKey` (string,null) Order friendly ID - `shipmentId` (string) Associated shipment ID - `shipmentKey` (string,null) Shipment friendly ID - `customer` (object) Enhanced reference to a customer resource (returned in responses). Includes full customer details in addition to id/key. Note: Does NOT include nested references (paymentTerm, contacts, etc.) to prevent recursion. Maximum nesting depth: 1 level. - `customer.id` (string, required) Customer UUID Example: "550e8400-e29b-41d4-a716-446655440000" - `customer.key` (string,null) Client-defined reference ID if set Example: "ERP-CUSTOMER-ACME" - `customer.name` (string, required) Customer company name Example: "Acme Manufacturing Corp" - `customer.friendlyId` (string, required) Human-readable customer identifier Example: "A123456" - `customer.status` (string, required) Customer status Enum: "PROSPECT", "ACTIVE", "INACTIVE", "CHURNED" - `customer.phoneNumber` (string,null) Primary phone number Example: "+1-555-123-4567" - `customer.website` (string,null) Customer website URL Example: "https://acme-manufacturing.com" - `customer.createdAt` (string, required) When the customer was created Example: "2025-01-15T10:00:00Z" - `customer.updatedAt` (string, required) When the customer was last updated Example: "2025-01-15T14:30:00Z" - `customer.deletedAt` (string,null) When the customer was soft deleted (null if active) - `status` (string, required) Current status of the invoice. - DRAFT: Invoice record exists but not finalized - AWAITING_PAYMENT: Invoice finalized, awaiting payment - PARTIALLY_PAID: Some payments received, balance remains - PAID: Fully paid - VOIDED: Invoice cancelled/voided Enum: "DRAFT", "AWAITING_PAYMENT", "PARTIALLY_PAID", "PAID", "VOIDED" - `invoiceDate` (string, required) Date invoice was issued - `dueDate` (string,null) Payment due date - `amount` (number, required) Total invoice amount - `currency` (string,null) Currency code (USD, CAD) Example: "USD" - `reference` (string,null) External reference number - `amountPaid` (number) Total payments received - `amountOwed` (number) Outstanding balance - `creditsApplied` (number,null) Total credits applied - `paymentTerm` (object) Enhanced reference to a payment term resource (returned in responses). Includes full payment term details in addition to id/key. - `paymentTerm.id` (string, required) Payment term UUID Example: "550e8400-e29b-41d4-a716-446655440000" - `paymentTerm.name` (string, required) Payment term name Example: "Net 30" - `paymentTerm.description` (string,null) Payment term description or notes Example: "Payment due 30 days from invoice date" - `paymentTerm.days` (integer,null) Number of days until payment is due Example: 30 - `paymentTerm.quickPayFee` (number,null) Quick pay fee percentage (e.g., 0.05 for 5%) Example: 0.05 - `paymentTerm.apOnly` (boolean,null) Whether this payment term is for accounts payable only - `paymentTerm.doNotUse` (boolean,null) Flag to prevent using this payment term for new transactions - `paymentTerm.createdAt` (string, required) When the payment term was created Example: "2025-01-15T10:00:00Z" - `paymentTerm.updatedAt` (string, required) When the payment term was last updated Example: "2025-01-15T14:30:00Z" - `paymentTerm.deletedAt` (string,null) When the payment term was soft deleted (null if active) - `payments` (array) Payments applied to this invoice - `payments.paymentGroupId` (string) - `payments.amount` (number) Amount applied to this invoice - `payments.paymentDate` (string) - `payments.reference` (string,null) Check number, transaction ID, etc. - `payments.paymentMethodType` (string,null) Payment method (check, ach_wire, etc.) - `credits` (array) Credits applied to this invoice - `credits.creditMemoId` (string) - `credits.creditMemoReference` (string,null) - `credits.amount` (number) Credit amount applied - `credits.appliedAt` (string) - `factorName` (string) Factoring provider for invoice financing. - DENIM: Denim factoring - HAULPAY: HaulPay factoring Enum: "DENIM", "HAULPAY" - `factorJobId` (string,null) External factoring job ID - `factorStatus` (string,null) Current factoring status - `qboId` (string,null) QuickBooks Online invoice ID - `documentId` (string,null) Generated invoice PDF document ID - `documentUrl` (string,null) Download URL for invoice PDF - `createdAt` (string, required) - `updatedAt` (string,null) ## Response 401 fields (application/json): - `error` (string, required) Error code - `message` (string, required) Human-readable error message ## Response 404 fields (application/json): - `error` (string, required) Error code - `message` (string, required) Human-readable error message