Invoice
An Invoice records a billing transaction for an Organisation. Each invoice contains line items, tax calculations, and a short-lease URL to download the PDF.
Implements: Node
Fields
| Field | Type | Description |
|---|---|---|
id | ID! | Unique identifier |
invoiceNumber | Int | Invoice number |
created | AWSDateTime | When the invoice was created |
supplyDate | AWSDateTime | Supply date (if different from created) |
currency | CURRENCY | GBP, EURO, or USD |
paymentSystem | PAYMENTSYSTEM | Payment method used |
taxRate | Float | Tax rate applied |
subTotal | Float | Subtotal before tax |
totalIncTax | Float | Total including tax |
creditReason | String | Reason if this is a credit note |
customerName | String | Customer name at time of invoice |
address1 | String | Address line 1 |
address2 | String | Address line 2 |
address3 | String | Address line 3 |
address4 | String | Address line 4 |
address5 | String | Address line 5 |
postcode | String | Postal code |
link | String | Short-lease URL to download the invoice PDF |
Relationships
| Field | Type | Description |
|---|---|---|
billing | Billing | The billing record this invoice belongs to |
Connections
lineItemConnection
Line items on this invoice. Supports cursor-based pagination.
| Argument | Type | Description |
|---|---|---|
first | Int | Number of items |
after | ID | Pagination cursor |
Query
query GetInvoice($invoiceId: ID) {
invoice(id: $invoiceId) {
id
invoiceNumber
created
subTotal
totalIncTax
link
}
}
Example
Full invoice with line items (based on the Legalesign Console app):
query GetInvoiceDetails($invoiceId: ID) {
invoice(id: $invoiceId) {
id
created
supplyDate
currency
paymentSystem
invoiceNumber
taxRate
subTotal
totalIncTax
creditReason
customerName
address1
address2
address3
address4
address5
postcode
link
lineItemConnection {
lineItems {
id
lineType
description
rate
units
subTotal
absorb
notAbsorbable
}
}
}
}