DraftOrderLineItem

Required access

read_draft_orders access scope

Represents a line item included in a draft order.

Show definition
# Represents a line item included in a draft order.
type DraftOrderLineItem implements Node {
  # Discount which will be applied to the line item or the overall order.
  appliedDiscount: DraftOrderAppliedDiscount

  # Whether this is a product variant line item, or a custom line item.
  # If set to true indicates a custom line item. If set to false indicates a product variant line item.
  custom: Boolean!

  # List of additional information (metafields) about the line item.
  customAttributes: [Attribute!]!

  # Line item price after discounts are applied.
  discountedTotal: Money!

  # The `discountedTotal` divided by `quantity`, resulting in the value of the discount per unit.
  discountedUnitPrice: Money!

  # Name of the service provider who fulfilled the order.
  #
  # Valid values are either **manual** or the name of the provider.
  # For example, **amazon**, **shipwire**.
  fulfillmentService: FulfillmentService!

  # Weight in grams. Can only be specified if this is a custom line item.
  grams: Int

  # Globally unique identifier.
  id: ID!

  # Image associated with the draft order line item.
  image(
    # Crops the image according to the specified region. This argument is
    # deprecated: Use `crop` on `Image.transformedSrc` instead.
    crop: CropRegion

    # Image height in pixels between 1 and 2048. This argument is deprecated: Use
    # `maxHeight` on `Image.transformedSrc` instead.
    maxHeight: Int

    # Image width in pixels between 1 and 2048. This argument is deprecated: Use `maxWidth` on `Image.transformedSrc` instead.
    maxWidth: Int

    # Image size multiplier for high-resolution retina displays. Must be between 1
    # and 3. This argument is deprecated: Use `scale` on `Image.transformedSrc` instead.
    scale: Int = 1
  ): Image

  # Whether the line item represents the puchase of a gift card.
  isGiftCard: Boolean!

  # Name of the product.
  name: String!

  # Total price (without discounts) of the line item, based on the original unit price of the variant x quantity.
  originalTotal: Money!

  # Variant price without any discounts applied.
  originalUnitPrice: Money!

  # The product corresponding to the line item’s product variant.
  product: Product

  # Number of variant items requested in the draft order.
  quantity: Int!

  # Whether physical shipping is required for the variant.
  requiresShipping: Boolean!

  # Variant SKU number.
  sku: String

  # A list of tax line objects, each of which details the total taxes applicable to the order.
  taxLines: [TaxLine!]!

  # Whether the variant is taxable.
  taxable: Boolean!

  # Title of the product or variant (this field only applies to custom line items).
  title: String!

  # Total value of the discount applied to the line item.
  totalDiscount: Money!

  # Associated variant for the line item.
  variant: ProductVariant

  # Name of the variant.
  variantTitle: String

  # Name of the vendor who made the variant.
  vendor: String

  # Weight unit and value for a draft order line item.
  weight: Weight
}

Implements

Fields

appliedDiscount   (DraftOrderAppliedDiscount)

Discount which will be applied to the line item or the overall order.

custom   (Boolean!)

Whether this is a product variant line item, or a custom line item. If set to true indicates a custom line item. If set to false indicates a product variant line item.

customAttributes   ([Attribute!]!)

List of additional information (metafields) about the line item.

discountedTotal   (Money!)

Line item price after discounts are applied.

discountedUnitPrice   (Money!)

The discountedTotal divided by quantity, resulting in the value of the discount per unit.

fulfillmentService   (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.

id   (ID!)

Globally unique identifier.

image   (Image)

Image associated with the draft order line item.

Argument Type Default Description
crop

CropRegion

Crops the image according to the specified region. This argument is deprecated: Use crop on Image.transformedSrc instead.

maxHeight

Int

Image height in pixels between 1 and 2048. This argument is deprecated: Use maxHeight on Image.transformedSrc instead.

maxWidth

Int

Image width in pixels between 1 and 2048. This argument is deprecated: Use maxWidth on Image.transformedSrc instead.

scale

Int

1

Image size multiplier for high-resolution retina displays. Must be between 1 and 3. This argument is deprecated: Use scale on Image.transformedSrc instead.

isGiftCard   (Boolean!)

Whether the line item represents the puchase of a gift card.

name   (String!)

Name of the product.

originalTotal   (Money!)

Total price (without discounts) of the line item, based on the original unit price of the variant x quantity.

originalUnitPrice   (Money!)

Variant price without any discounts applied.

product   (Product)

The product corresponding to the line item’s product variant.

quantity   (Int!)

Number of variant items requested in the draft order.

requiresShipping   (Boolean!)

Whether physical shipping is required for the variant.

sku   (String)

Variant SKU number.

taxLines   ([TaxLine!]!)

A list of tax line objects, each of which details the total taxes applicable to the order.

taxable   (Boolean!)

Whether the variant is taxable.

title   (String!)

Title of the product or variant (this field only applies to custom line items).

totalDiscount   (Money!)

Total value of the discount applied to the line item.

variant   (ProductVariant)

Associated variant for the line item.

variantTitle   (String)

Name of the variant.

vendor   (String)

Name of the vendor who made the variant.

weight   (Weight)

Weight unit and value for a draft order line item.

Deprecated fields

Show/Hide

grams   (Int)

deprecated

Weight in grams. Can only be specified if this is a custom line item.

Deprecation warning

Use weight instead

Sign up for a Partner account to get started.

Sign up