Skip to main content
Anchor to CalculatedDraftOrder

CalculatedDraftOrder

object

Requires read_draft_orders access scope.

The calculated fields for a draft order.

Anchor to acceptAutomaticDiscountsacceptAutomaticDiscounts
•Boolean

Whether or not to accept automatic discounts on the draft order during calculation. If false, only discount codes and custom draft order discounts (see appliedDiscount) will be applied. If true, eligible automatic discounts will be applied in addition to discount codes and custom draft order discounts.

•[ResourceAlert!]!non-null

The list of alerts raised while calculating.

•DraftOrderAppliedDiscount

The custom order-level discount applied.

Anchor to availableShippingRatesavailableShippingRates
•[ShippingRate!]!non-null

The available shipping rates. Requires a customer with a valid shipping address and at least one line item.

Anchor to billingAddressMatchesShippingAddressbillingAddressMatchesShippingAddress
•Boolean!non-null

Whether the billing address matches the shipping address.

•CurrencyCode!non-null

The shop currency used for calculation.

•Customer

The customer who will be sent an invoice.

•[String!]!non-null

All discount codes applied.

•[CalculatedDraftOrderLineItem!]!non-null

The list of the line items in the calculated draft order.

Anchor to lineItemsSubtotalPricelineItemsSubtotalPrice
•MoneyBag!non-null

A subtotal of the line items and corresponding discounts, excluding include shipping charges, shipping discounts, taxes, or order discounts.

•String

The assigned phone number.

•[DraftOrderPlatformDiscount!]!non-null

The list of platform discounts applied.

Anchor to presentmentCurrencyCodepresentmentCurrencyCode
•CurrencyCode!non-null

The payment currency used for calculation.

•PurchasingEntity

The purchasing entity.

•ShippingLine

The line item containing the shipping information and costs.

•MoneyBag!non-null

The subtotal, of the line items and their discounts, excluding shipping charges, shipping discounts, and taxes.

•Boolean!non-null

Whether the line item prices include taxes.

•[TaxLine!]!non-null

The list of of taxes lines charged for each line item and shipping line.

•MoneyBag!non-null

Total discounts.

Anchor to totalLineItemsPriceSettotalLineItemsPriceSet
•MoneyBag!non-null

Total price of line items.

•MoneyBag!non-null

The total price, includes taxes, shipping charges, and discounts.

Anchor to totalQuantityOfLineItemstotalQuantityOfLineItems
•Int!non-null

The sum of individual line item quantities. If the draft order has bundle items, this is the sum containing the quantities of individual items in the bundle.

Anchor to totalShippingPriceSettotalShippingPriceSet
•MoneyBag!non-null

The total shipping price.

•MoneyBag!non-null

The total tax.

Anchor to transformerFingerprinttransformerFingerprint
•String

Fingerprint of the current cart. In order to have bundles work, the fingerprint must be passed to each request as it was previously returned, unmodified.

•[DraftOrderWarning!]!non-null

The list of warnings raised while calculating.

Deprecated fields

•String!non-nullDeprecated
Anchor to marketRegionCountryCodemarketRegionCountryCode
•CountryCode!non-nullDeprecated
•Money!non-nullDeprecated
•Money!non-nullDeprecated
•Money!non-nullDeprecated
•Money!non-nullDeprecated

Was this section helpful?

•mutation

Calculates the properties of a draft order. Useful for determining information such as total taxes or price without actually creating a draft order.

Arguments

•DraftOrderInput!required

The fields for the draft order.


Fields

Anchor to calculatedDraftOrdercalculatedDraftOrder
•CalculatedDraftOrder

The calculated properties for a draft order.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.


Was this section helpful?
OSZAR »