LineItem object

Represents a single line in a shopping cart.

Required access

read_orders access scope.

On this page

Fields

  • contract ([SubscriptionContract](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptioncontract))
    The subscription contract associated with this line item.
  • customAttributes ([[Attribute!]!](https://shopify.dev/docs/admin-api/graphql/reference/orders/attribute))
    List of additional information (metafields) about the line item.
  • discountAllocations ([[DiscountAllocation!]!](https://shopify.dev/docs/admin-api/graphql/reference/orders/discountallocation))
    The discounts that have been allocated onto the line item by discount applications.
  • discountedTotalSet ([MoneyBag!](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/moneybag))
    The total line price after discounts are applied in shop and presentment currencies.
  • discountedUnitPriceSet ([MoneyBag!](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/moneybag))
    The price of a single variant unit after line item discounts are applied in shop and presentment currencies.
  • duties ([[Duty!]!](https://shopify.dev/docs/admin-api/graphql/reference/orders/duty))
    The duties associated with the line item.
  • fulfillableQuantity ([Int!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01))
    The total number of units to fulfill.
  • fulfillmentService ([FulfillmentService!](https://shopify.dev/docs/admin-api/graphql/reference/shipping-and-fulfillment/fulfillmentservice))
    Name of the service provider who fulfilled the order.
    Valid values are either manual or the name of the provider. For example, amazon, shipwire.
  • fulfillmentStatus ([String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
    The line item’s fulfillment status. Returns ‘fulfilled’ if fulfillableQuantity >= quantity, ‘partial’ if fulfillableQuantity > 0, and ‘unfulfilled’ otherwise.
  • id ([ID!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01))
    Globally unique identifier.
  • image ([Image](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/image))
    The Image object associated to the line item’s variant.
Argument Description
crop
(
[CropRegion](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/cropregion)

)
Crops the image according to the specified region. This argument is deprecated: Use crop on Image.transformedSrc instead.
maxHeight
(
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01)

)
Image height in pixels between 1 and 2048. This argument is deprecated: Use maxHeight on Image.transformedSrc instead.
maxWidth
(
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01)

)
Image width in pixels between 1 and 2048. This argument is deprecated: Use maxWidth on Image.transformedSrc instead.
scale
(
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01)

)
Image size multiplier for high-resolution retina displays. Must be between 1 and 3. This argument is deprecated: Use scale on Image.transformedSrc instead.
Default value: 1
  • merchantEditable ([Boolean!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01))
    Whether the line item can be edited or not.
  • name ([String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
    Name of the product.
  • nonFulfillableQuantity ([Int!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01))
    A count of the number of line items that cannot be fulfilled.
  • originalTotalSet ([MoneyBag!](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/moneybag))
    Total price (without discounts) of the line item, based on the original unit price of the variant x quantity in shop and presentment currencies.
  • originalUnitPriceSet ([MoneyBag!](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/moneybag))
    Variant price without any discounts applied in shop and presentment currencies.
  • product ([Product](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/product))
    The Product object associated with this line item’s variant.
  • quantity ([Int!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01))
    The number of variant items ordered.
  • refundableQuantity ([Int!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01))
    The line item’s quantity minus its refundedQuantity.
  • requiresShipping ([Boolean!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01))
    Whether physical shipping is required for the variant.
  • restockable ([Boolean!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01))
    Whether the line item’s variant has an ID and inventory is managed by Shopify.
  • sellingPlan ([LineItemSellingPlan](https://shopify.dev/docs/admin-api/graphql/reference/orders/lineitemsellingplan))
    The selling plan details associated with the line item.
  • sku ([String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
    Variant SKU number.
  • taxLines ([[TaxLine!]!](https://shopify.dev/docs/admin-api/graphql/reference/orders/taxline))
    The TaxLine object connected to this line item.
Argument Description
first
(
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01)

)
Truncate the array result to this size.
  • taxable ([Boolean!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01))
    Whether the variant is taxable.
  • title ([String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
    Title of the product or variant (this field only applies to custom line items).
  • totalDiscountSet ([MoneyBag!](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/moneybag))
    The sum of all AppliedDiscounts on this line item in shop and presentment currencies.
  • unfulfilledDiscountedTotalSet ([MoneyBag!](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/moneybag))
    The total discounted value of unfulfilled units in shop and presentment currencies.
  • unfulfilledOriginalTotalSet ([MoneyBag!](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/moneybag))
    The total value before discount of all unfulfilled units in shop and presentment currencies.
  • unfulfilledQuantity ([Int!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01))
    The number of units not yet fulfilled.
  • variant ([ProductVariant](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/productvariant))
    The Variant object associated with this line item.
  • variantTitle ([String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
    Name of the variant.
  • vendor ([String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
    Name of the vendor who made the variant.

Types that return LineItem

  • [DraftFulfillment.lineItems](https://shopify.dev/docs/admin-api/graphql/reference/shipping-and-fulfillment/draftfulfillment#lineitems-2021-01)
  • [FulfillmentLineItem.lineItem](https://shopify.dev/docs/admin-api/graphql/reference/shipping-and-fulfillment/fulfillmentlineitem#lineitem-2021-01)
  • [FulfillmentOrderLineItem.lineItem](https://shopify.dev/docs/admin-api/graphql/reference/shipping-and-fulfillment/fulfillmentorderlineitem#lineitem-2021-01)
  • [Order.nonFulfillableLineItems](https://shopify.dev/docs/admin-api/graphql/reference/orders/order#nonfulfillablelineitems-2021-01)
  • [Order.lineItems](https://shopify.dev/docs/admin-api/graphql/reference/orders/order#lineitems-2021-01)
  • [OrderStagedChangeDecrementItem.lineItem](https://shopify.dev/docs/admin-api/graphql/reference/orders/orderstagedchangedecrementitem#lineitem-2021-01)
  • [OrderStagedChangeIncrementItem.lineItem](https://shopify.dev/docs/admin-api/graphql/reference/orders/orderstagedchangeincrementitem#lineitem-2021-01)
  • [RefundLineItem.lineItem](https://shopify.dev/docs/admin-api/graphql/reference/orders/refundlineitem#lineitem-2021-01)

Implements

  • [Node](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/node)

Deprecated fields

  • canRestock ([Boolean!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01)) DEPRECATED
    Whether the line item’s variant has an ID and inventory is managed by Shopify.
    Deprecation warning
    Use restockable instead
  • discountedTotal ([Money!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#money-2021-01)) DEPRECATED
    The total line price after discounts are applied.
    Deprecation warning
    Use discountedTotalSet instead
  • discountedUnitPrice ([Money!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#money-2021-01)) DEPRECATED
    The price of a single variant unit after line item discounts are applied.
    Deprecation warning
    Use discountedUnitPriceSet instead
  • originalTotal ([Money!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#money-2021-01)) DEPRECATED
    Total price (without discounts) of the line item, based on the original unit price of the variant x quantity.
    Deprecation warning
    Use originalTotalSet instead
  • originalUnitPrice ([Money!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#money-2021-01)) DEPRECATED
    Variant price without any discounts applied.
    Deprecation warning
    Use originalUnitPriceSet instead
  • totalDiscount ([Money!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#money-2021-01)) DEPRECATED
    The sum of all AppliedDiscounts on this line item.
    Deprecation warning
    Use totalDiscountSet instead
  • unfulfilledDiscountedTotal ([Money!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#money-2021-01)) DEPRECATED
    The total discounted value of unfulfilled units.
    Deprecation warning
    Use unfulfilledDiscountedTotalSet instead
  • unfulfilledOriginalTotal ([Money!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#money-2021-01)) DEPRECATED
    The total value before discount of all unfulfilled units.
    Deprecation warning
    Use unfulfilledOriginalTotalSet instead

An auto-generated type for paginating through multiple LineItems.

On this page

Fields

  • edges ([[LineItemEdge!]!](https://shopify.dev/docs/admin-api/graphql/reference/orders/lineitem))
    A list of edges.
  • pageInfo ([PageInfo!](https://shopify.dev/docs/admin-api/graphql/reference/pageinfo))
    Information to aid in pagination.

An auto-generated type which holds one LineItem and a cursor during pagination.

On this page

Fields

  • cursor ([String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
    A cursor for use in pagination.
  • node ([LineItem!](https://shopify.dev/docs/admin-api/graphql/reference/orders/lineitem))
    The item at the end of LineItemEdge.

Types that return LineItemEdge

  • [LineItemConnection.edges](https://shopify.dev/docs/admin-api/graphql/reference/orders/lineitem#edges-2021-01)