DraftOrder object

Version 2020-01 (Release candidate)

Represents a draft order. Merchants can use draft orders to create orders on behalf of their customers.

Required access

read_draft_orders access scope

Connections

events (EventConnection!)

List of events associated with the draft order.

after ( String )

Returns the elements that come after the specified cursor.

before ( String )

Returns the elements that come before the specified cursor.

first ( Int )

Returns up to the first n elements from the list.

last ( Int )

Returns up to the last n elements from the list.

query ( String )

Supported filter parameters:

  • comments
  • created_at
  • subject_type
  • verb

See the detailed search syntax.

reverse ( Boolean )

Reverse the order of the underlying list.
Default value: false

sortKey ( EventSortKeys )

Sort the underlying list by the given key.
Default value: ID

lineItems (DraftOrderLineItemConnection!)

List of the line items in the draft order.

after ( String )

Returns the elements that come after the specified cursor.

before ( String )

Returns the elements that come before the specified cursor.

first ( Int )

Returns up to the first n elements from the list.

last ( Int )

Returns up to the last n elements from the list.

reverse ( Boolean )

Reverse the order of the underlying list.
Default value: false

metafields (MetafieldConnection!)

A paginated list of metafields associated with the resource.

after ( String )

Returns the elements that come after the specified cursor.

before ( String )

Returns the elements that come before the specified cursor.

first ( Int )

Returns up to the first n elements from the list.

last ( Int )

Returns up to the last n elements from the list.

namespace ( String )

Finds all metafields with a specific namespace under the resource.

reverse ( Boolean )

Reverse the order of the underlying list.
Default value: false

privateMetafields (PrivateMetafieldConnection!)

List of private metafields.

after ( String )

Returns the elements that come after the specified cursor.

before ( String )

Returns the elements that come before the specified cursor.

first ( Int )

Returns up to the first n elements from the list.

last ( Int )

Returns up to the last n elements from the list.

namespace ( String )

Filter the private metafields by namespace.

reverse ( Boolean )

Reverse the order of the underlying list.
Default value: false

Fields

appliedDiscount (DraftOrderAppliedDiscount)

Order-level discount applied to the draft order.

billingAddress (MailingAddress)

Billing address of the customer.

completedAt (DateTime)

Date and time when the draft order converted to a new order, and the draft order's status changed to Completed.

createdAt (DateTime!)

Date and time when the draft order was created in Shopify.

currencyCode (CurrencyCode!)

Three letter code for the currency of the store at the time that the invoice is sent.

customAttributes ([Attribute!]!)

Custom information added to the draft order on behalf of your customer.

customer (Customer)

Customer who will be sent an invoice for the draft order, if there is one.

email (String)

Email address of the customer, which is used to send notifications to.

hasTimelineComment (Boolean!)

Whether the merchant has added timeline comments to the draft order.

id (ID!)

Globally unique identifier.

invoiceSentAt (DateTime)

Date and time when the invoice was last emailed to the customer.

invoiceUrl (URL)

Link to the checkout, which is sent to your customer in the invoice email.

legacyResourceId (UnsignedInt64!)

The ID of the corresponding resource in the REST Admin API.

metafield (Metafield)

The metafield associated with the resource.

key ( String! ) required

Identifier for the metafield (maximum of 30 characters).

namespace ( String! ) required

Container for a set of metafields (maximum of 20 characters).

name (String!)

Unique identifier for the draft order, which is unique within the store. For example, #D1223.

note2 (String)

Text from an optional note attached to the draft order.

order (Order)

Order that was created from this draft order.

privateMetafield (PrivateMetafield)

Returns a private metafield found by namespace and key.

key ( String! ) required

The key for the private metafield.

namespace ( String! ) required

The namespace for the private metafield.

shippingAddress (MailingAddress)

Shipping mailing address of the customer.

shippingLine (ShippingLine)

Line item that contains the shipping costs.

status (DraftOrderStatus!)

Status of the draft order.

subtotalPrice (Money!)

Subtotal of the line items and their discounts (does not contain shipping charges or shipping discounts, or taxes).

tags ([String!]!)

Tags added to the draft order.

taxExempt (Boolean!)

Whether the draft order is tax exempt.

taxLines ([TaxLine!]!)

Total amount of taxes charged for each line item and shipping line.

taxesIncluded (Boolean!)

Whether the line item prices include taxes.

totalPrice (Money!)

Total amount of the draft order (includes taxes, shipping charges, and discounts).

totalShippingPrice (Money!)

Total shipping charge for the draft order.

totalTax (Money!)

Total amount of taxes for the draft order.

totalWeight (UnsignedInt64!)

Total weight (grams) of the draft order.

updatedAt (DateTime!)

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).

Types that return DraftOrder

Mutations for DraftOrder

draftOrderCalculate

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

draftOrderComplete

Completes a draft order.

draftOrderCreate

Creates a draft order.

draftOrderDelete

Deletes a draft order.

draftOrderInvoicePreview

Previews a draft order invoice email.

draftOrderInvoiceSend

Sends an email invoice for a draft order.

draftOrderUpdate

Updates a draft order.

Implements

Version 2019-10 (Latest)

Represents a draft order. Merchants can use draft orders to create orders on behalf of their customers.

Required access

read_draft_orders access scope

Connections

events (EventConnection!)

List of events associated with the draft order.

after ( String )

Returns the elements that come after the specified cursor.

before ( String )

Returns the elements that come before the specified cursor.

first ( Int )

Returns up to the first n elements from the list.

last ( Int )

Returns up to the last n elements from the list.

query ( String )

Supported filter parameters:

  • comments
  • created_at
  • subject_type
  • verb

See the detailed search syntax.

reverse ( Boolean )

Reverse the order of the underlying list.
Default value: false

sortKey ( EventSortKeys )

Sort the underlying list by the given key.
Default value: ID

lineItems (DraftOrderLineItemConnection!)

List of the line items in the draft order.

after ( String )

Returns the elements that come after the specified cursor.

before ( String )

Returns the elements that come before the specified cursor.

first ( Int )

Returns up to the first n elements from the list.

last ( Int )

Returns up to the last n elements from the list.

reverse ( Boolean )

Reverse the order of the underlying list.
Default value: false

metafields (MetafieldConnection!)

A paginated list of metafields associated with the resource.

after ( String )

Returns the elements that come after the specified cursor.

before ( String )

Returns the elements that come before the specified cursor.

first ( Int )

Returns up to the first n elements from the list.

last ( Int )

Returns up to the last n elements from the list.

namespace ( String )

Finds all metafields with a specific namespace under the resource.

reverse ( Boolean )

Reverse the order of the underlying list.
Default value: false

privateMetafields (PrivateMetafieldConnection!)

List of private metafields.

after ( String )

Returns the elements that come after the specified cursor.

before ( String )

Returns the elements that come before the specified cursor.

first ( Int )

Returns up to the first n elements from the list.

last ( Int )

Returns up to the last n elements from the list.

namespace ( String )

Filter the private metafields by namespace.

reverse ( Boolean )

Reverse the order of the underlying list.
Default value: false

Fields

appliedDiscount (DraftOrderAppliedDiscount)

Order-level discount applied to the draft order.

billingAddress (MailingAddress)

Billing address of the customer.

completedAt (DateTime)

Date and time when the draft order converted to a new order, and the draft order's status changed to Completed.

createdAt (DateTime!)

Date and time when the draft order was created in Shopify.

currencyCode (CurrencyCode!)

Three letter code for the currency of the store at the time that the invoice is sent.

customAttributes ([Attribute!]!)

Custom information added to the draft order on behalf of your customer.

customer (Customer)

Customer who will be sent an invoice for the draft order, if there is one.

email (String)

Email address of the customer, which is used to send notifications to.

hasTimelineComment (Boolean!)

Whether the merchant has added timeline comments to the draft order.

id (ID!)

Globally unique identifier.

invoiceSentAt (DateTime)

Date and time when the invoice was last emailed to the customer.

invoiceUrl (URL)

Link to the checkout, which is sent to your customer in the invoice email.

legacyResourceId (UnsignedInt64!)

The ID of the corresponding resource in the REST Admin API.

metafield (Metafield)

The metafield associated with the resource.

key ( String! ) required

Identifier for the metafield (maximum of 30 characters).

namespace ( String! ) required

Container for a set of metafields (maximum of 20 characters).

name (String!)

Unique identifier for the draft order, which is unique within the store. For example, #D1223.

note2 (String)

Text from an optional note attached to the draft order.

order (Order)

Order that was created from this draft order.

privateMetafield (PrivateMetafield)

Returns a private metafield found by namespace and key.

key ( String! ) required

The key for the private metafield.

namespace ( String! ) required

The namespace for the private metafield.

shippingAddress (MailingAddress)

Shipping mailing address of the customer.

shippingLine (ShippingLine)

Line item that contains the shipping costs.

status (DraftOrderStatus!)

Status of the draft order.

subtotalPrice (Money!)

Subtotal of the line items and their discounts (does not contain shipping charges or shipping discounts, or taxes).

tags ([String!]!)

Tags added to the draft order.

taxExempt (Boolean!)

Whether the draft order is tax exempt.

taxLines ([TaxLine!]!)

Total amount of taxes charged for each line item and shipping line.

taxesIncluded (Boolean!)

Whether the line item prices include taxes.

totalPrice (Money!)

Total amount of the draft order (includes taxes, shipping charges, and discounts).

totalShippingPrice (Money!)

Total shipping charge for the draft order.

totalTax (Money!)

Total amount of taxes for the draft order.

totalWeight (UnsignedInt64!)

Total weight (grams) of the draft order.

updatedAt (DateTime!)

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).

Types that return DraftOrder

Mutations for DraftOrder

draftOrderCalculate

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

draftOrderComplete

Completes a draft order.

draftOrderCreate

Creates a draft order.

draftOrderDelete

Deletes a draft order.

draftOrderInvoicePreview

Previews a draft order invoice email.

draftOrderInvoiceSend

Sends an email invoice for a draft order.

draftOrderUpdate

Updates a draft order.

Implements

Version 2019-07

Represents a draft order. Merchants can use draft orders to create orders on behalf of their customers.

Required access

read_draft_orders access scope

Connections

events (EventConnection!)

List of events associated with the draft order.

after ( String )

Returns the elements that come after the specified cursor.

before ( String )

Returns the elements that come before the specified cursor.

first ( Int )

Returns up to the first n elements from the list.

last ( Int )

Returns up to the last n elements from the list.

query ( String )

Supported filter parameters:

  • comments
  • created_at
  • subject_type
  • verb

See the detailed search syntax.

reverse ( Boolean )

Reverse the order of the underlying list.
Default value: false

sortKey ( EventSortKeys )

Sort the underlying list by the given key.
Default value: ID

lineItems (DraftOrderLineItemConnection!)

List of the line items in the draft order.

after ( String )

Returns the elements that come after the specified cursor.

before ( String )

Returns the elements that come before the specified cursor.

first ( Int )

Returns up to the first n elements from the list.

last ( Int )

Returns up to the last n elements from the list.

reverse ( Boolean )

Reverse the order of the underlying list.
Default value: false

metafields (MetafieldConnection!)

A paginated list of metafields associated with the resource.

after ( String )

Returns the elements that come after the specified cursor.

before ( String )

Returns the elements that come before the specified cursor.

first ( Int )

Returns up to the first n elements from the list.

last ( Int )

Returns up to the last n elements from the list.

namespace ( String )

Finds all metafields with a specific namespace under the resource.

reverse ( Boolean )

Reverse the order of the underlying list.
Default value: false

Fields

appliedDiscount (DraftOrderAppliedDiscount)

Order-level discount applied to the draft order.

billingAddress (MailingAddress)

Billing address of the customer.

completedAt (DateTime)

Date and time when the draft order converted to a new order, and the draft order's status changed to Completed.

createdAt (DateTime!)

Date and time when the draft order was created in Shopify.

currencyCode (CurrencyCode!)

Three letter code for the currency of the store at the time that the invoice is sent.

customAttributes ([Attribute!]!)

Custom information added to the draft order on behalf of your customer.

customer (Customer)

Customer who will be sent an invoice for the draft order, if there is one.

email (String)

Email address of the customer, which is used to send notifications to.

hasTimelineComment (Boolean!)

Whether the merchant has added timeline comments to the draft order.

id (ID!)

Globally unique identifier.

invoiceSentAt (DateTime)

Date and time when the invoice was last emailed to the customer.

invoiceUrl (URL)

Link to the checkout, which is sent to your customer in the invoice email.

legacyResourceId (UnsignedInt64!)

The ID of the corresponding resource in the REST Admin API.

metafield (Metafield)

The metafield associated with the resource.

key ( String! ) required

Identifier for the metafield (maximum of 30 characters).

namespace ( String! ) required

Container for a set of metafields (maximum of 20 characters).

name (String!)

Unique identifier for the draft order, which is unique within the store. For example, #D1223.

note2 (String)

Text from an optional note attached to the draft order.

order (Order)

Order that was created from this draft order.

shippingAddress (MailingAddress)

Shipping mailing address of the customer.

shippingLine (ShippingLine)

Line item that contains the shipping costs.

status (DraftOrderStatus!)

Status of the draft order.

subtotalPrice (Money!)

Subtotal of the line items and their discounts (does not contain shipping charges or shipping discounts, or taxes).

tags ([String!]!)

Tags added to the draft order.

taxExempt (Boolean!)

Whether the draft order is tax exempt.

taxLines ([TaxLine!]!)

Total amount of taxes charged for each line item and shipping line.

taxesIncluded (Boolean!)

Whether the line item prices include taxes.

totalPrice (Money!)

Total amount of the draft order (includes taxes, shipping charges, and discounts).

totalShippingPrice (Money!)

Total shipping charge for the draft order.

totalTax (Money!)

Total amount of taxes for the draft order.

totalWeight (UnsignedInt64!)

Total weight (grams) of the draft order.

updatedAt (DateTime!)

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).

Types that return DraftOrder

Mutations for DraftOrder

draftOrderCalculate

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

draftOrderComplete

Completes a draft order.

draftOrderCreate

Creates a draft order.

draftOrderDelete

Deletes a draft order.

draftOrderInvoicePreview

Previews a draft order invoice email.

draftOrderInvoiceSend

Sends an email invoice for a draft order.

draftOrderUpdate

Updates a draft order.

Implements

Version 2019-04

Represents a draft order. Merchants can use draft orders to create orders on behalf of their customers.

Required access

read_draft_orders access scope

Connections

events (EventConnection!)

List of events associated with the draft order.

after ( String )

Returns the elements that come after the specified cursor.

before ( String )

Returns the elements that come before the specified cursor.

first ( Int )

Returns up to the first n elements from the list.

last ( Int )

Returns up to the last n elements from the list.

query ( String )

Supported filter parameters:

  • comments
  • created_at
  • subject_type
  • verb

See the detailed search syntax.

reverse ( Boolean )

Reverse the order of the underlying list.
Default value: false

sortKey ( EventSortKeys )

Sort the underlying list by the given key.
Default value: ID

lineItems (DraftOrderLineItemConnection!)

List of the line items in the draft order.

after ( String )

Returns the elements that come after the specified cursor.

before ( String )

Returns the elements that come before the specified cursor.

first ( Int )

Returns up to the first n elements from the list.

last ( Int )

Returns up to the last n elements from the list.

reverse ( Boolean )

Reverse the order of the underlying list.
Default value: false

metafields (MetafieldConnection!)

A paginated list of metafields associated with the resource.

after ( String )

Returns the elements that come after the specified cursor.

before ( String )

Returns the elements that come before the specified cursor.

first ( Int )

Returns up to the first n elements from the list.

last ( Int )

Returns up to the last n elements from the list.

namespace ( String )

Finds all metafields with a specific namespace under the resource.

reverse ( Boolean )

Reverse the order of the underlying list.
Default value: false

Fields

appliedDiscount (DraftOrderAppliedDiscount)

Order-level discount applied to the draft order.

billingAddress (MailingAddress)

Billing address of the customer.

completedAt (DateTime)

Date and time when the draft order converted to a new order, and the draft order's status changed to Completed.

createdAt (DateTime!)

Date and time when the draft order was created in Shopify.

currencyCode (CurrencyCode!)

Three letter code for the currency of the store at the time that the invoice is sent.

customAttributes ([Attribute!]!)

Custom information added to the draft order on behalf of your customer.

customer (Customer)

Customer who will be sent an invoice for the draft order, if there is one.

email (String)

Email address of the customer, which is used to send notifications to.

hasTimelineComment (Boolean!)

Whether the merchant has added timeline comments to the draft order.

id (ID!)

Globally unique identifier.

invoiceSentAt (DateTime)

Date and time when the invoice was last emailed to the customer.

invoiceUrl (URL)

Link to the checkout, which is sent to your customer in the invoice email.

legacyResourceId (UnsignedInt64!)

The ID of the corresponding resource in the REST Admin API.

metafield (Metafield)

The metafield associated with the resource.

key ( String! ) required

Identifier for the metafield (maximum of 30 characters).

namespace ( String! ) required

Container for a set of metafields (maximum of 20 characters).

name (String!)

Unique identifier for the draft order, which is unique within the store. For example, #D1223.

note2 (String)

Text from an optional note attached to the draft order.

order (Order)

Order that was created from this draft order.

shippingAddress (MailingAddress)

Shipping mailing address of the customer.

shippingLine (ShippingLine)

Line item that contains the shipping costs.

status (DraftOrderStatus!)

Status of the draft order.

subtotalPrice (Money!)

Subtotal of the line items and their discounts (does not contain shipping charges or shipping discounts, or taxes).

tags ([String!]!)

Tags added to the draft order.

taxExempt (Boolean!)

Whether the draft order is tax exempt.

taxLines ([TaxLine!]!)

Total amount of taxes charged for each line item and shipping line.

taxesIncluded (Boolean!)

Whether the line item prices include taxes.

totalPrice (Money!)

Total amount of the draft order (includes taxes, shipping charges, and discounts).

totalShippingPrice (Money!)

Total shipping charge for the draft order.

totalTax (Money!)

Total amount of taxes for the draft order.

totalWeight (UnsignedInt64!)

Total weight (grams) of the draft order.

updatedAt (DateTime!)

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).

Types that return DraftOrder

Mutations for DraftOrder

draftOrderCalculate

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

draftOrderComplete

Completes a draft order.

draftOrderCreate

Creates a draft order.

draftOrderDelete

Deletes a draft order.

draftOrderInvoicePreview

Previews a draft order invoice email.

draftOrderInvoiceSend

Sends an email invoice for a draft order.

draftOrderUpdate

Updates a draft order.

Implements

Sign up for a Partner account to get started.

Sign up