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

DraftOrder object

Version unstable

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.

    Argument Description
    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 for more information about using filters.

    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

  • List of the line items in the draft order.

    Argument Description
    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

  • localizationExtensions (LocalizationExtensionConnection!)

    List of localization extensions for the resource.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    countryCodes ( [CountryCode!] )

    The country codes of the extensions.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    purposes ( [LocalizationExtensionPurpose!] )

    The purpose of the extensions.

    reverse ( Boolean )

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

  • metafields (MetafieldConnection!)

    A paginated list of metafields associated with the resource.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    key ( String! ) required

    The key for the private metafield.

    namespace ( String! ) required

    The namespace for the private metafield.

  • ready (Boolean!)

    Whether or not the Draft Order is ready and can be completed. Draft Orders may have asynchronous operations that can take time to finish.

  • shippingAddress (MailingAddress)

    Shipping mailing address of the customer.

  • shippingLine (ShippingLine)

    Line item that contains the shipping costs.

  • 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!]!)

    A comma separated list of tags that have been 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

Implements

Version unstable

An auto-generated type for paginating through multiple DraftOrders.

Fields

Types that return DraftOrder

Mutations for DraftOrder

Version unstable

An auto-generated type which holds one DraftOrder and a cursor during pagination.

Fields

  • cursor (String!)

    A cursor for use in pagination.

  • node (DraftOrder!)

    The item at the end of DraftOrderEdge.

Types that return DraftOrder

Mutations for DraftOrder

Version 2021-04 (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.

    Argument Description
    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 for more information about using filters.

    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

  • List of the line items in the draft order.

    Argument Description
    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

  • localizationExtensions (LocalizationExtensionConnection!)

    List of localization extensions for the resource.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    countryCodes ( [CountryCode!] )

    The country codes of the extensions.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    purposes ( [LocalizationExtensionPurpose!] )

    The purpose of the extensions.

    reverse ( Boolean )

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

  • metafields (MetafieldConnection!)

    A paginated list of metafields associated with the resource.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    key ( String! ) required

    The key for the private metafield.

    namespace ( String! ) required

    The namespace for the private metafield.

  • ready (Boolean!)

    Whether or not the Draft Order is ready and can be completed. Draft Orders may have asynchronous operations that can take time to finish.

  • shippingAddress (MailingAddress)

    Shipping mailing address of the customer.

  • shippingLine (ShippingLine)

    Line item that contains the shipping costs.

  • 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!]!)

    A comma separated list of tags that have been 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

Implements

Version 2021-04 (Release candidate)

An auto-generated type for paginating through multiple DraftOrders.

On this page

Fields

Version 2021-04 (Release candidate)

An auto-generated type which holds one DraftOrder and a cursor during pagination.

Fields

  • cursor (String!)

    A cursor for use in pagination.

  • node (DraftOrder!)

    The item at the end of DraftOrderEdge.

Types that return DraftOrderEdge

Version 2021-01 (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.

    Argument Description
    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 for more information about using filters.

    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

  • List of the line items in the draft order.

    Argument Description
    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

  • localizationExtensions (LocalizationExtensionConnection!)

    List of localization extensions for the resource.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    countryCodes ( [CountryCode!] )

    The country codes of the extensions.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    purposes ( [LocalizationExtensionPurpose!] )

    The purpose of the extensions.

    reverse ( Boolean )

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

  • metafields (MetafieldConnection!)

    A paginated list of metafields associated with the resource.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    key ( String! ) required

    The key for the private metafield.

    namespace ( String! ) required

    The namespace for the private metafield.

  • ready (Boolean!)

    Whether or not the Draft Order is ready and can be completed. Draft Orders may have asynchronous operations that can take time to finish.

  • shippingAddress (MailingAddress)

    Shipping mailing address of the customer.

  • shippingLine (ShippingLine)

    Line item that contains the shipping costs.

  • 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!]!)

    A comma separated list of tags that have been 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

Implements

Version 2021-01 (Latest)

An auto-generated type for paginating through multiple DraftOrders.

On this page

Fields

Version 2021-01 (Latest)

An auto-generated type which holds one DraftOrder and a cursor during pagination.

Fields

  • cursor (String!)

    A cursor for use in pagination.

  • node (DraftOrder!)

    The item at the end of DraftOrderEdge.

Types that return DraftOrderEdge

Version 2020-10

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.

    Argument Description
    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 for more information about using filters.

    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

  • List of the line items in the draft order.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    key ( String! ) required

    The key for the private metafield.

    namespace ( String! ) required

    The namespace for the private metafield.

  • ready (Boolean!)

    Whether or not the Draft Order is ready and can be completed. Draft Orders may have asynchronous operations that can take time to finish.

  • shippingAddress (MailingAddress)

    Shipping mailing address of the customer.

  • shippingLine (ShippingLine)

    Line item that contains the shipping costs.

  • 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!]!)

    A comma separated list of tags that have been 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

Implements

Version 2020-10

An auto-generated type for paginating through multiple DraftOrders.

On this page

Fields

Version 2020-10

An auto-generated type which holds one DraftOrder and a cursor during pagination.

Fields

  • cursor (String!)

    A cursor for use in pagination.

  • node (DraftOrder!)

    The item at the end of DraftOrderEdge.

Types that return DraftOrderEdge

Version 2020-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.

    Argument Description
    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 for more information about using filters.

    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

  • List of the line items in the draft order.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    key ( String! ) required

    The key for the private metafield.

    namespace ( String! ) required

    The namespace for the private metafield.

  • ready (Boolean!)

    Whether or not the Draft Order is ready and can be completed. Draft Orders may have asynchronous operations that can take time to finish.

  • shippingAddress (MailingAddress)

    Shipping mailing address of the customer.

  • shippingLine (ShippingLine)

    Line item that contains the shipping costs.

  • 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!]!)

    A comma separated list of tags that have been 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

Implements

Version 2020-07

An auto-generated type for paginating through multiple DraftOrders.

On this page

Fields

Version 2020-07

An auto-generated type which holds one DraftOrder and a cursor during pagination.

Fields

  • cursor (String!)

    A cursor for use in pagination.

  • node (DraftOrder!)

    The item at the end of DraftOrderEdge.

Types that return DraftOrderEdge

Version 2020-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.

    Argument Description
    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 for more information about using filters.

    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

  • List of the line items in the draft order.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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 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!]!)

    A comma separated list of tags that have been 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

Implements

Version 2020-04

An auto-generated type for paginating through multiple DraftOrders.

On this page

Fields

Version 2020-04

An auto-generated type which holds one DraftOrder and a cursor during pagination.

Fields

  • cursor (String!)

    A cursor for use in pagination.

  • node (DraftOrder!)

    The item at the end of DraftOrderEdge.

Types that return DraftOrderEdge

Version 2020-01 (Unsupported)

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.

    Argument Description
    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 for more information about using filters.

    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

  • List of the line items in the draft order.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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 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!]!)

    A comma separated list of tags that have been 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

Implements

Version 2020-01 (Unsupported)

An auto-generated type for paginating through multiple DraftOrders.

On this page

Fields

Version 2020-01 (Unsupported)

An auto-generated type which holds one DraftOrder and a cursor during pagination.

Fields

  • cursor (String!)

    A cursor for use in pagination.

  • node (DraftOrder!)

    The item at the end of DraftOrderEdge.

Types that return DraftOrderEdge

Version 2019-10 (Unsupported)

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.

    Argument Description
    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 for more information about using filters.

    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

  • List of the line items in the draft order.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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 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!]!)

    A comma separated list of tags that have been 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

Implements

Version 2019-10 (Unsupported)

An auto-generated type for paginating through multiple DraftOrders.

On this page

Fields

Version 2019-10 (Unsupported)

An auto-generated type which holds one DraftOrder and a cursor during pagination.

Fields

  • cursor (String!)

    A cursor for use in pagination.

  • node (DraftOrder!)

    The item at the end of DraftOrderEdge.

Types that return DraftOrderEdge

Version 2019-07 (Unsupported)

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.

    Argument Description
    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 for more information about using filters.

    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

  • List of the line items in the draft order.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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 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!]!)

    A comma separated list of tags that have been 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

Implements

Version 2019-07 (Unsupported)

An auto-generated type for paginating through multiple DraftOrders.

On this page

Fields

Version 2019-07 (Unsupported)

An auto-generated type which holds one DraftOrder and a cursor during pagination.

Fields

  • cursor (String!)

    A cursor for use in pagination.

  • node (DraftOrder!)

    The item at the end of DraftOrderEdge.

Types that return DraftOrderEdge

Version 2019-04 (Unsupported)

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.

    Argument Description
    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 for more information about using filters.

    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

  • List of the line items in the draft order.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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.

    Argument Description
    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 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!]!)

    A comma separated list of tags that have been 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

Implements

Version 2019-04 (Unsupported)

An auto-generated type for paginating through multiple DraftOrders.

On this page

Fields

Version 2019-04 (Unsupported)

An auto-generated type which holds one DraftOrder and a cursor during pagination.

Fields

  • cursor (String!)

    A cursor for use in pagination.

  • node (DraftOrder!)

    The item at the end of DraftOrderEdge.

Types that return DraftOrderEdge

Samples