Home > @infiniteobjects/shopify-data-manager > AdminTypes > DraftOrder
An order that a merchant creates on behalf of a customer. Draft orders are useful for merchants that need to do the following tasks:
For Draft orders in multiple currencies presentment_money
is the source of truth for what a customer is going to be charged and shop_money
is an estimate of what the merchant might receive in their local currency.
**Caution:** Only use this data if it’s required for your app’s functionality. Shopify will restrict [access to scopes](https://shopify.dev/api/usage/access-scopes) for apps that don’t have a legitimate use for the associated data.
Signature:
export interface DraftOrder extends CommentEventSubject, HasEvents, HasLocalizationExtensions, HasMetafields, LegacyInteroperability, Navigable, Node
Extends: CommentEventSubject, HasEvents, HasLocalizationExtensions, HasMetafields, LegacyInteroperability, Navigable, Node
Property | Modifiers | Type | Description |
---|---|---|---|
appliedDiscount? | Maybe<DraftOrderAppliedDiscount> | (Optional) The order-level discount applied to the draft order. | |
billingAddress? | Maybe<MailingAddress> | (Optional) The billing address of the customer. | |
billingAddressMatchesShippingAddress | Scalars[‘Boolean’][‘output’] | Whether the billing address matches the shipping address. | |
completedAt? | Maybe<Scalars[‘DateTime’][‘output’]> | (Optional) The date and time when the draft order converted to a new order, and the draft order’s status changed to **Completed**. | |
createdAt | Scalars[‘DateTime’][‘output’] | The date and time when the draft order was created in Shopify. | |
currencyCode | CurrencyCode | `${CurrencyCode}` | The three letter code for the currency of the store at the time of the most recent update to the draft order. | |
customAttributes | Array<Attribute> | The custom information added to the draft order on behalf of the customer. | |
customer? | Maybe<Customer> | (Optional) The customer who will be sent an invoice for the draft order, if there is one. | |
defaultCursor | Scalars[‘String’][‘output’] | A default cursor that returns the single next record, sorted ascending by ID. | |
email? | Maybe<Scalars[‘String’][‘output’]> | (Optional) The email address of the customer, which is used to send notifications. | |
events | EventConnection | The list of events associated with the draft order. | |
hasTimelineComment | Scalars[‘Boolean’][‘output’] | Whether the merchant has added timeline comments to the draft order. | |
id | Scalars[‘ID’][‘output’] | A globally-unique ID. | |
invoiceEmailTemplateSubject | Scalars[‘String’][‘output’] | The subject defined for the draft invoice email template. | |
invoiceSentAt? | Maybe<Scalars[‘DateTime’][‘output’]> | (Optional) The date and time when the invoice was last emailed to the customer. | |
invoiceUrl? | Maybe<Scalars[‘URL’][‘output’]> | (Optional) The link to the checkout, which is sent to the customer in the invoice email. | |
legacyResourceId | Scalars[‘UnsignedInt64’][‘output’] | The ID of the corresponding resource in the REST Admin API. | |
lineItems | DraftOrderLineItemConnection | The list of the line items in the draft order. | |
lineItemsSubtotalPrice | MoneyBag | The subtotal of the line items and corresponding discounts. The subtotal doesn’t include shipping charges, shipping discounts, taxes, or order discounts. | |
localizationExtensions | LocalizationExtensionConnection | List of localization extensions for the resource. | |
marketName | Scalars[‘String’][‘output’] | The name of the selected market. | |
marketRegionCountryCode | CountryCode | `${CountryCode}` | The selected market region country code for the draft order. | |
metafield? | Maybe<Metafield> | (Optional) Returns a metafield by namespace and key that belongs to the resource. | |
metafields | MetafieldConnection | List of metafields that belong to the resource. | |
name | Scalars[‘String’][‘output’] | The identifier for the draft order, which is unique within the store. For example, _#D1223_. | |
note2? | Maybe<Scalars[‘String’][‘output’]> | (Optional) The text from an optional note attached to the draft order. | |
order? | Maybe<Order> | (Optional) The order that was created from this draft order. | |
paymentTerms? | Maybe<PaymentTerms> | (Optional) The associated payment terms for this draft order. | |
phone? | Maybe<Scalars[‘String’][‘output’]> | (Optional) The phone number assigned to the draft order. | |
poNumber? | Maybe<Scalars[‘String’][‘output’]> | (Optional) The purchase order number. | |
presentmentCurrencyCode | CurrencyCode | `${CurrencyCode}` | The payment currency of the customer for this draft order. | |
privateMetafield? | Maybe<PrivateMetafield> | (Optional) Returns a private metafield by namespace and key that belongs to the resource. | |
privateMetafields | PrivateMetafieldConnection | List of private metafields that belong to the resource. | |
purchasingEntity? | Maybe<PurchasingEntity> | (Optional) The purchasing entity for the draft order. | |
ready | Scalars[‘Boolean’][‘output’] | Whether the Draft Order is ready and can be completed. Draft Orders might have asynchronous operations that can take time to finish. | |
reserveInventoryUntil? | Maybe<Scalars[‘DateTime’][‘output’]> | (Optional) The time after which inventory will automatically be restocked. | |
shippingAddress? | Maybe<MailingAddress> | (Optional) The shipping address of the customer. | |
shippingLine? | Maybe<ShippingLine> | (Optional) The line item that contains the shipping costs. | |
status | DraftOrderStatus | `${DraftOrderStatus}` | Status of the draft order. | |
subtotalPrice | Scalars[‘Money’][‘output’] | The subtotal of the line items and their discounts. The subtotal doesn’t include shipping charges, shipping discounts, or taxes. | |
subtotalPriceSet | MoneyBag | A subtotal of the line items and corresponding discounts. The subtotal doesn’t include shipping charges, shipping discounts, or taxes. | |
tags | Array<Scalars[‘String’][‘output’]> | A comma separated list of tags associated with the draft order. Updating tags overwrites any existing tags that were previously added to the draft order. To add new tags without overwriting existing tags, use the [tagsAdd](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) mutation. |
|
taxesIncluded | Scalars[‘Boolean’][‘output’] | Whether the line item prices include taxes. | |
taxExempt | Scalars[‘Boolean’][‘output’] | Whether the draft order is tax exempt. | |
taxLines | Array<TaxLine> | Total amount of taxes charged for each line item and shipping line. | |
totalDiscountsSet | MoneyBag | The total discounts for this draft order. | |
totalLineItemsPriceSet | MoneyBag | The total price of line items for this draft order. | |
totalPrice | Scalars[‘Money’][‘output’] | The total amount of the draft order, including taxes, shipping charges, and discounts. | |
totalPriceSet | MoneyBag | The total amount of the draft order including taxes, shipping charges, and discounts. | |
totalShippingPrice | Scalars[‘Money’][‘output’] | The total shipping charge for the draft order. | |
totalShippingPriceSet | MoneyBag | The total shipping charge for the draft order. | |
totalTax | Scalars[‘Money’][‘output’] | The total amount of taxes for the draft order. | |
totalTaxSet | MoneyBag | The total amount of taxes for the draft order. | |
totalWeight | Scalars[‘UnsignedInt64’][‘output’] | The total weight in grams of the draft order. | |
updatedAt | Scalars[‘DateTime’][‘output’] | The date and time when the draft order was last changed. The format is YYYY-MM-DD HH:mm:ss. For example, 2016-02-05 17:04:01. | |
visibleToCustomer | Scalars[‘Boolean’][‘output’] | Whether the draft order will be visible to the customer on the self-serve portal. |