Skip to main content

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
}
Expand ▼

Fields

OrderLine.id ● ID! non-null scalar miscellaneous

ID of the order line.

OrderLine.privateMetadata ● [MetadataItem!]! non-null object miscellaneous

List of private metadata items. Requires staff permissions to access.

OrderLine.privateMetafield ● String scalar miscellaneous

A single key from private metadata. Requires staff permissions to access.

Tip: Use GraphQL aliases to fetch multiple keys.

OrderLine.privateMetafield.key ● String! non-null scalar miscellaneous

OrderLine.privateMetafields ● Metadata scalar miscellaneous

Private metadata. Requires staff permissions to access. Use keys to control which fields you want to include. The default is to include everything.

OrderLine.privateMetafields.keys ● [String!] list scalar miscellaneous

OrderLine.metadata ● [MetadataItem!]! non-null object miscellaneous

List of public metadata items. Can be accessed without permissions.

OrderLine.metafield ● String scalar miscellaneous

A single key from public metadata.

Tip: Use GraphQL aliases to fetch multiple keys.

OrderLine.metafield.key ● String! non-null scalar miscellaneous

OrderLine.metafields ● Metadata scalar miscellaneous

Public metadata. Use keys to control which fields you want to include. The default is to include everything.

OrderLine.metafields.keys ● [String!] list scalar miscellaneous

OrderLine.productName ● String! non-null scalar miscellaneous

Name of the product in order line.

OrderLine.variantName ● String! non-null scalar miscellaneous

Name of the variant of product in order line.

OrderLine.productSku ● String scalar miscellaneous

SKU of the product variant.

OrderLine.productVariantId ● String scalar miscellaneous

The ID of the product variant.

OrderLine.isShippingRequired ● Boolean! non-null scalar miscellaneous

Whether the product variant requires shipping.

OrderLine.quantity ● Int! non-null scalar miscellaneous

Number of variant items ordered.

OrderLine.quantityFulfilled ● Int! non-null scalar miscellaneous

Number of variant items fulfilled.

OrderLine.taxRate ● Float! non-null scalar miscellaneous

Rate of tax applied on product variant.

OrderLine.digitalContentUrl ● DigitalContentUrl object products

OrderLine.thumbnail ● Image object miscellaneous

OrderLine.thumbnail.size ● Int scalar miscellaneous

Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended).

OrderLine.thumbnail.format ● ThumbnailFormatEnum enum miscellaneous

The format of the image. When not provided, format of the original image will be used.

OrderLine.unitPrice ● TaxedMoney! non-null object miscellaneous

Price of the single item in the order line with all the line-level discounts and order-level discount portions applied.

OrderLine.undiscountedUnitPrice ● TaxedMoney! non-null object miscellaneous

Price of the single item in the order line without any discount applied.

OrderLine.unitDiscount ● Money! non-null object miscellaneous

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.

OrderLine.unitDiscountReason ● String scalar miscellaneous

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.

OrderLine.unitDiscountValue ● PositiveDecimal! non-null scalar miscellaneous

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.

OrderLine.unitDiscountType ● DiscountValueTypeEnum enum discounts

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.

OrderLine.totalPrice ● TaxedMoney! non-null object miscellaneous

Price of the order line.

OrderLine.undiscountedTotalPrice ● TaxedMoney! non-null object miscellaneous

Price of the order line without discounts.

OrderLine.isPriceOverridden ● Boolean scalar miscellaneous

Returns True, if the line unit price was overridden.

OrderLine.variant ● ProductVariant object products

A purchased product variant. Note: this field may be null if the variant has been removed from stock at all.

Requires one of the following permissions to include the unpublished items: MANAGE_ORDERSMANAGE_DISCOUNTSMANAGE_PRODUCTS

OrderLine.translatedProductName ● String! non-null scalar miscellaneous

Product name in the customer's language

OrderLine.translatedVariantName ● String! non-null scalar miscellaneous

Variant name in the customer's language

OrderLine.allocations ● [Allocation!] list object products

List of allocations across warehouses.

Requires one of the following permissions: MANAGE_PRODUCTSMANAGE_ORDERS

OrderLine.saleId ● ID scalar miscellaneous

Denormalized sale ID, set when order line is created for a product variant that is on sale.

OrderLine.quantityToFulfill ● Int! non-null scalar miscellaneous

A quantity of items remaining to be fulfilled.

OrderLine.taxClass ● TaxClass object taxes

Denormalized tax class of the product in this order line.

Requires one of the following permissions: AUTHENTICATED_STAFF_USERAUTHENTICATED_APP

OrderLine.taxClassName ● String scalar miscellaneous

Denormalized name of the tax class.

OrderLine.taxClassMetadata ● [MetadataItem!]! non-null object miscellaneous

Denormalized public metadata of the tax class.

OrderLine.taxClassPrivateMetadata ● [MetadataItem!]! non-null object miscellaneous

Denormalized private metadata of the tax class. Requires staff permissions to access.

OrderLine.voucherCode ● String scalar miscellaneous

Voucher code that was used for this order line.

OrderLine.isGift ● Boolean scalar miscellaneous

Determine if the line is a gift.

Added in Saleor 3.19
This API is currently in Feature Preview and can be subject to changes at later point.

Interfaces

Node interface miscellaneous

An object with an ID

ObjectWithMetadata interface miscellaneous

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