Access line items from documents with pricing and tax details.
GraphQL
query GetLineItem($id: ID) {
LineItem(id: $id) {
id
line_itemable { id label }
line_itemable_type
sku
label
variant_type
barcode
variant { id label }
location { id label }
quantity
quantity_aggregate
price
weight
drop_shipping
parent_id
origin_id
delivered
committed
on_hand
available
incoming
shipped
reserved
description
kit_line_item_id
type
batch_numbers { id }
}
}
GraphQL
query GetLineItemCreditNotes(
$where: QueryLineItemCreditNotesWhereWhereConditions,
$orderBy: [QueryLineItemCreditNotesOrderByOrderByClause!],
$groupBy: QueryLineItemCreditNotesGroupByGroupByClause
) {
LineItemCreditNote(
where: $where
orderBy: $orderBy
groupBy: $groupBy
) {
id
sku
label
variant_type
barcode
variant { id label }
discount
discount_type
ecotax
total
customer { id label }
tax_codes { id label }
line_itemable { id label }
location { id label }
quantity
quantity_aggregate
price
calculate_price_from_components
weight
drop_shipping
on_hand
available
incoming
uncredited_quantity
description
replace_label
kit_line_item_id
type
parent_id
batch_numbers { id }
}
}
JSON
{
"where": {
"AND": [
{ "column": "CUSTOMER_ID", "operator": "EQ", "value": 100001 }
]
},
"orderBy": [
{ "column": "LABEL", "order": "ASC" }
]
}
GraphQL
query GetLineItemEstimates(
$where: QueryLineItemEstimatesWhereWhereConditions,
$orderBy: [QueryLineItemEstimatesOrderByOrderByClause!],
$groupBy: QueryLineItemEstimatesGroupByGroupByClause
) {
LineItemEstimates(
where: $where
orderBy: $orderBy
groupBy: $groupBy
) {
id
sku
label
variant_type
barcode
variant { id label }
estimate_number
customer { id label }
line_itemable { id label }
location { id label }
quantity
quantity_aggregate
price
calculate_price_from_components
weight
drop_shipping
on_hand
available
incoming
transformed_quantity
billed_quantity
unbilled_quantity
paid_quantity
unpaid_quantity
ordered_quantity
unordered_quantity
description
replace_label
kit_line_item_id
discount_type
discount
tax_amount
ecotax
total
tax_codes { id label }
type
parent_id
origin_id
batch_numbers { id }
}
}
JSON
{
"where": {
"AND": [
{ "column": "BILLED_QUANTITY", "operator": "GT", "value": 0 }
]
},
"orderBy": [
{ "column": "BILLED_QUANTITY", "order": "DESC" }
]
}
GraphQL
query GetLineItemPurchases(
$where: QueryLineItemPurchasesWhereWhereConditions,
$orderBy: [QueryLineItemPurchasesOrderByOrderByClause!],
$groupBy: QueryLineItemPurchasesGroupByGroupByClause
) {
LineItemPurchases(
where: $where
orderBy: $orderBy
groupBy: $groupBy
) {
id
sku
label
variant_type
barcode
variant { id label }
supplier { id label }
line_itemable { id label }
location { id label }
quantity
quantity_aggregate
price
weight
drop_shipping
on_hand
available
incoming
reserved
delivered
uncommitted
committed
description
kit_line_item_id
type
parent_id
batch_numbers { id }
}
}
JSON
{
"where": {
"AND": [
{ "column": "DELIVERED", "operator": "GT", "value": 0 }
]
},
"orderBy": [
{ "column": "DELIVERED", "order": "DESC" }
]
}
GraphQL
query GetLineItemPurchaseReceipts(
$where: QueryLineItemPurchaseReceiptsWhereWhereConditions,
$orderBy: [QueryLineItemPurchaseReceiptsOrderByOrderByClause!],
$groupBy: QueryLineItemPurchaseReceiptsGroupByGroupByClause
) {
LineItemPurchaseReceipts(
where: $where
orderBy: $orderBy
groupBy: $groupBy
) {
id
sku
label
variant_type
barcode
variant { id label }
line_itemable { id label }
location { id label }
quantity
quantity_aggregate
price
weight
drop_shipping
parent_id
on_hand
available
incoming
delivered
reserved
uncommitted
committed
description
kit_line_item_id
type
batch_numbers { id }
}
}
JSON
{
"where": {
"AND": [
{ "column": "DELIVERED", "operator": "GT", "value": 0 }
]
},
"orderBy": [
{ "column": "DELIVERED", "order": "DESC" }
]
}
GraphQL
query GetLineItemProductReturns(
$where: QueryLineItemProductReturnsWhereWhereConditions,
$orderBy: [QueryLineItemProductReturnsOrderByOrderByClause!],
$groupBy: QueryLineItemProductReturnsGroupByGroupByClause
) {
LineItemProductReturns(
where: $where
orderBy: $orderBy
groupBy: $groupBy
) {
id
sku
label
variant_type
barcode
variant { id label }
customer { id label }
line_itemable { id label }
location { id label }
quantity
quantity_aggregate
price
weight
drop_shipping
parent_id
on_hand
available
incoming
shipped
committed
reserved
description
kit_line_item_id
type
batch_numbers { id }
}
}
JSON
{
"where": {
"AND": [
{ "column": "SHIPPED", "operator": "GT", "value": 0 }
]
},
"orderBy": [
{ "column": "COMMITTED", "order": "DESC" }
]
}
GraphQL
query GetLineItemInvoices(
$where: QueryLineItemInvoicesWhereWhereConditions,
$orderBy: [QueryLineItemInvoicesOrderByOrderByClause!],
$groupBy: QueryLineItemInvoicesGroupByGroupByClause
) {
LineItemInvoices(
where: $where
orderBy: $orderBy
groupBy: $groupBy
) {
id
sku
label
variant_type
barcode
variant { id label }
customer { id label }
line_itemable { id label }
location { id label }
quantity
quantity_aggregate
price
calculate_price_from_components
weight
drop_shipping
on_hand
available
incoming
unbilled_quantity
unpaid_quantity
returned_quantity
unreturned_quantity
credited_quantity
uncredited_quantity
parent { id }
description
discount_type
discount
tax_amount
ecotax
total
tax_codes { id label }
replace_label
kit_line_item_id
type
parent_id
origin_id
batch_numbers { id }
}
}
JSON
{
"where": {
"AND": [
{ "column": "RETURNED_QUANTITY", "operator": "GT", "value": 0 }
]
},
"orderBy": [
{ "column": "RETURNED_QUANTITY", "order": "DESC" }
]
}
GraphQL
query GetLineItemShippingOrders(
$where: QueryLineItemShippingOrdersWhereWhereConditions,
$orderBy: [QueryLineItemShippingOrdersOrderByOrderByClause!],
$groupBy: QueryLineItemShippingOrdersGroupByGroupByClause
) {
LineItemShippingOrders(
where: $where
orderBy: $orderBy
groupBy: $groupBy
) {
id
sku
label
variant_type
barcode
variant { id label }
line_itemable { id label }
location { id label }
quantity
quantity_aggregate
price
weight
drop_shipping
parent_id
origin_id
on_hand
available
incoming
committed
uncommitted
shipped
reserved
delivered
description
kit_line_item_id
type
batch_numbers { id }
}
}
JSON
{
"where": {
"AND": [
{ "column": "SHIPPED", "operator": "GT", "value": 0 }
]
},
"orderBy": [
{ "column": "QUANTITY_AGGREGATE", "order": "DESC" }
]
}
GraphQL
query GetLineItemStockAdjustments(
$where: QueryLineItemStockAdjustmentsWhereWhereConditions,
$orderBy: [QueryLineItemStockAdjustmentsOrderByOrderByClause!],
$groupBy: QueryLineItemStockAdjustmentsGroupByGroupByClause
) {
LineItemStockAdjustments(
where: $where
orderBy: $orderBy
groupBy: $groupBy
) {
id
sku
label
variant_type
barcode
variant { id label }
line_itemable { id label }
location { id label }
quantity
quantity_aggregate
price
weight
drop_shipping
parent_id
origin_id
description
on_hand
available
incoming
kit_line_item_id
type
batch_numbers { id }
}
}
JSON
{
"orderBy": [
{ "column": "ID", "order": "DESC" }
]
}
GraphQL
query GetLineItemRefund(
$where: QueryLineItemRefundWhereWhereConditions,
$orderBy: [QueryLineItemRefundOrderByOrderByClause!],
$groupBy: QueryLineItemRefundGroupByGroupByClause
) {
LineItemRefund(
where: $where
orderBy: $orderBy
groupBy: $groupBy
) {
id
sku
label
variant_type
barcode
variant { id label }
customer { id label }
line_itemable { id label }
location { id label }
quantity
quantity_aggregate
price
calculate_price_from_components
weight
drop_shipping
on_hand
available
incoming
uncredited_quantity
description
replace_label
kit_line_item_id
type
parent_id
origin_id
discount
discount_type
ecotax
total
tax_codes { id label }
batch_numbers { id }
}
}
JSON
{
"where": {
"AND": [
{ "column": "CUSTOMER_ID", "operator": "EQ", "value": 100001 }
]
},
"orderBy": [
{ "column": "LABEL", "order": "ASC" }
]
}
GraphQL
query GetLineItemOrders(
$where: QueryLineItemOrdersWhereWhereConditions,
$orderBy: [QueryLineItemOrdersOrderByOrderByClause!],
$groupBy: QueryLineItemOrdersGroupByGroupByClause
) {
LineItemOrders(
where: $where
orderBy: $orderBy
groupBy: $groupBy
) {
id
sku
label
variant_type
barcode
variant { id label }
status
shipping_at
order_number
customer { id label }
line_itemable { id label }
location { id label }
quantity
quantity_aggregate
price
weight
drop_shipping
on_hand
available
incoming
shipped
committed
reserved
delivered
description
kit_line_item_id
type
parent_id
batch_numbers { id }
}
}
JSON
{
"where": {
"AND": [
{ "column": "RESERVED", "operator": "GT", "value": 0 }
]
},
"orderBy": [
{ "column": "COMMITTED", "order": "DESC" }
]
}
Field Type Description idInt Unique identifier of the line item. skuString SKU of the variant. labelString Label of the variant. variant_typeString Type of the variant. barcodeString Barcode of the variant. variantVariant Linked variant entity. locationLocation Linked location entity. quantityFloat Quantity of the line item. quantity_aggregateFloat Aggregated quantity. priceFloat Price of the line item. weightInt Weight of the line item (its display order; higher weight → lower position). drop_shippingInt Drop shipping flag. parent_idInt Parent line item ID. origin_idInt Origin line item ID. descriptionString Description of the line item. kit_line_item_idID Kit line item ID. typeLineItemType Line item type. Default: normal. adjustment_typeString Adjustment type (for stock adjustments). batch_numbers[BatchNumber] Linked batch numbers.
Field Type Description on_handFloat Stock on hand. availableFloat Available stock. incomingFloat Incoming stock. committedFloat Committed stock. reservedFloat Reserved stock.
Field Type Description discountFloat Discount amount. discount_typeDiscountType Type of discount. ecotaxFloat Eco-tax amount. totalFloat Total amount. customerCustomer Linked customer. tax_codes[TaxCode] Linked tax codes. uncredited_quantityFloat Uncredited quantity.
Field Type Description estimate_numberString Estimate number. customerCustomer Linked customer. calculate_price_from_componentsBoolean Calculate price from components. transformed_quantityFloat Transformed quantity. billed_quantityFloat Billed quantity. unbilled_quantityFloat Unbilled quantity. paid_quantityFloat Paid quantity. unpaid_quantityFloat Unpaid quantity. ordered_quantityFloat Ordered quantity. unordered_quantityFloat Unordered quantity. discount_typeDiscountType Type of discount. discountFloat Discount amount. tax_amountFloat Tax amount. ecotaxFloat Eco-tax amount. totalFloat Total amount. tax_codes[TaxCode] Linked tax codes.
Field Type Description supplierSupplier Linked supplier. deliveredFloat Delivered quantity. uncommittedFloat Uncommitted quantity.
Field Type Description deliveredFloat Delivered quantity. uncommittedFloat Uncommitted quantity.
Field Type Description customerCustomer Linked customer. shippedFloat Shipped quantity.
Field Type Description customerCustomer Linked customer. shippedFloat Shipped quantity. deliveredFloat Delivered quantity. returned_quantityFloat Returned quantity. unreturned_quantityFloat Unreturned quantity. unbilled_quantityFloat Unbilled quantity (requires accounting.invoices capability).
Field Type Description unbilled_quantityFloat Unbilled quantity. unpaid_quantityFloat Unpaid quantity. returned_quantityFloat Returned quantity. unreturned_quantityFloat Unreturned quantity. credited_quantityFloat Credited quantity. uncredited_quantityFloat Uncredited quantity. discount_typeDiscountType Type of discount. discountFloat Discount amount. tax_amountFloat Tax amount. ecotaxFloat Eco-tax amount. totalFloat Total amount. tax_codes[TaxCode] Linked tax codes. replace_labelBoolean Replace label flag.
Field Type Description committedFloat Committed quantity. uncommittedFloat Uncommitted quantity. shippedFloat Shipped quantity. reservedFloat Reserved quantity. deliveredFloat Delivered quantity. unbilled_quantityFloat Unbilled quantity (requires accounting.invoices capability).
Field Type Description descriptionString Description for adjustment. priceFloat Price value on adjustment. drop_shippingInt Drop shipping flag.
You can create filters based on following fields (common to all types)
Field Type Example id Int { "column": "ID", "operator": "EQ", "value": 100012 }sku String { "column": "SKU", "operator": "LIKE", "value": "%ABC%" }label String { "column": "LABEL", "operator": "LIKE", "value": "%Product%" }variant_type String { "column": "VARIANT_TYPE", "operator": "EQ", "value": "product" }barcode String { "column": "BARCODE", "operator": "EQ", "value": "123456789" }line_itemable_id Int { "column": "LINE_ITEMABLE_ID", "operator": "EQ", "value": 100001 }quantity Float { "column": "QUANTITY", "operator": "GT", "value": 0 }price Float { "column": "PRICE", "operator": "GT", "value": 10.0 }weight Int { "column": "WEIGHT", "operator": "GT", "value": 100 }drop_shipping Int { "column": "DROP_SHIPPING", "operator": "EQ", "value": 1 }parent_id Int { "column": "PARENT_ID", "operator": "EQ", "value": 100010 }origin_id Int { "column": "ORIGIN_ID", "operator": "EQ", "value": 100005 }committed Float { "column": "COMMITTED", "operator": "GT", "value": 0 }reserved Float { "column": "RESERVED", "operator": "GT", "value": 0 }shipped Float { "column": "SHIPPED", "operator": "GT", "value": 0 }delivered Float { "column": "DELIVERED", "operator": "GT", "value": 0 }variant_id Int { "column": "VARIANT_ID", "operator": "EQ", "value": 100001 }on_hand Float { "column": "ON_HAND", "operator": "GT", "value": 0 }
You can sort data based on following fields: id, label, sku, variant_type, barcode, line_itemable_id, quantity, variant_id, on_hand, incoming, available, kit_line_item_id, price, weight, drop_shipping, location_id, committed, reserved
GraphQL
query SortLineItems(
$where: QueryLineItemsWhereWhereConditions
) {
LineItems(
where: $where
orderBy: [{ column: LABEL, order: ASC }]
) {
id
label
sku
quantity
price
on_hand
available
}
}
JSON
{
"data": {
"LineItemEstimates": [
{
"id": 100001,
"sku": "PROD-001",
"label": "Product Name",
"variant_type": "product",
"barcode": "123456789",
"quantity": 5.0,
"price": 25.50,
"on_hand": 100.0,
"available": 95.0,
"incoming": 0.0,
"billed_quantity": 3.0,
"unbilled_quantity": 2.0,
"paid_quantity": 1.0,
"unpaid_quantity": 4.0,
"ordered_quantity": 0.0,
"unordered_quantity": 5.0,
"discount_type": "percentage",
"discount": 10.0,
"tax_amount": 2.55,
"ecotax": 0.0,
"total": 127.50
}
]
}
}
Field Type Description idInt Tax rate ID. tax_amountFloat Amount of tax applied. tax_rateTaxRate Tax rate details (label, rate).
Field Type Description columnString Column name to filter on. operatorString Filter operator (e.g., "EQ", "LIKE", "GT"). valueMixed Filter value.
Field Type Description amountFloat Weight amount. unitString Weight unit (e.g. kg, lb).
Value Description amountFixed discount amount. percentagePercentage-based discount.
Value Description normalStandard product line item (default). kitKit/bundle line item. custom_productCustom product (variant_id = -1). depositDeposit line item. shipping_costShipping cost line item. global_discountGlobal discount line item. packagingPackaging line item.