Skip to main content

Invoice Items

Invoice Item represents an individual line item on an Invoice

Schema​

InvoiceItem​

NameTypeDescriptionExample
idIDUnique identifier for invoice items"ckmnpybisiy5x08abky4g2d1f"
createdAtDateTimeWhen this invoice item was created"2021-03-24 17:26:46.983Z"
updatedAtDateTimeWhen this invoice item was updated"2021-03-24 17:26:46.983Z"
descriptionstring?Description of the invoice item3/4" EMT
extPriceFloatfloat?EXT price of the item125.00
extPriceFloatIncludingTaxfloat?EXT price of the item inclusive of tax130.00
hasExceptionbooleanIndicates whether the invoice item has any exceptionstrue
invoiceInvoice?Invoice associated with this itemSee Invoice docs
invoiceIdIDThe ID of the invoice this item is attached to"ckmnpybisiy5x08abky4g2d1f"
lineNumberintNumber representing the index of the line item within it's invoice3
notesstring?Additional handwritten details attached to this item"Set this aside."
shipQuantityfloat?Quantity of this item100
unitPriceFloatfloat?Unit price of this item1.25
unitsOfMeasurestring?Unit of measurement for this itemEA
creditMemoItemsCreditMemoItem[]Credit memo items associated with this invoice itemSee CreditMemoItem
orderItemsItem[]Order items associated with this invoice itemSee Item docs
taxCodestring?Tax code applicable to this invoice item"CA"
taxRatefloat?Tax rate applied to this invoice item0.04
phaseCodestring?Phase code associated with this invoice item"450"
costCategorystring?Cost category code associated with this invoice item"M"
glCodeGLCode?GL code associated with this invoice item"5000"

Queries​

invoiceItem​

Get a single invoice item by ID.

Parameters​

NameTypeDescription
idIDID 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​

NameTypeDescription
invoiceIdIDID 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​

NameTypeDescription
filterInvoiceItemFilter?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:

NameTypeDescription
invoiceIdID?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
jobIdID?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
vendorIdID?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
hasExceptionboolean?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:

FieldTypeDescription
metaAllInvoiceItemsPaginationMetaPagination metadata
meta.totalintTotal count of invoice items matching the filters
meta.limitintThe page size requested (maximum 2500)
meta.offsetintThe 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:

NameTypeDescription
idIDUnique identifier for this invoice item
invoiceIdIDID of the invoice this item is attached to
lineNumberintNumber representing the index of the line item within its invoice
createdAtDateTimeWhen this invoice item was created
updatedAtDateTimeWhen this invoice item was last updated
descriptionstring?Description of the invoice item
notesstring?Additional handwritten details
manufacturerPartNumberstring?Manufacturer part number (MPN)
universalProductCodestring?Universal product code (UPC)
unitPriceFloatfloat?Unit price of the invoice item
extPriceFloatfloat?Extended price of the invoice item
extPriceFloatIncludingTaxfloat?Extended price including tax
shipQuantityfloat?Quantity shipped
extendedQuantityfloat?Extended quantity (calculated with unit conversions)
unitsOfMeasurestring?Unit of measurement for this invoice item
requestedUOMstring?Requested unit of measure
pricingUOMstring?Pricing unit of measure
extendedUOMstring?Extended unit of measure
taxRatefloat?Tax rate applied to this item
hasExceptionbooleanWhether this invoice item has an exception
phaseCodestring?Phase code for this invoice item
costCategorystring?Cost category for this invoice item
taxCodestring?Tax code for this invoice item
phaseCodeCodestring?Phase code string from item or integration data
costCategoryCodestring?Cost category code string from item or integration data
glCodeCodestring?GL code string from item or integration data
taxCodeCodestring?Tax code string from item or integration data
costTypeCodestring?Cost type code string from item or integration data
jobIdID?Job ID from the parent invoice (denormalized)
vendorIdID?Vendor ID from the parent invoice (denormalized)
itemCodeItemCode?Full ItemCode object with id, code, and description
scaledUnitPricefloat?Scaled unit price (when UOM v2 feature is enabled)
itemCodeTextstring?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