Line Items Inputs

See the Queries page for a presentation of this resource.

Document line items have no dedicated GraphQL mutations: CreateLineItem, UpdateLineItem and DeleteLineItem do not exist. To add, edit or delete a line, use the update mutation of the parent document (UpdateOrder, UpdateShippingOrder, UpdateInvoice, UpdatePurchase, etc.) and send the complete line_items list: any line whose id is missing from that list is deleted.

To create a document with its lines, set line_items directly in the input of the corresponding Create... mutation.


LineItemInput data type

id - ID
Identifier (optional)
location_id - String
Location identifier
location - LocationInput
Location data (when using @belongsTo)
variant_id - String
Variant identifier
variant - VariantInput
Variant data
quantity - Float
Quantity of the line item
price - Float
Price of the line item
drop_shipping - Int
Drop shipping flag (0 or 1)
parent_id - Int
Parent line item ID
weight - Int
Weight of the line item
description - String
Description of the line item
temporary_id - ID
Temporary ID for kits and packaging
kit_line_item_id - ID
Kit line item ID
type - LineItemType
Line item type. Default: normal.
batch_numbers - [BatchNumberLineItemInput]
Batch numbers for the line item
serial_numbers - [SerialNumberLineItemInput]
Serial numbers for the line item
serial_number_text - String
Raw serial number text (alternative to structured input)
customer - CustomerInput
Customer data
apply_discount_rules - Boolean
Whether to apply discount rules to this line item.
replace_label - Boolean
Replace label flag
discount_type - DiscountType
Type of discount
discount - Float
Discount amount
discount_rule_id - ID
Discount rule ID
discount_rule_amount - Float
Discount rule amount

LineItemCreditNoteInput data type

id - ID
Identifier (optional)
location_id - String
Location identifier
location - LocationInput
Location data (when using @belongsTo)
variant_id - String
Variant identifier
variant - VariantInput
Variant data
quantity - Float
Quantity of the line item
price - Float
Price of the line item
calculate_price_from_components - Boolean
Calculate price from components
drop_shipping - Int
Drop shipping flag (0 or 1)
parent_id - Int
Parent line item ID
weight - Int
Weight of the line item
description - String
Description of the line item
replace_label - Boolean
Replace label flag
temporary_id - ID
Temporary ID for kits and packaging
kit_line_item_id - ID
Kit line item ID
type - LineItemType
Line item type. Default: normal.
batch_numbers - [BatchNumberLineItemInput]
Batch numbers for the line item
customer - CustomerInput
Customer data
discount - Float
Discount amount
discount_type - DiscountType
Type of discount
discount_rule_id - ID
Discount rule ID
discount_rule_amount - Float
Discount rule amount
ecotax - Float
Eco-tax amount
total - Float
Total amount
tax_codes - [TaxCodeInput]
Tax codes for the line item
location - LocationInput
Location data

LineItemEstimateInput data type

id - ID
Identifier (optional)
location_id - String
Location identifier
location - LocationInput
Location data (when using @belongsTo)
variant_id - String
Variant identifier
variant - VariantInput
Variant data
quantity - Float
Quantity of the line item
price - Float
Price of the line item
calculate_price_from_components - Boolean
Calculate price from components
drop_shipping - Int
Drop shipping flag (0 or 1)
parent_id - Int
Parent line item ID
weight - Int
Weight of the line item
description - String
Description of the line item
replace_label - Boolean
Replace label flag
discount_type - DiscountType
Type of discount
discount - Float
Discount amount
tax_amount - Float
Tax amount
ecotax - Float
Eco-tax amount
tax_codes - [TaxCodeInput]
Tax codes for the line item
temporary_id - ID
Temporary ID for kits and packaging
kit_line_item_id - ID
Kit line item ID
type - LineItemType
Line item type. Default: normal.
batch_numbers - [BatchNumberLineItemInput]
Batch numbers for the line item
customer - CustomerInput
Customer data
discount_rule_id - ID
Discount rule ID
discount_rule_amount - Float
Discount rule amount

LineItemPurchaseInput data type

id - ID
Identifier (optional)
location_id - String
Location identifier
location - LocationInput
Location data (when using @belongsTo)
variant_id - String
Variant identifier
variant - VariantInput
Variant data
quantity - Float
Quantity of the line item
price - Float
Price of the line item
drop_shipping - Int
Drop shipping flag (0 or 1)
parent_id - Int
Parent line item ID
weight - Int
Weight of the line item
description - String
Description of the line item
temporary_id - ID
Temporary ID for kits and packaging
kit_line_item_id - ID
Kit line item ID
type - LineItemType
Line item type. Default: normal.
batch_numbers - [BatchNumberLineItemInput]
Batch numbers for the line item
serial_numbers - [SerialNumberLineItemInput]
Serial numbers for the line item
serial_number_text - String
Raw serial number text (alternative to structured input)
customer - CustomerInput
Customer data
replace_label - Boolean
Replace label flag
calculate_price_from_components - Boolean
Calculate price from components
discount_type - DiscountType
Type of discount
discount - Float
Discount amount
discount_rule_id - ID
Discount rule ID
discount_rule_amount - Float
Discount rule amount
apply_discount_rules - Boolean
Whether to apply discount rules to this line item.
tax_amount - Float
Tax amount
ecotax - Float
Eco-tax amount
tax_codes - [TaxCodeInput]
Tax codes for the line item

LineItemPurchaseReceiptInput data type

id - ID
Identifier (optional)
location_id - String
Location identifier
location - LocationInput
Location data (when using @belongsTo)
variant_id - String
Variant identifier
variant - VariantInput
Variant data
quantity - Float
Quantity of the line item
price - Float
Price of the line item
drop_shipping - Int
Drop shipping flag (0 or 1)
parent_id - Int
Parent line item ID
weight - Int
Weight of the line item
description - String
Description of the line item
bin_location - String
Bin location identifier
temporary_id - ID
Temporary ID for kits and packaging
kit_line_item_id - ID
Kit line item ID
type - LineItemType
Line item type. Default: normal.
batch_numbers - [BatchNumberLineItemInput]
Batch numbers for the line item
serial_numbers - [SerialNumberLineItemInput]
Serial numbers for the line item
serial_number_text - String
Raw serial number text (alternative to structured input)
replace_label - Boolean
Replace label flag
calculate_price_from_components - Boolean
Calculate price from components
discount_type - DiscountType
Type of discount
discount - Float
Discount amount
discount_rule_id - ID
Discount rule ID
discount_rule_amount - Float
Discount rule amount
apply_discount_rules - Boolean
Whether to apply discount rules to this line item.
tax_amount - Float
Tax amount
ecotax - Float
Eco-tax amount
tax_codes - [TaxCodeInput]
Tax codes for the line item
customer - CustomerInput
Customer data

LineItemProductReturnInput data type

id - ID
Identifier (optional)
location_id - String
Location identifier
location - LocationInput
Location data (when using @belongsTo)
variant_id - String
Variant identifier
variant - VariantInput
Variant data
quantity - Float
Quantity of the line item
price - Float
Price of the line item
drop_shipping - Int
Drop shipping flag (0 or 1)
parent_id - Int
Parent line item ID
weight - Int
Weight of the line item
description - String
Description of the line item
temporary_id - ID
Temporary ID for kits & packaging
kit_line_item_id - ID
Kit line item ID
type - LineItemType
Line item type. Default: normal.
batch_numbers - [BatchNumberLineItemInput]
Batch numbers for the line item
serial_numbers - [SerialNumberLineItemInput]
Serial numbers for the line item
serial_number_text - String
Raw serial number text (alternative to structured input)
customer - CustomerInput
Customer data
replace_label - Boolean
Replace label with description

LineItemOrderInput data type

id - ID
Identifier (optional)
location_id - String
Location identifier
location - LocationInput
Location data (when using @belongsTo)
variant_id - String
Variant identifier
variant - VariantInput
Variant data
quantity - Float
Quantity of the line item
price - Float
Price of the line item
drop_shipping - Int
Drop shipping flag (0 or 1)
parent_id - Int
Parent line item ID
weight - Int
Weight of the line item
description - String
Description of the line item
temporary_id - ID
Temporary ID for kits & packaging
kit_line_item_id - ID
Kit line item ID
type - LineItemType
Line item type. Default: normal.
batch_numbers - [BatchNumberLineItemInput]
Batch numbers for the line item
serial_numbers - [SerialNumberLineItemInput]
Serial numbers for the line item
serial_number_text - String
Raw serial number text (alternative to structured input)
customer - CustomerInput
Customer data
replace_label - Boolean
Replace label flag
calculate_price_from_components - Boolean
Calculate price from components
discount_type - DiscountType
Type of discount
discount - Float
Discount amount
discount_rule_id - ID
Discount rule ID
discount_rule_amount - Float
Discount rule amount
apply_discount_rules - Boolean
Whether to apply discount rules to this line item.
tax_amount - Float
Tax amount
ecotax - Float
Eco-tax amount
tax_codes - [TaxCodeInput]
Tax codes for the line item

LineItemInvoiceInput data type

id - ID
Identifier (optional)
location_id - String
Location identifier
location - LocationInput
Location data (when using @belongsTo)
variant_id - String
Variant identifier
variant - VariantInput
Variant data
quantity - Float
Quantity of the line item
price - Float
Price of the line item
calculate_price_from_components - Boolean
Calculate price from components
drop_shipping - Int
Drop shipping flag (0 or 1)
parent_id - Int
Parent line item ID
weight - Int
Weight of the line item
description - String
Description of the line item
replace_label - Boolean
Replace label flag
temporary_id - ID
Temporary ID for kits & packaging
kit_line_item_id - ID
Kit line item ID
type - LineItemType
Line item type. Default: normal.
batch_numbers - [BatchNumberLineItemInput]
Batch numbers for the line item
serial_numbers - [SerialNumberLineItemInput]
Serial numbers for the line item
serial_number_text - String
Raw serial number text (alternative to structured input)
customer - CustomerInput
Customer data
discount_type - DiscountType
Type of discount
discount - Float
Discount amount
discount_rule_id - ID
Discount rule ID
discount_rule_amount - Float
Discount rule amount
tax_amount - Float
Tax amount
ecotax - Float
Eco-tax amount
tax_codes - [TaxCodeInput]
Tax codes for the line item

LineItemShippingOrderInput data type

id - ID
Identifier (optional)
location_id - String
Location identifier
location - LocationInput
Location data (when using @belongsTo)
variant_id - String
Variant identifier
variant - VariantInput
Variant data
quantity - Float
Quantity of the line item
price - Float
Price of the line item
drop_shipping - Int
Drop shipping flag (0 or 1)
parent_id - Int
Parent line item ID
weight - Int
Weight of the line item
description - String
Description of the line item
temporary_id - ID
Temporary ID for kits & packaging
kit_line_item_id - ID
Kit line item ID
type - LineItemType
Line item type. Default: normal.
batch_numbers - [BatchNumberLineItemInput]
Batch numbers for the line item
serial_numbers - [SerialNumberLineItemInput]
Serial numbers for the line item
serial_number_text - String
Raw serial number text (alternative to structured input)
customer - CustomerInput
Customer data
calculate_price_from_components - Boolean
Calculate price from components
discount_type - DiscountType
Type of discount
discount - Float
Discount amount
tax_amount - Float
Tax amount
ecotax - Float
Eco-tax amount
tax_codes - [TaxCodeInput]
Tax codes for the line item
replace_label - Boolean
Replace label with description

LineItemStockAdjustmentInput data type

id - ID
Identifier (optional)
location_id - String
Location identifier
location - LocationInput
Location data (when using @belongsTo)
variant_id - String
Variant identifier
variant - VariantInput
Variant data
quantity - Float
Quantity of the line item
price - Float
Price of the line item
drop_shipping - Int
Drop shipping flag (0 or 1)
weight - Int
Weight of the line item
description - String
Description of the line item
parent_id - Int
Parent line item ID
kit_line_item_id - ID
Kit line item ID
temporary_id - ID
Temporary ID for kits & packaging
type - LineItemType
Line item type. Default: normal.
batch_numbers - [BatchNumberLineItemInput]
Batch numbers for the line item
serial_numbers - [SerialNumberLineItemInput]
Serial numbers for the line item
serial_number_text - String
Raw serial number text (alternative to structured input)
replace_label - Boolean
Replace label flag

LineItemRefundInput data type

id - ID
Identifier (optional)
location_id - String
Location identifier
location - LocationInput
Location data (when using @belongsTo)
variant_id - String
Variant identifier
variant - VariantInput
Variant data
quantity - Float
Quantity of the line item
price - Float
Price of the line item
calculate_price_from_components - Boolean
Calculate price from components
drop_shipping - Int
Drop shipping flag (0 or 1)
parent_id - Int
Parent line item ID
weight - Int
Weight of the line item
description - String
Description of the line item
replace_label - Boolean
Replace label flag
temporary_id - ID
Temporary ID for kits & packaging
kit_line_item_id - ID
Kit line item ID
type - LineItemType
Line item type. Default: normal.
batch_numbers - [BatchNumberLineItemInput]
Batch numbers for the line item
customer - CustomerInput
Customer data
discount - Float
Discount amount
discount_type - DiscountType
Type of discount
discount_rule_id - ID
Discount rule ID
discount_rule_amount - Float
Discount rule amount
ecotax - Float
Eco-tax amount
total - Float
Total amount
tax_codes - [TaxCodeInput]
Tax codes for the line item
location - LocationInput
Location data

LineItemsFilter data type

column - String
Column name to filter on
operator - String
Filter operator (e.g. EQ, GT, LIKE)
value - Mixed
Filter value

Data Types

BatchNumberLineItemInput

FieldTypeDescription
idIDBatch number line item ID (for updates).
quantityFloatQuantity allocated to this batch.
batch_numberBatchNumberInputBatch number details.
serial_numbers[SerialNumberLineItemInput]Serial numbers for this batch.
serial_number_textStringRaw serial number text.

SerialNumberLineItemInput

FieldTypeDescription
serial_numberSerialNumberInputSerial number details.

Enums

LineItemType

ValueDescription
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.

DiscountType

ValueDescription
amountFixed discount amount.
percentagePercentage-based discount.