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!
digitalContentUrl: DigitalContentUrl
thumbnail(
size: Int
format: ThumbnailFormatEnum = ORIGINAL
): Image
unitPrice: TaxedMoney!
undiscountedUnitPrice: TaxedMoney!
unitDiscount: Money!
unitDiscountReason: String
unitDiscountValue: PositiveDecimal!
unitDiscountType: DiscountValueTypeEnum
totalPrice: TaxedMoney!
undiscountedTotalPrice: TaxedMoney!
isPriceOverridden: Boolean
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!]
}
Fields
id ● ID!
ID of the order line.
privateMetadata ● [MetadataItem!]!
List of private metadata items. Requires staff permissions to access.
privateMetafield ● String
A single key from private metadata. Requires staff permissions to access.
Tip: Use GraphQL aliases to fetch multiple keys.
key ● String!
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 ● [String!]
metadata ● [MetadataItem!]!
List of public metadata items. Can be accessed without permissions.
metafield ● String
A single key from public metadata.
Tip: Use GraphQL aliases to fetch multiple keys.
key ● String!
metafields ● Metadata
Public metadata. Use keys to control which fields you want to include. The default is to include everything.
keys ● [String!]
productName ● String!
Name of the product in order line.
variantName ● String!
Name of the variant of product in order line.
productSku ● String
SKU of the product variant.
productVariantId ● String
The ID of the product variant.
isShippingRequired ● Boolean!
Whether the product variant requires shipping.
quantity ● Int!
Number of variant items ordered.
quantityFulfilled ● Int!
Number of variant items fulfilled.
taxRate ● Float!
Rate of tax applied on product variant.
digitalContentUrl ● DigitalContentUrl
thumbnail ● Image
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).
format ● ThumbnailFormatEnum
The format of the image. When not provided, format of the original image will be used.
unitPrice ● TaxedMoney!
Price of the single item in the order line with all the line-level discounts and order-level discount portions applied.
undiscountedUnitPrice ● TaxedMoney!
Price of the single item in the order line without any discount applied.
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 ● 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 ● 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 ● 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 ● TaxedMoney!
Price of the order line.
undiscountedTotalPrice ● TaxedMoney!
Price of the order line without discounts.
isPriceOverridden ● Boolean
Returns True, if the line unit price was overridden.
variant ● ProductVariant
A purchased product variant. Note: this field may be null if the variant has been removed from stock at all.
translatedProductName ● String!
Product name in the customer's language
translatedVariantName ● String!
Variant name in the customer's language
allocations ● [Allocation!]
List of allocations across warehouses.
saleId ● ID
Denormalized sale ID, set when order line is created for a product variant that is on sale.
quantityToFulfill ● Int!
A quantity of items remaining to be fulfilled.
taxClass ● TaxClass
Denormalized tax class of the product in this order line.
taxClassName ● String
Denormalized name of the tax class.
taxClassMetadata ● [MetadataItem!]!
Denormalized public metadata of the tax class.
taxClassPrivateMetadata ● [MetadataItem!]!
Denormalized private metadata of the tax class. Requires staff permissions to access.
voucherCode ● String
Voucher code that was used for this order line.
isGift ● Boolean
Determine if the line is a gift.
Added in Saleor 3.19discounts ● [OrderLineDiscount!]
List of applied discounts
Added in Saleor 3.21Interfaces
Node
An object with an ID
ObjectWithMetadata
Member Of
CustomerEvent object ● FulfillmentLine object ● Order object ● OrderEventOrderLineObject object ● OrderGrantedRefundLine object ● OrderLineDelete object ● OrderLineDiscountRemove object ● OrderLineDiscountUpdate object ● OrderLinesCreate object ● OrderLineUpdate object
Implemented By
TaxSourceLine union