The input fields used to create or update a draft order.
Access Scopes
Fields
acceptAutomaticDiscounts:
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.
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 -
The extra information added to the customer.
customerId:
ID -
The customer associated with the draft order.
deposit:
DepositInput -
The input fields configuring the deposit requirement.
discountCodes:
String -
The list of discount codes that will be attempted to be applied to the draft order.
If the draft isn't eligible for any given discount code it will be skipped during calculation.
lineItems:
DraftOrderLineItemInput -
The list of product variant or custom line item.
Each draft order must include at least one line item.
NOTE: Draft orders don't currently support subscriptions.
localizationExtensions:
LocalizationExtensionInput -
The localization extensions attached to the draft order. For example, Tax IDs.
marketRegionCountryCode:
CountryCode -
The selected country code that determines the pricing of the draft order.
metafields:
MetafieldInput -
The list of metafields attached to the draft order. An existing metafield can not be used when creating a draft order.
note:
String -
The text of an optional note that a shop owner can attach to the draft order.
paymentTerms:
PaymentTermsInput -
The fields used to create payment terms.
presentmentCurrencyCode:
CurrencyCode -
The payment currency of the customer for this draft order.
purchasingEntity:
PurchasingEntityInput -
The purchasing entity for the draft order.
reserveInventoryUntil:
DateTime -
The time after which inventory reservation will expire.
sessionToken:
String -
The unique token identifying the draft order.
shippingAddress:
MailingAddressInput -
The mailing address to where the order will be shipped.
shippingLine:
ShippingLineInput -
The shipping line object, which details the shipping method used.
sourceName:
String -
The source of the checkout.
To use this field for sales attribution, you must register the channels that your app is managing.
You can register the channels that your app is managing by completing
[this Google Form](https://docs.google.com/forms/d/e/1FAIpQLScmVTZRQNjOJ7RD738mL1lGeFjqKVe_FM2tO9xsm21QEo5Ozg/viewform?usp=sf_link).
After you've submitted your request, you need to wait for your request to be processed by Shopify.
You can find a list of your channels in the Partner Dashboard, in your app's Marketplace extension.
You need to specify the handle as the `source_name` value in your request.
The handle is the channel that the order was placed from.
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.
transformerFingerprint:
String -
Fingerprint to guarantee bundles are handled correctly.