Calculated Draft Order
Requires access scope.
The calculated fields for a draft order.
Anchor to FieldsFields
- Anchor to acceptAutomaticDiscountsaccept•Boolean
Automatic Discounts Whether or not to accept automatic discounts on the draft order during calculation. If false, only discount codes and custom draft order discounts (see
) will be applied. If true, eligible automatic discounts will be applied in addition to discount codes and custom draft order discounts.
- Anchor to alertsalerts•[Resource
Alert!]!non-null The list of alerts raised while calculating.
- Anchor to appliedDiscountapplied•Draft
Discount Order Applied Discount The custom order-level discount applied.
- Anchor to availableShippingRatesavailable•[Shipping
Shipping Rates Rate!]!non-null The available shipping rates. Requires a customer with a valid shipping address and at least one line item.
- Anchor to billingAddressMatchesShippingAddressbilling•Boolean!non-null
Address Matches Shipping Address Whether the billing address matches the shipping address.
- Anchor to currencyCodecurrency•Currency
Code Code!non-null The shop currency used for calculation.
- Anchor to customercustomer•Customer
The customer who will be sent an invoice.
- Anchor to discountCodesdiscount•[String!]!non-null
Codes All discount codes applied.
- Anchor to lineItemsline•[Calculated
Items Draft Order Line Item!]!non-null The list of the line items in the calculated draft order.
- Anchor to lineItemsSubtotalPriceline•Money
Items Subtotal Price Bag!non-null A subtotal of the line items and corresponding discounts, excluding include shipping charges, shipping discounts, taxes, or order discounts.
- Anchor to phonephone•String
The assigned phone number.
- Anchor to platformDiscountsplatform•[Draft
Discounts Order Platform Discount!]!non-null The list of platform discounts applied.
- Anchor to presentmentCurrencyCodepresentment•Currency
Currency Code Code!non-null The payment currency used for calculation.
- Anchor to purchasingEntitypurchasing•Purchasing
Entity Entity The purchasing entity.
- Anchor to shippingLineshipping•Shipping
Line Line The line item containing the shipping information and costs.
- Anchor to subtotalPriceSetsubtotal•Money
Price Set Bag!non-null The subtotal, of the line items and their discounts, excluding shipping charges, shipping discounts, and taxes.
- Anchor to taxesIncludedtaxes•Boolean!non-null
Included Whether the line item prices include taxes.
- Anchor to taxLinestax•[Tax
Lines Line!]!non-null The list of of taxes lines charged for each line item and shipping line.
- Anchor to totalDiscountsSettotal•Money
Discounts Set Bag!non-null Total discounts.
- Anchor to totalLineItemsPriceSettotal•Money
Line Items Price Set Bag!non-null Total price of line items.
- Anchor to totalPriceSettotal•Money
Price Set Bag!non-null The total price, includes taxes, shipping charges, and discounts.
- Anchor to totalQuantityOfLineItemstotal•Int!non-null
Quantity Of Line Items 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 totalShippingPriceSettotal•Money
Shipping Price Set Bag!non-null The total shipping price.
- Anchor to totalTaxSettotal•Money
Tax Set Bag!non-null The total tax.
- Anchor to transformerFingerprinttransformer•String
Fingerprint 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.
- Anchor to warningswarnings•[Draft
Order Warning!]!non-null The list of warnings raised while calculating.
Deprecated fields
- Anchor to marketNamemarket•String!non-nullDeprecated
Name - Anchor to marketRegionCountryCodemarket•Country
Region Country Code Code!non-nullDeprecated - Anchor to subtotalPricesubtotal•Money!non-nullDeprecated
Price - Anchor to totalPricetotal•Money!non-nullDeprecated
Price - Anchor to totalShippingPricetotal•Money!non-nullDeprecated
Shipping Price - Anchor to totalTaxtotal•Money!non-nullDeprecated
Tax
Anchor to MutationsMutations
- •mutation
Calculates the properties of a draft order. Useful for determining information such as total taxes or price without actually creating a draft order.
- Anchor to inputinput•Draft
Order Input!required The fields for the draft order.
Arguments
- Anchor to calculatedDraftOrdercalculated•Calculated
Draft Order Draft Order The calculated properties for a draft order.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields