API version: unstable
API version: 2021-07 Release candidate
API version: 2021-04 Latest
API version: 2021-01
API version: 2020-10
API version: 2020-07
API version: 2020-04
API version: 2020-01 Unsupported
API version: 2019-10 Unsupported

draftOrderCalculate mutation

Version unstable

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

Required access

write_draft_orders access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( DraftOrderInput! ) required

The fields for the draft order.

DraftOrderInput fields

  • appliedDiscount (DraftOrderAppliedDiscountInput)

    The discount that will be applied to the draft order. A draft order line item can have one discount. A draft order can also have one order-level discount.

  • billingAddress (MailingAddressInput)

    The mailing address associated with the payment method.

  • customAttributes ([AttributeInput!])

    Extra information added to the customer.

  • customerId (ID)

    Customer associated with the draft order.

  • email (String)

    The customer's email address.

  • Product variant line item or custom line item associated to the draft order. Each draft order must include at least one line item.

  • localizationExtensions ([LocalizationExtensionInput!])

    The localization extensions attached to the draft order. For example, Tax IDs.

  • metafields ([MetafieldInput!])

    Metafields attached to the draft order.

  • note (String)

    The text of an optional note that a shop owner can attach to the draft order.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields attached to the draft order.

  • shippingAddress (MailingAddressInput)

    The mailing address to where the order will be shipped.

  • shippingLine (ShippingLineInput)

    A shipping line object, which details the shipping method used.

  • tags ([String!])

    A comma separated list of tags that have been added to the draft order.

  • taxExempt (Boolean)

    Whether or not taxes are exempt for the draft order. If false, then Shopify will refer to the taxable field for each line item. If a customer is applied to the draft order, then Shopify will use the customer's tax exempt field instead.

  • useCustomerDefaultAddress (Boolean)

    Sent as part of a draft order object to load customer shipping information.

Return fields

  • calculatedDraftOrder (CalculatedDraftOrder)

    The calculated properties for a draft order.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.

Version 2021-07 (Release candidate)

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

Required access

write_draft_orders access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( DraftOrderInput! ) required

The fields for the draft order.

DraftOrderInput fields

  • appliedDiscount (DraftOrderAppliedDiscountInput)

    The discount that will be applied to the draft order. A draft order line item can have one discount. A draft order can also have one order-level discount.

  • billingAddress (MailingAddressInput)

    The mailing address associated with the payment method.

  • customAttributes ([AttributeInput!])

    Extra information added to the customer.

  • customerId (ID)

    Customer associated with the draft order.

  • email (String)

    The customer's email address.

  • Product variant line item or custom line item associated to the draft order. Each draft order must include at least one line item.

  • localizationExtensions ([LocalizationExtensionInput!])

    The localization extensions attached to the draft order. For example, Tax IDs.

  • metafields ([MetafieldInput!])

    Metafields attached to the draft order.

  • note (String)

    The text of an optional note that a shop owner can attach to the draft order.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields attached to the draft order.

  • shippingAddress (MailingAddressInput)

    The mailing address to where the order will be shipped.

  • shippingLine (ShippingLineInput)

    A shipping line object, which details the shipping method used.

  • tags ([String!])

    A comma separated list of tags that have been added to the draft order.

  • taxExempt (Boolean)

    Whether or not taxes are exempt for the draft order. If false, then Shopify will refer to the taxable field for each line item. If a customer is applied to the draft order, then Shopify will use the customer's tax exempt field instead.

  • useCustomerDefaultAddress (Boolean)

    Sent as part of a draft order object to load customer shipping information.

Return fields

  • calculatedDraftOrder (CalculatedDraftOrder)

    The calculated properties for a draft order.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.

Version 2021-04 (Latest)

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

Required access

write_draft_orders access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( DraftOrderInput! ) required

The fields for the draft order.

DraftOrderInput fields

  • appliedDiscount (DraftOrderAppliedDiscountInput)

    The discount that will be applied to the draft order. A draft order line item can have one discount. A draft order can also have one order-level discount.

  • billingAddress (MailingAddressInput)

    The mailing address associated with the payment method.

  • customAttributes ([AttributeInput!])

    Extra information added to the customer.

  • customerId (ID)

    Customer associated with the draft order.

  • email (String)

    The customer's email address.

  • Product variant line item or custom line item associated to the draft order. Each draft order must include at least one line item.

  • localizationExtensions ([LocalizationExtensionInput!])

    The localization extensions attached to the draft order. For example, Tax IDs.

  • metafields ([MetafieldInput!])

    Metafields attached to the draft order.

  • note (String)

    The text of an optional note that a shop owner can attach to the draft order.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields attached to the draft order.

  • shippingAddress (MailingAddressInput)

    The mailing address to where the order will be shipped.

  • shippingLine (ShippingLineInput)

    A shipping line object, which details the shipping method used.

  • tags ([String!])

    A comma separated list of tags that have been added to the draft order.

  • taxExempt (Boolean)

    Whether or not taxes are exempt for the draft order. If false, then Shopify will refer to the taxable field for each line item. If a customer is applied to the draft order, then Shopify will use the customer's tax exempt field instead.

  • useCustomerDefaultAddress (Boolean)

    Sent as part of a draft order object to load customer shipping information.

Return fields

  • calculatedDraftOrder (CalculatedDraftOrder)

    The calculated properties for a draft order.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.

Version 2021-01

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

Required access

write_draft_orders access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( DraftOrderInput! ) required

The fields for the draft order.

DraftOrderInput fields

  • appliedDiscount (DraftOrderAppliedDiscountInput)

    The discount that will be applied to the draft order. A draft order line item can have one discount. A draft order can also have one order-level discount.

  • billingAddress (MailingAddressInput)

    The mailing address associated with the payment method.

  • customAttributes ([AttributeInput!])

    Extra information added to the customer.

  • customerId (ID)

    Customer associated with the draft order.

  • email (String)

    The customer's email address.

  • Product variant line item or custom line item associated to the draft order. Each draft order must include at least one line item.

  • localizationExtensions ([LocalizationExtensionInput!])

    The localization extensions attached to the draft order. For example, Tax IDs.

  • metafields ([MetafieldInput!])

    Metafields attached to the draft order.

  • note (String)

    The text of an optional note that a shop owner can attach to the draft order.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields attached to the draft order.

  • shippingAddress (MailingAddressInput)

    The mailing address to where the order will be shipped.

  • shippingLine (ShippingLineInput)

    A shipping line object, which details the shipping method used.

  • tags ([String!])

    A comma separated list of tags that have been added to the draft order.

  • taxExempt (Boolean)

    Whether or not taxes are exempt for the draft order. If false, then Shopify will refer to the taxable field for each line item. If a customer is applied to the draft order, then Shopify will use the customer's tax exempt field instead.

  • useCustomerDefaultAddress (Boolean)

    Sent as part of a draft order object to load customer shipping information.

Return fields

  • calculatedDraftOrder (CalculatedDraftOrder)

    The calculated properties for a draft order.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.

Version 2020-10

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

Required access

write_draft_orders access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( DraftOrderInput! ) required

The fields for the draft order.

DraftOrderInput fields

  • appliedDiscount (DraftOrderAppliedDiscountInput)

    The discount that will be applied to the draft order. A draft order line item can have one discount. A draft order can also have one order-level discount.

  • billingAddress (MailingAddressInput)

    The mailing address associated with the payment method.

  • customAttributes ([AttributeInput!])

    Extra information added to the customer.

  • customerId (ID)

    Customer associated with the draft order.

  • email (String)

    The customer's email address.

  • Product variant line item or custom line item associated to the draft order. Each draft order must include at least one line item.

  • metafields ([MetafieldInput!])

    Metafields attached to the draft order.

  • note (String)

    The text of an optional note that a shop owner can attach to the draft order.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields attached to the draft order.

  • shippingAddress (MailingAddressInput)

    The mailing address to where the order will be shipped.

  • shippingLine (ShippingLineInput)

    A shipping line object, which details the shipping method used.

  • tags ([String!])

    A comma separated list of tags that have been added to the draft order.

  • taxExempt (Boolean)

    Whether or not taxes are exempt for the draft order. If false, then Shopify will refer to the taxable field for each line item. If a customer is applied to the draft order, then Shopify will use the customer's tax exempt field instead.

  • useCustomerDefaultAddress (Boolean)

    Sent as part of a draft order object to load customer shipping information.

Return fields

  • calculatedDraftOrder (CalculatedDraftOrder)

    The calculated properties for a draft order.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.

Version 2020-07

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

Required access

write_draft_orders access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( DraftOrderInput! ) required

The fields for the draft order.

DraftOrderInput fields

  • appliedDiscount (DraftOrderAppliedDiscountInput)

    The discount that will be applied to the draft order. A draft order line item can have one discount. A draft order can also have one order-level discount.

  • billingAddress (MailingAddressInput)

    The mailing address associated with the payment method.

  • customAttributes ([AttributeInput!])

    Extra information added to the customer.

  • customerId (ID)

    Customer associated with the draft order.

  • email (String)

    The customer's email address.

  • Product variant line item or custom line item associated to the draft order. Each draft order must include at least one line item.

  • metafields ([MetafieldInput!])

    Metafields attached to the draft order.

  • note (String)

    The text of an optional note that a shop owner can attach to the draft order.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields attached to the draft order.

  • shippingAddress (MailingAddressInput)

    The mailing address to where the order will be shipped.

  • shippingLine (ShippingLineInput)

    A shipping line object, which details the shipping method used.

  • tags ([String!])

    A comma separated list of tags that have been added to the draft order.

  • taxExempt (Boolean)

    Whether or not taxes are exempt for the draft order. If false, then Shopify will refer to the taxable field for each line item. If a customer is applied to the draft order, then Shopify will use the customer's tax exempt field instead.

  • useCustomerDefaultAddress (Boolean)

    Sent as part of a draft order object to load customer shipping information.

Return fields

  • calculatedDraftOrder (CalculatedDraftOrder)

    The calculated properties for a draft order.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.

Version 2020-04

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

Required access

write_draft_orders access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( DraftOrderInput! ) required

The fields for the draft order.

DraftOrderInput fields

  • appliedDiscount (DraftOrderAppliedDiscountInput)

    The discount that will be applied to the draft order. A draft order line item can have one discount. A draft order can also have one order-level discount.

  • billingAddress (MailingAddressInput)

    The mailing address associated with the payment method.

  • customAttributes ([AttributeInput!])

    Extra information added to the customer.

  • customerId (ID)

    Customer associated with the draft order.

  • email (String)

    The customer's email address.

  • Product variant line item or custom line item associated to the draft order. Each draft order must include at least one line item.

  • metafields ([MetafieldInput!])

    Metafields attached to the draft order.

  • note (String)

    The text of an optional note that a shop owner can attach to the draft order.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields attached to the draft order.

  • shippingAddress (MailingAddressInput)

    The mailing address to where the order will be shipped.

  • shippingLine (ShippingLineInput)

    A shipping line object, which details the shipping method used.

  • tags ([String!])

    A comma separated list of tags that have been added to the draft order.

  • taxExempt (Boolean)

    Whether or not taxes are exempt for the draft order. If false, then Shopify will refer to the taxable field for each line item. If a customer is applied to the draft order, then Shopify will use the customer's tax exempt field instead.

  • useCustomerDefaultAddress (Boolean)

    Sent as part of a draft order object to load customer shipping information.

Return fields

  • calculatedDraftOrder (CalculatedDraftOrder)

    The calculated properties for a draft order.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.

Version 2020-01 (Unsupported)

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

Required access

write_draft_orders access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( DraftOrderInput! ) required

The fields for the draft order.

DraftOrderInput fields

  • appliedDiscount (DraftOrderAppliedDiscountInput)

    The discount that will be applied to the draft order. A draft order line item can have one discount. A draft order can also have one order-level discount.

  • billingAddress (MailingAddressInput)

    The mailing address associated with the payment method.

  • customAttributes ([AttributeInput!])

    Extra information added to the customer.

  • customerId (ID)

    Customer associated with the draft order.

  • email (String)

    The customer's email address.

  • Product variant line item or custom line item associated to the draft order. Each draft order must include at least one line item.

  • metafields ([MetafieldInput!])

    Metafields attached to the draft order.

  • note (String)

    The text of an optional note that a shop owner can attach to the draft order.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields attached to the draft order.

  • shippingAddress (MailingAddressInput)

    The mailing address to where the order will be shipped.

  • shippingLine (ShippingLineInput)

    A shipping line object, which details the shipping method used.

  • tags ([String!])

    A comma separated list of tags that have been added to the draft order.

  • taxExempt (Boolean)

    Whether or not taxes are exempt for the draft order. If false, then Shopify will refer to the taxable field for each line item. If a customer is applied to the draft order, then Shopify will use the customer's tax exempt field instead.

  • useCustomerDefaultAddress (Boolean)

    Sent as part of a draft order object to load customer shipping information.

Return fields

  • calculatedDraftOrder (CalculatedDraftOrder)

    The calculated properties for a draft order.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.

Version 2019-10 (Unsupported)

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

Required access

write_draft_orders access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( DraftOrderInput! ) required

The fields for the draft order.

DraftOrderInput fields

  • appliedDiscount (DraftOrderAppliedDiscountInput)

    The discount that will be applied to the draft order. A draft order line item can have one discount. A draft order can also have one order-level discount.

  • billingAddress (MailingAddressInput)

    The mailing address associated with the payment method.

  • customAttributes ([AttributeInput!])

    Extra information added to the customer.

  • customerId (ID)

    Customer associated with the draft order.

  • email (String)

    The customer's email address.

  • Product variant line item or custom line item associated to the draft order. Each draft order must include at least one line item.

  • metafields ([MetafieldInput!])

    Metafields attached to the draft order.

  • note (String)

    The text of an optional note that a shop owner can attach to the draft order.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields attached to the draft order.

  • shippingAddress (MailingAddressInput)

    The mailing address to where the order will be shipped.

  • shippingLine (ShippingLineInput)

    A shipping line object, which details the shipping method used.

  • tags ([String!])

    A comma separated list of tags that have been added to the draft order.

  • taxExempt (Boolean)

    Whether or not taxes are exempt for the draft order. If false, then Shopify will refer to the taxable field for each line item. If a customer is applied to the draft order, then Shopify will use the customer's tax exempt field instead.

  • useCustomerDefaultAddress (Boolean)

    Sent as part of a draft order object to load customer shipping information.

Return fields

  • calculatedDraftOrder (CalculatedDraftOrder)

    The calculated properties for a draft order.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.

Version 2019-07 (Unsupported)

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

Required access

write_draft_orders access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( DraftOrderInput! ) required

The fields for the draft order.

DraftOrderInput fields

  • appliedDiscount (DraftOrderAppliedDiscountInput)

    The discount that will be applied to the draft order. A draft order line item can have one discount. A draft order can also have one order-level discount.

  • billingAddress (MailingAddressInput)

    The mailing address associated with the payment method.

  • customAttributes ([AttributeInput!])

    Extra information added to the customer.

  • customerId (ID)

    Customer associated with the draft order.

  • email (String)

    The customer's email address.

  • Product variant line item or custom line item associated to the draft order. Each draft order must include at least one line item.

  • metafields ([MetafieldInput!])

    Metafields attached to the draft order.

  • note (String)

    The text of an optional note that a shop owner can attach to the draft order.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields attached to the draft order.

  • shippingAddress (MailingAddressInput)

    The mailing address to where the order will be shipped.

  • shippingLine (ShippingLineInput)

    A shipping line object, which details the shipping method used.

  • tags ([String!])

    A comma separated list of tags that have been added to the draft order.

  • taxExempt (Boolean)

    Whether or not taxes are exempt for the draft order. If false, then Shopify will refer to the taxable field for each line item. If a customer is applied to the draft order, then Shopify will use the customer's tax exempt field instead.

  • useCustomerDefaultAddress (Boolean)

    Sent as part of a draft order object to load customer shipping information.

Return fields

  • calculatedDraftOrder (CalculatedDraftOrder)

    The calculated properties for a draft order.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.

Version 2019-04 (Unsupported)

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

Required access

write_draft_orders access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( DraftOrderInput! ) required

The fields for the draft order.

DraftOrderInput fields

  • appliedDiscount (DraftOrderAppliedDiscountInput)

    The discount that will be applied to the draft order. A draft order line item can have one discount. A draft order can also have one order-level discount.

  • billingAddress (MailingAddressInput)

    The mailing address associated with the payment method.

  • customAttributes ([AttributeInput!])

    Extra information added to the customer.

  • customerId (ID)

    Customer associated with the draft order.

  • email (String)

    The customer's email address.

  • Product variant line item or custom line item associated to the draft order. Each draft order must include at least one line item.

  • metafields ([MetafieldInput!])

    Metafields attached to the draft order.

  • note (String)

    The text of an optional note that a shop owner can attach to the draft order.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields attached to the draft order.

  • shippingAddress (MailingAddressInput)

    The mailing address to where the order will be shipped.

  • shippingLine (ShippingLineInput)

    A shipping line object, which details the shipping method used.

  • tags ([String!])

    A comma separated list of tags that have been added to the draft order.

  • taxExempt (Boolean)

    Whether or not taxes are exempt for the draft order. If false, then Shopify will refer to the taxable field for each line item. If a customer is applied to the draft order, then Shopify will use the customer's tax exempt field instead.

  • useCustomerDefaultAddress (Boolean)

    Sent as part of a draft order object to load customer shipping information.

Return fields

  • calculatedDraftOrder (CalculatedDraftOrder)

    The calculated properties for a draft order.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.