Order

Required access

read_orders access scope

An order represents an agreement to do business between a customer and a merchant.

Show definition
# An order represents an agreement to do business between a customer and a merchant.
type Order implements CommentEventSubject & LegacyInteroperability & Node {
  # Generated messages that appear at the top of an order page in the Shopify admin.
  # For example, _this is a test order_.
  alerts: [ResourceAlert!]!

  # Mailing address provided by the customer.
  # Not all orders have mailing addresses.
  billingAddress: MailingAddress

  # Whether the billing address matches the shipping address.
  billingAddressMatchesShippingAddress: Boolean!

  # Whether the order can be manually marked as paid.
  canMarkAsPaid: Boolean!

  # Reason the order was canceled.
  # Returns null if the order wasn't canceled.
  cancelReason: OrderCancelReason

  # Date and time when the order was canceled.
  # Returns null if the order wasn't canceled.
  cancelledAt: DateTime

  # Whether payment for the order can be captured.
  # Returns true when the customer's credit card has been authorized for payment and the authorization period has not expired.
  capturable: Boolean!

  # Amount of the order-level discount (does not contain any line item discounts).
  cartDiscountAmount: Money

  # Amount of the order-level discount (does not contain any line item discounts) in shop and presentment currencies.
  cartDiscountAmountSet: MoneyBag

  # Channel that created the order.
  channel: Channel

  # The ip address of the client that is associated with this order.
  clientIp: String

  # Whether the order is closed.
  closed: Boolean!

  # Date and time when the order closed.
  # If the order is not closed, then this field is null.
  closedAt: DateTime

  # Whether inventory has been reserved for the order.
  confirmed: Boolean!

  # Date and time when the order was created in Shopify.
  createdAt: DateTime!

  # The currency of the store at the time of the order.
  # If payment hasn't occurred, then this field is null.
  currencyCode: CurrencyCode!

  # Custom information added to the order by your customer
  #         (Also referred to as note attributes).
  customAttributes: [Attribute!]!

  # Unique identifier of the customer who placed the order.
  # Not all orders have customers associated with them.
  customer: Customer

  # Whether the customer agreed to receive marketing materials.
  customerAcceptsMarketing: Boolean!

  # Description of the customer's experience with the store leading up to the order.
  customerJourney: CustomerJourney

  # A two-letter or three-letter language code, optionally followed by a region modifier.
  # Example values could be 'en', 'en-CA', 'en-PIRATE'.
  customerLocale: String

  # Discounts that have been applied on the order.
  discountApplications(
    # Returns the elements that come after the specified cursor.
    after: String

    # Returns the elements that come before the specified cursor.
    before: String

    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns up to the last `n` elements from the list.
    last: Int

    # Reverse the order of the underlying list.
    reverse: Boolean = false
  ): DiscountApplicationConnection!

  # Discount code provided by the customer.
  discountCode: String

  # Primary address of the customer, which is shown on the order.
  displayAddress: MailingAddress

  # Financial status of the order that can be shown to the merchant.
  # This field does not capture all the possible details of an order's financial
  # state and should only be used for display summary purposes.
  displayFinancialStatus: OrderDisplayFinancialStatus

  # Fulfillment status for the order that can be shown to the merchant.
  # This field does not capture all the possible details of an order's fulfillment
  # state. It should only be used for display summary purposes.
  displayFulfillmentStatus: OrderDisplayFulfillmentStatus!

  # Summary of each dispute associated with the order. Sorted in ascending (ASC) order by ID.
  disputes: [OrderDisputeSummary!]!

  # List of possible fulfilments that can be made for the order (includes line items that can be partially fulfilled).
  draftFulfillments: [DraftFulfillment!]!

  # Email address provided by the customer.
  email: String

  # List of internal events associated with the order.
  events(
    # Returns the elements that come after the specified cursor.
    after: String

    # Returns the elements that come before the specified cursor.
    before: String

    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns up to the last `n` elements from the list.
    last: Int

    # Supported filter parameters:
    #  - `comments`
    #  - `created_at`
    #  - `subject_type`
    #  - `verb`
    #
    # See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax).
    query: String

    # Reverse the order of the underlying list.
    reverse: Boolean = false

    # Sort the underlying list by the given key.
    sortKey: EventSortKeys = ID
  ): EventConnection!

  # Whether there are items that can be fulfilled.
  # After an order is completely fulfilled (or completely refunded without any fulfillments) then this field returns false.
  fulfillable: Boolean!

  # List of shipments for the order.
  fulfillments(
    # Truncate the array result to this size.
    first: Int
  ): [Fulfillment!]!

  # Whether the order has been paid in full.
  fullyPaid: Boolean!

  # Whether the merchant added timeline comments to the order.
  hasTimelineComment: Boolean!

  # Globally unique identifier.
  id: ID!

  # First page of the online store that the customer visited before they submitted the order, for displaying to humans.
  landingPageDisplayText: String

  # First page of the online store that the customer visited before they submitted the order.
  landingPageUrl: URL

  # The ID of the corresponding resource in the REST Admin API.
  legacyResourceId: UnsignedInt64!

  # List of the order's line items.
  lineItems(
    # Returns the elements that come after the specified cursor.
    after: String

    # Returns the elements that come before the specified cursor.
    before: String

    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns up to the last `n` elements from the list.
    last: Int

    # Reverse the order of the underlying list.
    reverse: Boolean = false
  ): LineItemConnection!

  # If the order was processed using Shopify POS, then this is its location as provided by the merchant.
  location: String

  # Marketing attribution details for the order, if available.
  marketingAttribution: MarketingAttribution

  # Unique identifier for the order that appears on the order.
  # For example, _#1000_ or _Store1001.
  # This value is not unique across multiple stores.
  name: String!

  # Net payment for the order, based on the total amount received - total amount refunded.
  netPayment: Money!

  # Net payment for the order, based on the total amount received - total amount refunded in shop and presentment currencies.
  netPaymentSet: MoneyBag!

  # Line items that can't be fulfilled.
  # For example, because some or all of the items have been refunded, or the item
  # is not one which can be fulfilled, such as a tip.
  # These line items would be 'lost' if you only considered the line items in draft fulfillments or fulfillments.
  nonFulfillableLineItems(
    # Returns the elements that come after the specified cursor.
    after: String

    # Returns the elements that come before the specified cursor.
    before: String

    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns up to the last `n` elements from the list.
    last: Int

    # Reverse the order of the underlying list.
    reverse: Boolean = false
  ): LineItemConnection!

  # Contents of the note associated with the order.
  note: String

  # List of all payment gateways used for the order.
  # For example, _authorize_net_ and _Cash on Delivery (COD)_.
  paymentGatewayNames: [String!]!

  # Phone number provided by the customer.
  phone: String

  # If the order was processed using Shopify POS, then this is its location as provided by the merchant.
  physicalLocation: Location

  # The payment currency of the customer for this order.
  presentmentCurrencyCode: CurrencyCode!

  # Date and time when the order was processed.
  # When orders are imported from an app, this date and time may not match the date and time when the order was created.
  processedAt: DateTime!

  # Publication that created the order.
  publication: Publication

  # Marketing referral code from the link that the customer clicked to visit your store.
  # Supports the following URL attributes: _ref_, _source_, or _r_. For example,
  # if the URL is myshopifystore.com/products/slide?ref=j2tj1tn2, then this value is j2tj1tn2.
  referralCode: String

  # Website that sent the customer to your online store.
  referrerDisplayText: String

  # Webpage where the customer clicked a link that sent them to your online store.
  # For example, _Google_ or _randomblog.com/page1_.
  referrerUrl: URL

  # Whether the order can be refunded.
  refundable: Boolean!

  # List of refunds that have been applied to the order.
  refunds(
    # Truncate the array result to this size.
    first: Int
  ): [Refund!]!

  # Whether any line item in the order requires physical shipping.
  requiresShipping: Boolean!

  # Whether the order can be restocked.
  restockable: Boolean!

  # Fraud risk level of the order.
  riskLevel: OrderRiskLevel!

  # The order risks associated with this order.
  risks(
    # Truncate the array result to this size.
    first: Int
  ): [OrderRisk!]!

  # Mailing address for shipping provided by the customer.
  shippingAddress: MailingAddress

  # Line item that contains the shipping costs.
  shippingLine: ShippingLine

  # The sum of the quantities for the line items that contribute to the order's subtotal.
  subtotalLineItemsQuantity: Int!

  # Subtotal of the line items and their discounts (does not contain shipping
  # costs, shipping discounts, and order-level discounts).
  subtotalPrice: Money

  # Subtotal of the line items and their discounts (does not contain shipping
  # costs, shipping discounts, and order-level discounts) in shop and presentment currencies.
  subtotalPriceSet: MoneyBag

  # The details of the suggested refund. This response can be used to submit a RefundCreate mutation.
  suggestedRefund(
    # The line items from the order to include in the refund.
    refundLineItems: [RefundLineItemInput!]

    # Whether to refund the full shipping amount.
    refundShipping: Boolean

    # The amount to refund for shipping. Overrides `refundShipping`.
    shippingAmount: Money

    # Whether a refund for all of the refundable line items on an order should be suggested.
    # If `true`, the suggested refund will be formed from all refundable line items and will
    # ignore any passed in `refundLineItems`.
    suggestFullRefund: Boolean = false
  ): SuggestedRefund

  # List of tags.
  tags: [String!]!

  # Taxes charged for the line item.
  taxLines: [TaxLine!]!

  # Whether taxes are included in the subtotal price of the order.
  taxesIncluded: Boolean!

  # Whether the order is a test.
  # Test orders are made using the Shopify Bogus Gateway or the Shopify Payments test mode.
  test: Boolean!

  # Amount authorized for the order, that is uncaptured or undercaptured.
  totalCapturable: Money!

  # Amount authorized for the order, that is uncaptured or undercaptured in shop and presentment currencies.
  totalCapturableSet: MoneyBag!

  # Total amount discounted from the order (includes order-level and line item discounts).
  totalDiscounts: Money

  # Total amount discounted from the order (includes order-level and line item discounts) in shop and presentment currencies.
  totalDiscountsSet: MoneyBag

  # Total amount of the order (includes taxes and discounts).
  totalPrice: Money!

  # Total amount of the order (includes taxes and discounts) in shop and presentment currencies.
  totalPriceSet: MoneyBag!

  # Total amount received by the customer for the order.
  totalReceived: Money!

  # Total amount received by the customer for the order in shop and presentment currencies.
  totalReceivedSet: MoneyBag!

  # Total amount refunded for the order.
  totalRefunded: Money!

  # Total amount refunded for the order in shop and presentment currencies.
  totalRefundedSet: MoneyBag!

  # Total amount refunded for shipping in shop and presentment currencies.
  totalRefundedShippingSet: MoneyBag!

  # Total amount charged for shipping the order.
  totalShippingPrice: Money!

  # Total amount charged for shipping the order in shop and presentment currencies.
  totalShippingPriceSet: MoneyBag!

  # Total of all taxes applied to the order.
  totalTax: Money

  # Total of all taxes applied to the order in shop and presentment currencies.
  totalTaxSet: MoneyBag

  # Total weight (grams) of the order.
  totalWeight: UnsignedInt64

  # List of all transactions associated with the order.
  transactions(
    # Filter transactions by whether they are capturable.
    # If true, then returns only transactions that represent an authorized payment that can be captured.
    # If false, then returns all transactions.
    capturable: Boolean

    # Truncate the array result to this size.
    first: Int

    # Filter transactions by whether they are manual payments.
    # If true, then returns only transactions that are manual payments. If false, then returns all transactions.
    manuallyResolvable: Boolean
  ): [OrderTransaction!]!

  # Whether no payments have been made for the order.
  # If no payments have been made for the order, then this returns true.
  unpaid: Boolean!

  # Date and time when the order was last modified.
  updatedAt: DateTime!
}

Implements

Connections

discountApplications   (DiscountApplicationConnection!)

Discounts that have been applied on the order.

Argument Type Default 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

false

Reverse the order of the underlying list.

events   (EventConnection!)

List of internal events associated with the order.

Argument Type Default 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.

reverse

Boolean

false

Reverse the order of the underlying list.

sortKey

EventSortKeys

ID

Sort the underlying list by the given key.

lineItems   (LineItemConnection!)

List of the order's line items.

Argument Type Default 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

false

Reverse the order of the underlying list.

nonFulfillableLineItems   (LineItemConnection!)

Line items that can't be fulfilled. For example, because some or all of the items have been refunded, or the item is not one which can be fulfilled, such as a tip. These line items would be 'lost' if you only considered the line items in draft fulfillments or fulfillments.

Argument Type Default 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

false

Reverse the order of the underlying list.

Fields

alerts   ([ResourceAlert!]!)

Generated messages that appear at the top of an order page in the Shopify admin. For example, this is a test order.

billingAddress   (MailingAddress)

Mailing address provided by the customer. Not all orders have mailing addresses.

billingAddressMatchesShippingAddress   (Boolean!)

Whether the billing address matches the shipping address.

canMarkAsPaid   (Boolean!)

Whether the order can be manually marked as paid.

cancelReason   (OrderCancelReason)

Reason the order was canceled. Returns null if the order wasn't canceled.

cancelledAt   (DateTime)

Date and time when the order was canceled. Returns null if the order wasn't canceled.

capturable   (Boolean!)

Whether payment for the order can be captured. Returns true when the customer's credit card has been authorized for payment and the authorization period has not expired.

cartDiscountAmountSet   (MoneyBag)

Amount of the order-level discount (does not contain any line item discounts) in shop and presentment currencies.

clientIp   (String)

The ip address of the client that is associated with this order.

closed   (Boolean!)

Whether the order is closed.

closedAt   (DateTime)

Date and time when the order closed. If the order is not closed, then this field is null.

confirmed   (Boolean!)

Whether inventory has been reserved for the order.

createdAt   (DateTime!)

Date and time when the order was created in Shopify.

currencyCode   (CurrencyCode!)

The currency of the store at the time of the order. If payment hasn't occurred, then this field is null.

customAttributes   ([Attribute!]!)

Custom information added to the order by your customer (Also referred to as note attributes).

customer   (Customer)

Unique identifier of the customer who placed the order. Not all orders have customers associated with them.

customerAcceptsMarketing   (Boolean!)

Whether the customer agreed to receive marketing materials.

customerJourney   (CustomerJourney)

Description of the customer's experience with the store leading up to the order.

customerLocale   (String)

A two-letter or three-letter language code, optionally followed by a region modifier. Example values could be 'en', 'en-CA', 'en-PIRATE'.

discountCode   (String)

Discount code provided by the customer.

displayAddress   (MailingAddress)

Primary address of the customer, which is shown on the order.

displayFinancialStatus   (OrderDisplayFinancialStatus)

Financial status of the order that can be shown to the merchant. This field does not capture all the possible details of an order's financial state and should only be used for display summary purposes.

displayFulfillmentStatus   (OrderDisplayFulfillmentStatus!)

Fulfillment status for the order that can be shown to the merchant. This field does not capture all the possible details of an order's fulfillment state. It should only be used for display summary purposes.

disputes   ([OrderDisputeSummary!]!)

Summary of each dispute associated with the order. Sorted in ascending (ASC) order by ID.

draftFulfillments   ([DraftFulfillment!]!)

List of possible fulfilments that can be made for the order (includes line items that can be partially fulfilled).

email   (String)

Email address provided by the customer.

fulfillable   (Boolean!)

Whether there are items that can be fulfilled. After an order is completely fulfilled (or completely refunded without any fulfillments) then this field returns false.

fulfillments   ([Fulfillment!]!)

List of shipments for the order.

Argument Type Default Description
first

Int

Truncate the array result to this size.

fullyPaid   (Boolean!)

Whether the order has been paid in full.

hasTimelineComment   (Boolean!)

Whether the merchant added timeline comments to the order.

id   (ID!)

Globally unique identifier.

legacyResourceId   (UnsignedInt64!)

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

name   (String!)

Unique identifier for the order that appears on the order. For example, #1000 or _Store1001. This value is not unique across multiple stores.

netPaymentSet   (MoneyBag!)

Net payment for the order, based on the total amount received - total amount refunded in shop and presentment currencies.

note   (String)

Contents of the note associated with the order.

paymentGatewayNames   ([String!]!)

List of all payment gateways used for the order. For example, authorize_net and Cash on Delivery (COD).

phone   (String)

Phone number provided by the customer.

physicalLocation   (Location)

If the order was processed using Shopify POS, then this is its location as provided by the merchant.

presentmentCurrencyCode   (CurrencyCode!)

The payment currency of the customer for this order.

processedAt   (DateTime!)

Date and time when the order was processed. When orders are imported from an app, this date and time may not match the date and time when the order was created.

publication   (Publication)

Publication that created the order.

refundable   (Boolean!)

Whether the order can be refunded.

refunds   ([Refund!]!)

List of refunds that have been applied to the order.

Argument Type Default Description
first

Int

Truncate the array result to this size.

requiresShipping   (Boolean!)

Whether any line item in the order requires physical shipping.

restockable   (Boolean!)

Whether the order can be restocked.

riskLevel   (OrderRiskLevel!)

Fraud risk level of the order.

risks   ([OrderRisk!]!)

The order risks associated with this order.

Argument Type Default Description
first

Int

Truncate the array result to this size.

shippingAddress   (MailingAddress)

Mailing address for shipping provided by the customer.

shippingLine   (ShippingLine)

Line item that contains the shipping costs.

subtotalLineItemsQuantity   (Int!)

The sum of the quantities for the line items that contribute to the order's subtotal.

subtotalPriceSet   (MoneyBag)

Subtotal of the line items and their discounts (does not contain shipping costs, shipping discounts, and order-level discounts) in shop and presentment currencies.

suggestedRefund   (SuggestedRefund)

The details of the suggested refund. This response can be used to submit a RefundCreate mutation.

Argument Type Default Description
refundLineItems

[RefundLineItemInput!]

The line items from the order to include in the refund.

refundShipping

Boolean

Whether to refund the full shipping amount.

shippingAmount

Money

The amount to refund for shipping. Overrides refundShipping.

suggestFullRefund

Boolean

false

Whether a refund for all of the refundable line items on an order should be suggested. If true, the suggested refund will be formed from all refundable line items and will ignore any passed in refundLineItems.

tags   ([String!]!)

List of tags.

taxLines   ([TaxLine!]!)

Taxes charged for the line item.

taxesIncluded   (Boolean!)

Whether taxes are included in the subtotal price of the order.

test   (Boolean!)

Whether the order is a test. Test orders are made using the Shopify Bogus Gateway or the Shopify Payments test mode.

totalCapturableSet   (MoneyBag!)

Amount authorized for the order, that is uncaptured or undercaptured in shop and presentment currencies.

totalDiscountsSet   (MoneyBag)

Total amount discounted from the order (includes order-level and line item discounts) in shop and presentment currencies.

totalPriceSet   (MoneyBag!)

Total amount of the order (includes taxes and discounts) in shop and presentment currencies.

totalReceivedSet   (MoneyBag!)

Total amount received by the customer for the order in shop and presentment currencies.

totalRefundedSet   (MoneyBag!)

Total amount refunded for the order in shop and presentment currencies.

totalRefundedShippingSet   (MoneyBag!)

Total amount refunded for shipping in shop and presentment currencies.

totalShippingPriceSet   (MoneyBag!)

Total amount charged for shipping the order in shop and presentment currencies.

totalTaxSet   (MoneyBag)

Total of all taxes applied to the order in shop and presentment currencies.

totalWeight   (UnsignedInt64)

Total weight (grams) of the order.

transactions   ([OrderTransaction!]!)

List of all transactions associated with the order.

Argument Type Default Description
capturable

Boolean

Filter transactions by whether they are capturable. If true, then returns only transactions that represent an authorized payment that can be captured. If false, then returns all transactions.

first

Int

Truncate the array result to this size.

manuallyResolvable

Boolean

Filter transactions by whether they are manual payments. If true, then returns only transactions that are manual payments. If false, then returns all transactions.

unpaid   (Boolean!)

Whether no payments have been made for the order. If no payments have been made for the order, then this returns true.

updatedAt   (DateTime!)

Date and time when the order was last modified.

Deprecated fields

Show/Hide

cartDiscountAmount   (Money)

deprecated

Amount of the order-level discount (does not contain any line item discounts).

Deprecation warning

Use cartDiscountAmountSet instead

channel   (Channel)

deprecated

Channel that created the order.

Deprecation warning

Use publication instead

landingPageDisplayText   (String)

deprecated

First page of the online store that the customer visited before they submitted the order, for displaying to humans.

Deprecation warning

Use customerJourney.lastVisit.landingPageHtml instead

landingPageUrl   (URL)

deprecated

First page of the online store that the customer visited before they submitted the order.

Deprecation warning

Use customerJourney.lastVisit.landingPage instead

location   (String)

deprecated

If the order was processed using Shopify POS, then this is its location as provided by the merchant.

Deprecation warning

Use physicalLocation instead

marketingAttribution   (MarketingAttribution)

deprecated

Marketing attribution details for the order, if available.

Deprecation warning

Use customerJourney.firstVisit or customerJourney.lastVisit instead. customerJourney.firstVisit will be consistent with the current behavior.

netPayment   (Money!)

deprecated

Net payment for the order, based on the total amount received - total amount refunded.

Deprecation warning

Use netPaymentSet instead

referralCode   (String)

deprecated

Marketing referral code from the link that the customer clicked to visit your store. Supports the following URL attributes: ref, source, or r. For example, if the URL is myshopifystore.com/products/slide?ref=j2tj1tn2, then this value is j2tj1tn2.

Deprecation warning

Use customerJourney.lastVisit.referralCode instead

referrerDisplayText   (String)

deprecated

Website that sent the customer to your online store.

Deprecation warning

Use customerJourney.lastVisit.referralInfoHtml instead

referrerUrl   (URL)

deprecated

Webpage where the customer clicked a link that sent them to your online store. For example, Google or randomblog.com/page1.

Deprecation warning

Use customerJourney.lastVisit.referrerUrl instead

subtotalPrice   (Money)

deprecated

Subtotal of the line items and their discounts (does not contain shipping costs, shipping discounts, and order-level discounts).

Deprecation warning

Use subtotalPriceSet instead

totalCapturable   (Money!)

deprecated

Amount authorized for the order, that is uncaptured or undercaptured.

Deprecation warning

Use totalCapturableSet instead

totalDiscounts   (Money)

deprecated

Total amount discounted from the order (includes order-level and line item discounts).

Deprecation warning

Use totalDiscountsSet instead

totalPrice   (Money!)

deprecated

Total amount of the order (includes taxes and discounts).

Deprecation warning

Use totalPriceSet instead

totalReceived   (Money!)

deprecated

Total amount received by the customer for the order.

Deprecation warning

Use totalReceivedSet instead

totalRefunded   (Money!)

deprecated

Total amount refunded for the order.

Deprecation warning

Use totalRefundedSet instead

totalShippingPrice   (Money!)

deprecated

Total amount charged for shipping the order.

Deprecation warning

Use totalShippingPriceSet instead

totalTax   (Money)

deprecated

Total of all taxes applied to the order.

Deprecation warning

Use totalTaxSet instead

Sign up for a Partner account to get started.

Sign up