OrderLine Object
Represents order line of particular order.
type OrderLine implements Node & ObjectWithMetadata {
id: ID!
privateMetadata: [MetadataItem!]!
privateMetafield(key: String!): String
privateMetafields(keys: [String!]): Metadata
metadata: [MetadataItem!]!
metafield(key: String!): String
metafields(keys: [String!]): Metadata
productName: String!
variantName: String!
productSku: String
productVariantId: String
isShippingRequired: Boolean!
quantity: Int!
quantityFulfilled: Int!
taxRate: Float!
thumbnail(size: Int, sizeRounding: ThumbnailSizeRoundingEnum = NEAREST, format: ThumbnailFormatEnum = ORIGINAL): Image
unitPrice: TaxedMoney!
undiscountedUnitPrice: TaxedMoney!
unitDiscount: Money!
unitDiscountReason: String
unitDiscountValue: PositiveDecimal!
unitDiscountType: DiscountValueTypeEnum
totalPrice: TaxedMoney!
undiscountedTotalPrice: TaxedMoney!
isPriceOverridden: Boolean
priceOverrideReason: String
variant: ProductVariant
translatedProductName: String!
translatedVariantName: String!
allocations: [Allocation!]
saleId: ID
quantityToFulfill: Int!
taxClass: TaxClass
taxClassName: String
taxClassMetadata: [MetadataItem!]!
taxClassPrivateMetadata: [MetadataItem!]!
voucherCode: String
isGift: Boolean
discounts: [OrderLineDiscount!]
}
Interfaces
Fields
id
id · ID!
ID of the order line.
privateMetadata
privateMetadata · [MetadataItem!]!
List of private metadata items. Requires staff permissions to access.
privateMetafield
privateMetafield · String
A single key from private metadata. Requires staff permissions to access.
Tip: Use GraphQL aliases to fetch multiple keys.
key
key · String!
privateMetafields
privateMetafields · Metadata
Private metadata. Requires staff permissions to access. Use keys to control which fields you want to include. The default is to include everything.
keys
keys · [String!]
metadata
metadata · [MetadataItem!]!
List of public metadata items. Can be accessed without permissions.
metafield
metafield · String
A single key from public metadata.
Tip: Use GraphQL aliases to fetch multiple keys.
key
key · String!
metafields
metafields · Metadata
Public metadata. Use keys to control which fields you want to include. The default is to include everything.
keys
keys · [String!]
productName
productName · String!
Name of the product in order line.
variantName
variantName · String!
Name of the variant of product in order line.
productSku
productSku · String
SKU of the product variant.
productVariantId
productVariantId · String
The ID of the product variant.
isShippingRequired
isShippingRequired · Boolean!
Whether the product variant requires shipping.
quantity
quantity · Int!
Number of variant items ordered.
quantityFulfilled
quantityFulfilled · Int!
Number of variant items fulfilled.
taxRate
taxRate · Float!
Rate of tax applied on product variant.
thumbnail
thumbnail · Image
size
size · Int
Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended). Thumbnails are generated only in the available sizes: 32, 64, 128, 256, 512, 1024, 2048, 4096; sizeRounding determines which one is used.
sizeRounding
sizeRounding · ThumbnailSizeRoundingEnum
Determines how the requested size is matched to an available thumbnail size.
Added in Saleor 3.23Default: NEAREST.
format
format · ThumbnailFormatEnum
The format of the image. When not provided, format of the original image will be used.
Default: ORIGINAL.
unitPrice
unitPrice · TaxedMoney!
Price of the single item in the order line with all the line-level discounts and order-level discount portions applied.
undiscountedUnitPrice
undiscountedUnitPrice · TaxedMoney!
Price of the single item in the order line without any discount applied.
unitDiscount
unitDiscount · Money!
Sum of the line-level discounts applied to the order line. Order-level discounts which affect the line are not visible in this field. For order-level discount portion (if any), please query order.discounts field.
unitDiscountReason
unitDiscountReason · String
Reason for line-level discounts applied on the order line. Order-level discounts which affect the line are not visible in this field. For order-level discount reason (if any), please query order.discounts field.
unitDiscountValue
unitDiscountValue · PositiveDecimal!
Value of the discount. Can store fixed value or percent value. This field shouldn’t be used when multiple discounts affect the line. There is a limitation, that after running checkoutComplete mutation the field always stores fixed value.
unitDiscountType
unitDiscountType · DiscountValueTypeEnum
Type of the discount: fixed or percent. This field shouldn’t be used when multiple discounts affect the line. There is a limitation, that after running checkoutComplete mutation the field is always set to fixed.
totalPrice
totalPrice · TaxedMoney!
Price of the order line.
undiscountedTotalPrice
undiscountedTotalPrice · TaxedMoney!
Price of the order line without discounts.
isPriceOverridden
isPriceOverridden · Boolean
Returns True, if the line unit price was overridden.
priceOverrideReason
priceOverrideReason · String
Reason explaining why a custom price was set on the line, copied from the checkout line when the order was created from a checkout.
Added in Saleor 3.23variant
variant · ProductVariant
A purchased product variant. Note: this field may be null if the variant has been removed from stock at all.
translatedProductName
translatedProductName · String!
Product name in the customer’s language
translatedVariantName
translatedVariantName · String!
Variant name in the customer’s language
allocations
allocations · [Allocation!]
List of allocations across warehouses.
saleId
saleId · ID
Denormalized sale ID, set when order line is created for a product variant that is on sale.
quantityToFulfill
quantityToFulfill · Int!
A quantity of items remaining to be fulfilled.
taxClass
taxClass · TaxClass
Denormalized tax class of the product in this order line.
taxClassName
taxClassName · String
Denormalized name of the tax class.
taxClassMetadata
taxClassMetadata · [MetadataItem!]!
Denormalized public metadata of the tax class.
taxClassPrivateMetadata
taxClassPrivateMetadata · [MetadataItem!]!
Denormalized private metadata of the tax class. Requires staff permissions to access.
voucherCode
voucherCode · String
Voucher code that was used for this order line.
isGift
isGift · Boolean
Determine if the line is a gift.
discounts
discounts · [OrderLineDiscount!]
List of applied discounts
Used by
- OrderGrantedRefundLine (objects)
- TaxSourceLine (unions)
- FulfillmentLine (objects)
- Order (objects)
- OrderEventOrderLineObject (objects)
- OrderLineDelete (objects)
- OrderLineDiscountRemove (objects)
- OrderLineDiscountUpdate (objects)
- OrderLineUpdate (objects)
- OrderLinesCreate (objects)
Schema: Saleor 3.23.43. Download SDL.