Invoice Items
Invoice Item represents an individual line item on an Invoice
Schema​
InvoiceItem​
| Name | Type | Description | Example |
|---|---|---|---|
| id | ID | Unique identifier for invoice items | "ckmnpybisiy5x08abky4g2d1f" |
| createdAt | DateTime | When this invoice item was created | "2021-03-24 17:26:46.983Z" |
| updatedAt | DateTime | When this invoice item was updated | "2021-03-24 17:26:46.983Z" |
| description | string? | Description of the invoice item | 3/4" EMT |
| extPriceFloat | float? | EXT price of the item | 125.00 |
| extPriceFloatIncludingTax | float? | EXT price of the item inclusive of tax | 130.00 |
| hasException | boolean | Indicates whether the invoice item has any exceptions | true |
| invoice | Invoice? | Invoice associated with this item | See Invoice docs |
| invoiceId | ID | The ID of the invoice this item is attached to | "ckmnpybisiy5x08abky4g2d1f" |
| lineNumber | int | Number representing the index of the line item within it's invoice | 3 |
| notes | string? | Additional handwritten details attached to this item | "Set this aside." |
| shipQuantity | float? | Quantity of this item | 100 |
| unitPriceFloat | float? | Unit price of this item | 1.25 |
| unitsOfMeasure | string? | Unit of measurement for this item | EA |
| creditMemoItems | CreditMemoItem[] | Credit memo items associated with this invoice item | See CreditMemoItem |
| orderItems | Item[] | Order items associated with this invoice item | See Item docs |
| taxCode | string? | Tax code applicable to this invoice item | "CA" |
| taxRate | float? | Tax rate applied to this invoice item | 0.04 |
| phaseCode | string? | Phase code associated with this invoice item | "450" |
| costCategory | string? | Cost category code associated with this invoice item | "M" |
| glCode | GLCode? | GL code associated with this invoice item | "5000" |
Queries​
invoiceItem​
Get a single invoice item by ID.
Parameters​
| Name | Type | Description |
|---|---|---|
| id | ID | ID of the invoice item to fetch |
Response​
A single InvoiceItem.
Example Request​
query {
invoiceItem(id: "ckb91igzt01e90733giki0v0p") {
id
lineNumber
shipQuantity
unitPriceFloat
description
}
}
Example Response​
{
"id": "ckb91igzt01e90733giki0v0p",
"lineNumber": 1,
"shipQuantity": 100,
"unitPriceFloat": 1328.22,
"description": "3/4\" EMT",
}
invoiceItems​
Get the items on an invoice.
Parameters​
| Name | Type | Description |
|---|---|---|
| invoiceId | ID | ID of the invoice to retrieve items for |
Accepts all standard pagination parameters.
Allowed orderBy fields: createdAt, id, lineNumber, updatedAt.
Default (direction, orderBy): (lineNumber, ASC)
Allowed filter fields: createdAt, description, hasException, id, notes, updatedAt.
Response​
A list of InvoiceItem objects.
Example Request​
query {
invoiceItems(invoiceId: "ckb91igzt01e90733giki0v0p") {
id
lineNumber
shipQuantity
unitPriceFloat
description
}
}
Example Response​
[
{
"id": "ckb91igzt01e90733giki0v0p",
"lineNumber": 1,
"shipQuantity": 100,
"unitPriceFloat": 1328.22,
"description": "3/4\" EMT",
}
]
allInvoiceItems​
Get all invoice items across all invoices for your organization. This endpoint is designed for bulk data retrieval and data warehousing use cases, allowing you to fetch invoice items without needing to iterate through individual invoices.
Note: This query enforces a maximum limit of 2500 invoice items per request to maintain performance.
Parameters​
| Name | Type | Description |
|---|---|---|
| filter | InvoiceItemFilter? | Optional. Filter criteria for invoice items |
Accepts all standard pagination parameters.
Allowed orderBy fields: createdAt, description, hasException, id, invoiceId, lineNumber, notes, updatedAt.
Default (direction, orderBy): (createdAt, DESC)
Filter Options​
The filter parameter accepts an InvoiceItemFilter object with the following fields:
| Name | Type | Description |
|---|---|---|
| invoiceId | ID? | Filter items by a specific invoice ID |
| invoiceId_in | [ID!]? | Filter items by multiple invoice IDs |
| invoiceId_not_in | [ID!]? | Exclude items by invoice IDs |
| jobId | ID? | Filter items by a specific job ID (from the invoice's job) |
| jobId_in | [ID!]? | Filter items by multiple job IDs |
| jobId_not_in | [ID!]? | Exclude items by job IDs |
| vendorId | ID? | Filter items by a specific vendor ID (from the invoice's vendor) |
| vendorId_in | [ID!]? | Filter items by multiple vendor IDs |
| vendorId_not_in | [ID!]? | Exclude items by vendor IDs |
| hasException | boolean? | Filter items by exception status |
See standard filter documentation for additional filterable fields: createdAt, description, id, lineNumber, notes, updatedAt.
Maximum limit: 2500 invoice items per request. Requests with a higher limit will be capped at 2500.
Response​
An AllInvoiceItemsResponse object containing:
| Field | Type | Description |
|---|---|---|
| meta | AllInvoiceItemsPaginationMeta | Pagination metadata |
| meta.total | int | Total count of invoice items matching the filters |
| meta.limit | int | The page size requested (maximum 2500) |
| meta.offset | int | The starting position in the result set |
| data | [AllInvoiceItemsItem] | Array of AllInvoiceItemsItem objects |
AllInvoiceItemsItem Schema​
The AllInvoiceItemsItem type is a simplified schema designed for bulk data retrieval:
| Name | Type | Description |
|---|---|---|
| id | ID | Unique identifier for this invoice item |
| invoiceId | ID | ID of the invoice this item is attached to |
| lineNumber | int | Number representing the index of the line item within its invoice |
| createdAt | DateTime | When this invoice item was created |
| updatedAt | DateTime | When this invoice item was last updated |
| description | string? | Description of the invoice item |
| notes | string? | Additional handwritten details |
| manufacturerPartNumber | string? | Manufacturer part number (MPN) |
| universalProductCode | string? | Universal product code (UPC) |
| unitPriceFloat | float? | Unit price of the invoice item |
| extPriceFloat | float? | Extended price of the invoice item |
| extPriceFloatIncludingTax | float? | Extended price including tax |
| shipQuantity | float? | Quantity shipped |
| extendedQuantity | float? | Extended quantity (calculated with unit conversions) |
| unitsOfMeasure | string? | Unit of measurement for this invoice item |
| requestedUOM | string? | Requested unit of measure |
| pricingUOM | string? | Pricing unit of measure |
| extendedUOM | string? | Extended unit of measure |
| taxRate | float? | Tax rate applied to this item |
| hasException | boolean | Whether this invoice item has an exception |
| phaseCode | string? | Phase code for this invoice item |
| costCategory | string? | Cost category for this invoice item |
| taxCode | string? | Tax code for this invoice item |
| phaseCodeCode | string? | Phase code string from item or integration data |
| costCategoryCode | string? | Cost category code string from item or integration data |
| glCodeCode | string? | GL code string from item or integration data |
| taxCodeCode | string? | Tax code string from item or integration data |
| costTypeCode | string? | Cost type code string from item or integration data |
| jobId | ID? | Job ID from the parent invoice (denormalized) |
| vendorId | ID? | Vendor ID from the parent invoice (denormalized) |
| itemCode | ItemCode? | Full ItemCode object with id, code, and description |
| scaledUnitPrice | float? | Scaled unit price (when UOM v2 feature is enabled) |
| itemCodeText | string? | Free-form item code text from integration data |
Example Request (All Invoice Items)​
query {
allInvoiceItems(limit: 100, offset: 0, orderBy: createdAt, direction: DESC) {
meta {
total
limit
offset
}
data {
id
description
lineNumber
shipQuantity
unitPriceFloat
extPriceFloat
invoiceId
jobId
vendorId
manufacturerPartNumber
phaseCodeCode
costCategoryCode
glCodeCode
taxCodeCode
costTypeCode
hasException
itemCode {
id
code
description
}
scaledUnitPrice
createdAt
}
}
}
Example Request (Filter by Job ID)​
query {
allInvoiceItems(
filter: {
jobId: "ckmnpybisiy5x08abky4g2d1f"
}
limit: 50
offset: 0
) {
meta {
total
limit
offset
}
data {
id
description
shipQuantity
unitPriceFloat
invoiceId
jobId
}
}
}
Example Request (Filter by Vendor ID)​
query {
allInvoiceItems(
filter: {
vendorId: "ckmnpybisiy5x08abky4g2d1f"
}
limit: 100
) {
meta {
total
limit
offset
}
data {
id
description
shipQuantity
invoiceId
vendorId
}
}
}
Example Request (Filter by Multiple Invoice IDs)​
query {
allInvoiceItems(
filter: {
invoiceId_in: [
"ckmnpybisiy5x08abky4g2d1f"
"ckmnpybisiy5x08abky4g2d1g"
"ckmnpybisiy5x08abky4g2d1h"
]
}
limit: 100
) {
meta {
total
limit
offset
}
data {
id
description
shipQuantity
invoiceId
}
}
}
Example Request (Filter by Exception Status)​
query {
allInvoiceItems(
filter: {
hasException: true
}
limit: 50
) {
meta {
total
limit
offset
}
data {
id
description
invoiceId
hasException
notes
}
}
}
Example Response​
{
"meta": {
"total": 850,
"limit": 100,
"offset": 0
},
"data": [
{
"id": "cmhar18ox000o13mixao4iqzq",
"description": "1/2\" Copper Pipe",
"lineNumber": 1,
"shipQuantity": 500,
"unitPriceFloat": 0.501,
"extPriceFloat": 250.50,
"invoiceId": "cmhar18nl000n13mi15m20p39",
"manufacturerPartNumber": "CP-500",
"createdAt": "2025-10-28T15:56:19.137Z"
}
]
}
Use Cases​
The allInvoiceItems query is particularly useful for:
- Data Warehousing: Pull all invoice items for bulk analysis or storage in external systems
- Reporting: Generate organization-wide reports without making multiple API calls per invoice
- Analytics: Aggregate spending, quantity, and vendor data across all invoices
- Exception Tracking: Filter and analyze invoice items with exceptions for reconciliation
- Syncing: Efficiently synchronize invoice item data with external systems