stack

Home > @infiniteobjects/shopify-data-manager > AdminTypes > Order

AdminTypes.Order interface

An order is a customer’s request to purchase one or more products from a shop. You can retrieve and update orders using the Order object. Learn more about [editing an existing order with the GraphQL Admin API](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing).

Only the last 60 days’ worth of orders from a store are accessible from the Order object by default. If you want to access older orders, then you need to [request access to all orders](https://shopify.dev/api/usage/access-scopes#orders-permissions). If your app is granted access, then you can add the read_all_orders scope to your app along with read_orders or write_orders. [Private apps](https://shopify.dev/apps/auth/basic-http) are not affected by this change and are automatically granted the scope.

**Caution:** Only use this data if it’s required for your app’s functionality. Shopify will restrict [access to scopes](https://shopify.dev/api/usage/access-scopes) for apps that don’t have a legitimate use for the associated data.

Signature:

export interface Order extends CommentEventSubject, HasEvents, HasLocalizationExtensions, HasMetafieldDefinitions, HasMetafields, LegacyInteroperability, Node 

Extends: CommentEventSubject, HasEvents, HasLocalizationExtensions, HasMetafieldDefinitions, HasMetafields, LegacyInteroperability, Node

Properties

Property Modifiers Type Description
additionalFees   Array<AdditionalFee> A list of addtional fees applied to the order.
agreements   SalesAgreementConnection A list of sales agreements associated with the order.
alerts   Array<ResourceAlert> A list of messages that appear on the order page in the Shopify admin.
app?   Maybe<OrderApp> (Optional) The application that created the order.
billingAddress?   Maybe<MailingAddress> (Optional) The billing address of the customer.
billingAddressMatchesShippingAddress   Scalars[‘Boolean’][‘output’] Whether the billing address matches the shipping address.
cancellation?   Maybe<OrderCancellation> (Optional) Cancellation details for the order.
cancelledAt?   Maybe<Scalars[‘DateTime’][‘output’]> (Optional) The date and time when the order was canceled. Returns null if the order wasn’t canceled.
cancelReason?   Maybe<OrderCancelReason | `${OrderCancelReason}`> (Optional) The reason provided when the order was canceled. Returns null if the order wasn’t canceled.
canMarkAsPaid   Scalars[‘Boolean’][‘output’] Whether the order can be manually marked as paid.
canNotifyCustomer   Scalars[‘Boolean’][‘output’] Whether a customer email exists for the order.
capturable   Scalars[‘Boolean’][‘output’] Whether payment for the order can be captured.
cartDiscountAmount?   Maybe<Scalars[‘Money’][‘output’]> (Optional) The total order-level discount amount, before returns, in shop currency.
cartDiscountAmountSet?   Maybe<MoneyBag> (Optional) The total order-level discount amount, before returns, in shop and presentment currencies.
channel?   Maybe<Channel> (Optional) The channel that created the order.
channelInformation?   Maybe<ChannelInformation> (Optional) Details about the channel that created the order.
clientIp?   Maybe<Scalars[‘String’][‘output’]> (Optional) The IP address of the API client that created the order.
closed   Scalars[‘Boolean’][‘output’] Whether the order is closed.
closedAt?   Maybe<Scalars[‘DateTime’][‘output’]> (Optional) The date and time when the order was closed. Returns null if the order isn’t closed.
confirmationNumber?   Maybe<Scalars[‘String’][‘output’]> (Optional) A randomly generated alpha-numeric identifier for the order that may be shown to the customer instead of the sequential order name. For example, “XPAV284CT”, “R50KELTJP” or “35PKUN0UJ”. This value isn’t guaranteed to be unique.
confirmed   Scalars[‘Boolean’][‘output’] Whether inventory has been reserved for the order.
createdAt   Scalars[‘DateTime’][‘output’] Date and time when the order was created in Shopify.
currencyCode   CurrencyCode | `${CurrencyCode}` The shop currency when the order was placed.
currentCartDiscountAmountSet   MoneyBag The current order-level discount amount after all order updates, in shop and presentment currencies.
currentSubtotalLineItemsQuantity   Scalars[‘Int’][‘output’] The sum of the quantities for all line items that contribute to the order’s current subtotal price.
currentSubtotalPriceSet   MoneyBag The sum of the prices for all line items after discounts and returns, in shop and presentment currencies. If taxesIncluded is true, then the subtotal also includes tax.
currentTaxLines   Array<TaxLine> A list of all tax lines applied to line items on the order, after returns. Tax line prices represent the total price for all tax lines with the same rate and title.
currentTotalAdditionalFeesSet?   Maybe<MoneyBag> (Optional) The total amount of additional fees after returns, in shop and presentment currencies. Returns null if there are no additional fees for the order.
currentTotalDiscountsSet   MoneyBag The total amount discounted on the order after returns, in shop and presentment currencies. This includes both order and line level discounts.
currentTotalDutiesSet?   Maybe<MoneyBag> (Optional) The total amount of duties after returns, in shop and presentment currencies. Returns null if duties aren’t applicable.
currentTotalPriceSet   MoneyBag The total price of the order, after returns, in shop and presentment currencies. This includes taxes and discounts.
currentTotalTaxSet   MoneyBag The sum of the prices of all tax lines applied to line items on the order, after returns, in shop and presentment currencies.
currentTotalWeight   Scalars[‘UnsignedInt64’][‘output’] The total weight of the order after returns, in grams.
customAttributes   Array<Attribute> A list of the custom attributes added to the order.
customer?   Maybe<Customer> (Optional) The customer that placed the order.
customerAcceptsMarketing   Scalars[‘Boolean’][‘output’] Whether the customer agreed to receive marketing materials.
customerJourney?   Maybe<CustomerJourney> (Optional) The customer’s visits and interactions with the online store before placing the order.
customerJourneySummary?   Maybe<CustomerJourneySummary> (Optional) The customer’s visits and interactions with the online store before placing the order.
customerLocale?   Maybe<Scalars[‘String’][‘output’]> (Optional) A two-letter or three-letter language code, optionally followed by a region modifier.
discountApplications   DiscountApplicationConnection A list of discounts that are applied to the order, not including order edits and refunds.
discountCode?   Maybe<Scalars[‘String’][‘output’]> (Optional) The discount code used for the order.
discountCodes   Array<Scalars[‘String’][‘output’]> The discount codes used for the order.
displayAddress?   Maybe<MailingAddress> (Optional) The primary address of the customer. Returns null if neither the shipping address nor the billing address was provided.
displayFinancialStatus?   Maybe<OrderDisplayFinancialStatus | `${OrderDisplayFinancialStatus}`> (Optional) The financial status of the order that can be shown to the merchant. This field doesn’t capture all the details of an order’s financial state. It should only be used for display summary purposes.
displayFulfillmentStatus   OrderDisplayFulfillmentStatus | `${OrderDisplayFulfillmentStatus}` The fulfillment status for the order that can be shown to the merchant. This field does not capture all the details of an order’s fulfillment state. It should only be used for display summary purposes. For a more granular view of the fulfillment status, refer to the [FulfillmentOrder](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentOrder) object.
disputes   Array<OrderDisputeSummary> A list of the disputes associated with the order.
edited   Scalars[‘Boolean’][‘output’] Whether the order has had any edits applied.
email?   Maybe<Scalars[‘String’][‘output’]> (Optional) The email address associated with the customer.
estimatedTaxes   Scalars[‘Boolean’][‘output’] Whether taxes on the order are estimated. This field returns false when taxes on the order are finalized and aren’t subject to any changes.
events   EventConnection A list of events associated with the order.
exchangeV2s   ExchangeV2Connection A list of ExchangeV2s for the order.
fulfillable   Scalars[‘Boolean’][‘output’] Whether there are line items that can be fulfilled. This field returns false when the order has no fulfillable line items. For a more granular view of the fulfillment status, refer to the [FulfillmentOrder](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentOrder) object.
fulfillmentOrders   FulfillmentOrderConnection <p>A list of fulfillment orders for a specific order.</p><p>[FulfillmentOrder API access scopes](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentOrder#api-access-scopes) govern which fulfillments orders are returned. An API client will only receive a subset of the fulfillment orders which belong to an order if they don’t have the necessary access scopes to view all of the fulfillment orders. In the case that an API client does not have the access scopes necessary to view any of the fulfillment orders that belong to an order, an empty array will be returned.</p>
fulfillments   Array<Fulfillment> List of shipments for the order.
fullyPaid   Scalars[‘Boolean’][‘output’] Whether the order has been paid in full.
hasTimelineComment   Scalars[‘Boolean’][‘output’] Whether the merchant added a timeline comment to the order.
id   Scalars[‘ID’][‘output’] A globally-unique ID.
landingPageDisplayText?   Maybe<Scalars[‘String’][‘output’]> (Optional) The URL of the first page of the online store that the customer visited before they submitted the order.
landingPageUrl?   Maybe<Scalars[‘URL’][‘output’]> (Optional) The first page of the online store that the customer visited before they submitted the order.
legacyResourceId   Scalars[‘UnsignedInt64’][‘output’] The ID of the corresponding resource in the REST Admin API.
lineItems   LineItemConnection A list of the order’s line items.
lineItemsMutable   LineItemMutableConnection A list of the order’s line items.
localizationExtensions   LocalizationExtensionConnection List of localization extensions for the resource.
location?   Maybe<Scalars[‘String’][‘output’]> (Optional) The fulfillment location that was assigned when the order was created. Orders can have multiple fulfillment orders. These fulfillment orders can each be assigned to a different location which is responsible for fulfilling a subset of the items in an order. The Order.location field will only point to one of these locations. Use the [FulfillmentOrder](https://shopify.dev/api/admin-graphql/latest/objects/fulfillmentorder) object for up-to-date fulfillment location information.
merchantEditable   Scalars[‘Boolean’][‘output’] Whether the order can be edited by the merchant. For example, canceled orders can’t be edited.
merchantEditableErrors   Array<Scalars[‘String’][‘output’]> A list of reasons why the order can’t be edited. For example, “Canceled orders can’t be edited”.
merchantOfRecordApp?   Maybe<OrderApp> (Optional) The application acting as the Merchant of Record for the order.
metafield?   Maybe<Metafield> (Optional) Returns a metafield by namespace and key that belongs to the resource.
metafieldDefinitions   MetafieldDefinitionConnection List of metafield definitions.
metafields   MetafieldConnection List of metafields that belong to the resource.
name   Scalars[‘String’][‘output’] The unique identifier for the order that appears on the order page in the Shopify admin and the order status page. For example, “#1001”, “EN1001”, or “1001-A”. This value isn’t unique across multiple stores.
netPayment   Scalars[‘Money’][‘output’] The net payment for the order, based on the total amount received minus the total amount refunded, in shop currency.
netPaymentSet   MoneyBag The net payment for the order, based on the total amount received minus the total amount refunded, in shop and presentment currencies.
nonFulfillableLineItems   LineItemConnection A list of line items that can’t be fulfilled. For example, tips and fully refunded line items can’t be fulfilled. For a more granular view of the fulfillment status, refer to the [FulfillmentOrder](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentOrder) object.
note?   Maybe<Scalars[‘String’][‘output’]> (Optional) The contents of the note associated with the order.
originalTotalAdditionalFeesSet?   Maybe<MoneyBag> (Optional) The total amount of additional fees after returns, in shop and presentment currencies. Returns null if there are no additional fees for the order.
originalTotalDutiesSet?   Maybe<MoneyBag> (Optional) The total amount of duties before returns, in shop and presentment currencies. Returns null if duties aren’t applicable.
originalTotalPriceSet   MoneyBag The total price of the order at the time of order creation, in shop and presentment currencies.
paymentCollectionDetails   OrderPaymentCollectionDetails The payment collection details for the order.
paymentGatewayNames   Array<Scalars[‘String’][‘output’]> A list of the names of all payment gateways used for the order. For example, “Shopify Payments” and “Cash on Delivery (COD)”.
paymentTerms?   Maybe<PaymentTerms> (Optional) The payment terms associated with the order.
phone?   Maybe<Scalars[‘String’][‘output’]> (Optional) The phone number associated with the customer.
physicalLocation?   Maybe<Location> (Optional) The fulfillment location that was assigned when the order was created. Orders can have multiple fulfillment orders. These fulfillment orders can each be assigned to a different location which is responsible for fulfilling a subset of the items in an order. The Order.physicalLocation field will only point to one of these locations. Use the [FulfillmentOrder](https://shopify.dev/api/admin-graphql/latest/objects/fulfillmentorder) object for up to date fulfillment location information.
poNumber?   Maybe<Scalars[‘String’][‘output’]> (Optional) The PO number associated with the order.
presentmentCurrencyCode   CurrencyCode | `${CurrencyCode}` The payment CurrencyCode of the customer for the order.
privateMetafield?   Maybe<PrivateMetafield> (Optional) Returns a private metafield by namespace and key that belongs to the resource.
privateMetafields   PrivateMetafieldConnection List of private metafields that belong to the resource.
processedAt   Scalars[‘DateTime’][‘output’] The date and time when the order was processed. This date and time might not match the date and time when the order was created.
publication?   Maybe<Publication> (Optional) The publication that the order was created from.
purchasingEntity?   Maybe<PurchasingEntity> (Optional) The purchasing entity for the order.
referralCode?   Maybe<Scalars[‘String’][‘output’]> (Optional) The marketing referral code from the link that the customer clicked to visit the store. Supports the following URL attributes: “ref”, “source”, or “r”. For example, if the URL is {shop}.myshopify.com/products/slide?ref=j2tj1tn2, then this value is j2tj1tn2.
referrerDisplayText?   Maybe<Scalars[‘String’][‘output’]> (Optional) A web domain or short description of the source that sent the customer to your online store. For example, “shopify.com” or “email”.
referrerUrl?   Maybe<Scalars[‘URL’][‘output’]> (Optional) The URL of the webpage where the customer clicked a link that sent them to your online store.
refundable   Scalars[‘Boolean’][‘output’] Whether the order can be refunded.
refundDiscrepancySet   MoneyBag The difference between the suggested and actual refund amount of all refunds that have been applied to the order. A positive value indicates a difference in the merchant’s favor, and a negative value indicates a difference in the customer’s favor.
refunds   Array<Refund> A list of refunds that have been applied to the order.
registeredSourceUrl?   Maybe<Scalars[‘URL’][‘output’]> (Optional) The URL of the source that the order originated from, if found in the domain registry.
requiresShipping   Scalars[‘Boolean’][‘output’] Whether the order has shipping lines or at least one line item on the order that requires shipping.
restockable   Scalars[‘Boolean’][‘output’] Whether any line item on the order can be restocked.
returns   ReturnConnection A list of returns for the order.
returnStatus   OrderReturnStatus | `${OrderReturnStatus}` The order’s aggregated return status for display purposes.
riskLevel   OrderRiskLevel | `${OrderRiskLevel}` The fraud risk level of the order.
risks   Array<OrderRisk> A list of risks associated with the order.
shippingAddress?   Maybe<MailingAddress> (Optional) The mailing address of the customer.
shippingLine?   Maybe<ShippingLine> (Optional) A summary of all shipping costs on the order.
shippingLines   ShippingLineConnection A list of the order’s shipping lines.
shopifyProtect?   Maybe<ShopifyProtectOrderSummary> (Optional) The Shopify Protect details for the order. If Shopify Protect is disabled for the shop, then this will be null.
sourceIdentifier?   Maybe<Scalars[‘String’][‘output’]> (Optional) A unique POS or third party order identifier. For example, “1234-12-1000” or “111-98567-54”. The receipt_number field is derived from this value for POS orders.
subtotalLineItemsQuantity   Scalars[‘Int’][‘output’] The sum of the quantities for all line items that contribute to the order’s subtotal price.
subtotalPrice?   Maybe<Scalars[‘Money’][‘output’]> (Optional) The sum of the prices for all line items after discounts and before returns, in shop currency. If taxesIncluded is true, then the subtotal also includes tax.
subtotalPriceSet?   Maybe<MoneyBag> (Optional) The sum of the prices for all line items after discounts and before returns, in shop and presentment currencies. If taxesIncluded is true, then the subtotal also includes tax.
suggestedRefund?   Maybe<SuggestedRefund> (Optional) A suggested refund for the order.
tags   Array<Scalars[‘String’][‘output’]> A comma separated list of tags associated with the order. Updating tags overwrites any existing tags that were previously added to the order. To add new tags without overwriting existing tags, use the [tagsAdd](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) mutation.
taxesIncluded   Scalars[‘Boolean’][‘output’] Whether taxes are included in the subtotal price of the order.
taxExempt   Scalars[‘Boolean’][‘output’] Whether taxes are exempt on the order.
taxLines   Array<TaxLine> A list of all tax lines applied to line items on the order, before returns. Tax line prices represent the total price for all tax lines with the same rate and title.
test   Scalars[‘Boolean’][‘output’] Whether the order is a test. Test orders are made using the Shopify Bogus Gateway or a payment provider with test mode enabled. A test order can’t be converted into a real order and vice versa.
totalCapturable   Scalars[‘Money’][‘output’] The authorized amount that’s uncaptured or undercaptured, in shop currency. This amount isn’t adjusted for returns.
totalCapturableSet   MoneyBag The authorized amount that’s uncaptured or undercaptured, in shop and presentment currencies. This amount isn’t adjusted for returns.
totalDiscounts?   Maybe<Scalars[‘Money’][‘output’]> (Optional) The total amount discounted on the order before returns, in shop currency. This includes both order and line level discounts.
totalDiscountsSet?   Maybe<MoneyBag> (Optional) The total amount discounted on the order before returns, in shop and presentment currencies. This includes both order and line level discounts.
totalOutstandingSet   MoneyBag The total amount not yet transacted for the order, in shop and presentment currencies. A positive value indicates a difference in the merchant’s favor (payment from customer to merchant) and a negative value indicates a difference in the customer’s favor (refund from merchant to customer).
totalPrice   Scalars[‘Money’][‘output’] The total price of the order, before returns, in shop currency. This includes taxes and discounts.
totalPriceSet   MoneyBag The total price of the order, before returns, in shop and presentment currencies. This includes taxes and discounts.
totalReceived   Scalars[‘Money’][‘output’] The total amount received from the customer before returns, in shop currency.
totalReceivedSet   MoneyBag The total amount received from the customer before returns, in shop and presentment currencies.
totalRefunded   Scalars[‘Money’][‘output’] The total amount that was refunded, in shop currency.
totalRefundedSet   MoneyBag The total amount that was refunded, in shop and presentment currencies.
totalRefundedShippingSet   MoneyBag The total amount of shipping that was refunded, in shop and presentment currencies.
totalShippingPrice   Scalars[‘Money’][‘output’] The total shipping amount before discounts and returns, in shop currency.
totalShippingPriceSet   MoneyBag The total shipping amount before discounts and returns, in shop and presentment currencies.
totalTax?   Maybe<Scalars[‘Money’][‘output’]> (Optional) The total tax amount before returns, in shop currency.
totalTaxSet?   Maybe<MoneyBag> (Optional) The total tax amount before returns, in shop and presentment currencies.
totalTipReceived   MoneyV2 The sum of all tip amounts for the order, in shop currency.
totalTipReceivedSet   MoneyBag The sum of all tip amounts for the order, in shop and presentment currencies.
totalWeight?   Maybe<Scalars[‘UnsignedInt64’][‘output’]> (Optional) The total weight of the order before returns, in grams.
transactions   Array<OrderTransaction> A list of transactions associated with the order.
unpaid   Scalars[‘Boolean’][‘output’] Whether no payments have been made for the order.
updatedAt   Scalars[‘DateTime’][‘output’] The date and time when the order was modified last.