See the Queries page for a presentation of this resource.
Create a line item
GraphQL
mutation CreateLineItem($input: LineItemInput!) {
CreateLineItem(input: $input) {
id
location { id label }
variant { id label }
quantity
price
drop_shipping
parent_id
weight
description
kit_line_item_id
type
customer_id
}
}
JSON
{
"input": {
"location_id": "100001",
"variant_id": "100002",
"quantity": 5.0,
"price": 25.50,
"drop_shipping": 0,
"weight": 500,
"description": "Product line item",
"type": "normal",
"customer_id": 100003
}
}
JSON
{
"data": {
"CreateLineItem": {
"id": 100004,
"location": { "id": 100001, "label": "Main Warehouse" },
"variant": { "id": 100002, "label": "Product Variant" },
"quantity": 5.0,
"price": 25.50,
"drop_shipping": 0,
"weight": 500,
"description": "Product line item",
"kit_line_item_id": null,
"type": "normal",
"customer_id": 100003
}
}
}
Update a line item
id - ID Id of the line item
GraphQL
mutation UpdateLineItem($id: ID!, $input: LineItemInput!) {
UpdateLineItem(id: $id, input: $input) {
id
location { id label }
variant { id label }
quantity
price
drop_shipping
parent_id
weight
description
kit_line_item_id
type
customer_id
}
}
JSON
{
"id": 100004,
"input": {
"quantity": 10.0,
"price": 30.00,
"description": "Updated product line item"
}
}
JSON
{
"data": {
"UpdateLineItem": {
"id": 100004,
"location": { "id": 100001, "label": "Main Warehouse" },
"variant": { "id": 100002, "label": "Product Variant" },
"quantity": 10.0,
"price": 30.00,
"drop_shipping": 0,
"weight": 500,
"description": "Updated product line item",
"kit_line_item_id": null,
"type": "normal",
"customer_id": 100003
}
}
}
Delete a line item
id - ID Id of the line item
GraphQL
mutation DeleteLineItem($id: ID!) {
DeleteLineItem(id: $id)
}
JSON
{
"data": { "DeleteLineItem": true }
}
id - ID Identifier (optional)
location_id - String Location identifier
variant_id - String Variant identifier
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
serial_number_text - String Raw serial number text (alternative to structured input)
apply_discount_rules - Boolean Whether to apply discount rules to this line item.
replace_label - Boolean Replace label flag
discount - Float Discount amount
discount_rule_id - ID Discount rule ID
discount_rule_amount - Float Discount rule amount
id - ID Identifier (optional)
location_id - String Location identifier
variant_id - String Variant identifier
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
serial_number_text - String Raw serial number text (alternative to structured input)
discount - Float Discount amount
discount_rule_id - ID Discount rule ID
discount_rule_amount - Float Discount rule amount
ecotax - Float Eco-tax amount
total - Float Total amount
id - ID Identifier (optional)
location_id - String Location identifier
variant_id - String Variant identifier
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 - Float Discount amount
tax_amount - Float Tax amount
ecotax - Float Eco-tax amount
temporary_id - ID Temporary ID for kits and packaging
kit_line_item_id - ID Kit line item ID
serial_number_text - String Raw serial number text (alternative to structured input)
discount_rule_id - ID Discount rule ID
discount_rule_amount - Float Discount rule amount
id - ID Identifier (optional)
location_id - String Location identifier
variant_id - String Variant identifier
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
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 - 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
id - ID Identifier (optional)
location_id - String Location identifier
variant_id - String Variant identifier
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
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 - 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
id - ID Identifier (optional)
location_id - String Location identifier
variant_id - String Variant identifier
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
serial_number_text - String Raw serial number text (alternative to structured input)
replace_label - Boolean Replace label with description
id - ID Identifier (optional)
location_id - String Location identifier
variant_id - String Variant identifier
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
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 - 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
id - ID Identifier (optional)
location_id - String Location identifier
variant_id - String Variant identifier
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
serial_number_text - String Raw serial number text (alternative to structured input)
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
id - ID Identifier (optional)
location_id - String Location identifier
variant_id - String Variant identifier
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
serial_number_text - String Raw serial number text (alternative to structured input)
calculate_price_from_components - Boolean Calculate price from components
discount - Float Discount amount
tax_amount - Float Tax amount
ecotax - Float Eco-tax amount
billed_quantity - Float Billed quantity
unbilled_quantity - Float Unbilled quantity
paid_quantity - Float Paid quantity
unpaid_quantity - Float Unpaid quantity
replace_label - Boolean Replace label with description
id - ID Identifier (optional)
location_id - String Location identifier
variant_id - String Variant identifier
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
serial_number_text - String Raw serial number text (alternative to structured input)
replace_label - Boolean Replace label flag
id - ID Identifier (optional)
location_id - String Location identifier
variant_id - String Variant identifier
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
serial_number_text - String Raw serial number text (alternative to structured input)
discount - Float Discount amount
discount_rule_id - ID Discount rule ID
discount_rule_amount - Float Discount rule amount
ecotax - Float Eco-tax amount
total - Float Total amount
column - String Column name to filter on
operator - String Filter operator (e.g. EQ, GT, LIKE)
value - Mixed Filter value
Field Type Description batch_numberString! Batch number identifier. quantityFloat! Quantity allocated to this batch.
Field Type Description serial_numberString! Serial number identifier.
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.
Value Description amountFixed discount amount. percentagePercentage-based discount.