Types of resources that may use metafields to reference other resources.
Possible types
Represents an installed application on a shop.
An article in the blogging system.
Shopify stores come with a built-in blogging engine, allowing a shop to have one or more blogs. Blogs are meant to be used as a type of magazine or newsletter for the shop, with content that changes over time.
Represents a group of products that can be displayed in online stores and other sales channels in categories, which makes it easy for customers to find them. For example, an athletics store might create different collections for running attire, shoes, and accessories.
Collections can be defined by conditions, such as whether they match certain product tags. These are called smart or automated collections.
Collections can also be created for a custom group of products. These are called custom or manual collections.
Represents information about a company which is also a customer of the shop.
A location or branch of a company that's a customer of the shop. Configuration of B2B relationship, for example prices lists and checkout settings, may be done for a location.
Represents information about a customer of the shop, such as the customer's contact details, their order history, and whether they've agreed to receive marketing material by email.
Caution: Only use this data if it's required for your app's functionality. Shopify will restrict access to scopes for apps that don't have a legitimate use for the associated data.
A delivery customization.
The
object enables you to manage automatic discounts that are applied when an order meets specific criteria. You can create amount off, free shipping, or buy X get Y automatic discounts. For example, you can offer customers a free shipping discount that applies when conditions are met. Or you can offer customers a buy X get Y discount that's automatically applied when customers spend a specified amount of money, or a specified quantity of products.
Learn more about working with Shopify's discount model, including related queries, mutations, limitations, and considerations.
The
object enables you to manage code discounts that are applied when customers enter a code at checkout. For example, you can offer discounts where customers have to enter a code to redeem an amount off discount on products, variants, or collections in a store. Or, you can offer discounts where customers have to enter a code to get free shipping. Merchants can create and share discount codes individually with customers.
Learn more about working with Shopify's discount model, including related queries, mutations, limitations, and considerations.
The
object enables you to manage discounts, which are applied at checkout or on a cart.
Discounts are a way for merchants to promote sales and special offers, or as customer loyalty rewards. Discounts can apply to orders, products, or shipping, and can be either automatic or code-based. For example, you can offer customers a buy X get Y discount that's automatically applied when purchases meet specific criteria. Or, you can offer discounts where customers have to enter a code to redeem an amount off discount on products, variants, or collections in a store.
Learn more about working with Shopify's discount model, including related mutations, limitations, and considerations.
An order that a merchant creates on behalf of a customer. Draft orders are useful for merchants that need to do the following tasks:
- Create new orders for sales made by phone, in person, by chat, or elsewhere. When a merchant accepts payment for a draft order, an order is created.
- Send invoices to customers to pay with a secure checkout link.
- Use custom items to represent additional costs or products that aren't displayed in a shop's inventory.
- Re-create orders manually from active sales channels.
- Sell products at discount or wholesale rates.
- Take pre-orders.
- Save an order as a draft and resume working on it later.
For draft orders in multiple currencies
is the source of truth for what a customer is going to be charged and
is an estimate of what the merchant might receive in their shop currency.
Caution: Only use this data if it's required for your app's functionality. Shopify will restrict access to scopes for apps that don't have a legitimate use for the associated data.
The FulfillmentOrder object represents either an item or a group of items in an Order that are expected to be fulfilled from the same location. There can be more than one fulfillment order for an order at a given location.
Fulfillment orders represent the work which is intended to be done in relation to an order. When fulfillment has started for one or more line items, a Fulfillment is created by a merchant or third party to represent the ongoing or completed work of fulfillment.
See below for more details on creating fulfillments.
NoteShopify creates fulfillment orders automatically when an order is created. It is not possible to manually create fulfillment orders.
See below for more details on the lifecycle of a fulfillment order.
Retrieving fulfillment orders
Fulfillment orders from an order
All fulfillment orders related to a given order can be retrieved with the Order.fulfillmentOrders connection.
API access scopes govern which fulfillments orders are returned to clients. 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.
Fulfillment orders assigned to the app for fulfillment
Fulfillment service apps can retrieve the fulfillment orders which have been assigned to their locations with the assignedFulfillmentOrders connection. Use the
argument to control whether all assigned fulfillment orders should be returned or only those where a merchant has sent a fulfillment request and it has yet to be responded to.
The API client must be granted the
access scope to access the assigned fulfillment orders.
All fulfillment orders
Apps can retrieve all fulfillment orders with the fulfillmentOrders query. This query returns all assigned, merchant-managed, and third-party fulfillment orders on the shop, which are accessible to the app according to the fulfillment order access scopes it was granted with.
The lifecycle of a fulfillment order
Fulfillment Order Creation
After an order is created, a background worker performs the order routing process which determines which locations will be responsible for fulfilling the purchased items. Once the order routing process is complete, one or more fulfillment orders will be created and assigned to these locations. It is not possible to manually create fulfillment orders.
Once a fulfillment order has been created, it will have one of two different lifecycles depending on the type of location which the fulfillment order is assigned to.
The lifecycle of a fulfillment order at a merchant managed location
Fulfillment orders are completed by creating fulfillments. Fulfillments represents the work done.
For digital products a merchant or an order management app would create a fulfilment once the digital asset has been provisioned. For example, in the case of a digital gift card, a merchant would to do this once the gift card has been activated - before the email has been shipped.
On the other hand, for a traditional shipped order, a merchant or an order management app would create a fulfillment after picking and packing the items relating to a fulfillment order, but before the courier has collected the goods.
Learn about managing fulfillment orders as an order management app.
The lifecycle of a fulfillment order at a location which is managed by a fulfillment service
For fulfillment orders which are assigned to a location that is managed by a fulfillment service, a merchant or an Order Management App can send a fulfillment request to the fulfillment service which operates the location to request that they fulfill the associated items. A fulfillment service has the option to accept or reject this fulfillment request.
Once the fulfillment service has accepted the request, the request can no longer be cancelled by the merchant or order management app and instead a cancellation request must be submitted to the fulfillment service.
Once a fulfillment service accepts a fulfillment request, then after they are ready to pack items and send them for delivery, they create fulfillments with the fulfillmentCreate mutation. They can provide tracking information right away or create fulfillments without it and then update the tracking information for fulfillments with the fulfillmentTrackingInfoUpdate mutation.
Learn about managing fulfillment orders as a fulfillment service.
API access scopes
Fulfillment orders are governed by the following API access scopes:
- The
and
access scopes grant access to fulfillment orders assigned to merchant-managed locations.
- The
and
access scopes are intended for fulfillment services. These scopes grant access to fulfillment orders assigned to locations that are being managed by fulfillment services.
- The
and
access scopes grant access to fulfillment orders assigned to locations managed by other fulfillment services.
Fulfillment service app access scopes
Usually, fulfillment services have the
access scope and don't have the
or
access scopes. The app will only have access to the fulfillment orders assigned to their location (or multiple locations if the app registers multiple fulfillment services on the shop). The app will not have access to fulfillment orders assigned to merchant-managed locations or locations owned by other fulfillment service apps.
Order management app access scopes
Order management apps will usually request
and
access scopes. This will allow them to manage all fulfillment orders on behalf of a merchant.
If an app combines the functions of an order management app and a fulfillment service, then the app should request all access scopes to manage all assigned and all unassigned fulfillment orders.
Notifications about fulfillment orders
Fulfillment services are required to register a self-hosted callback URL which has a number of uses. One of these uses is that this callback URL will be notified whenever a merchant submits a fulfillment or cancellation request.
Both merchants and apps can subscribe to the fulfillment order webhooks to be notified whenever fulfillment order related domain events occur.
- The
Represents the location where the physical good resides. You can stock inventory at active locations. Active locations that have
and are configured with a shipping rate, pickup enabled or local delivery will be able to sell from their storefront.
A market is a group of one or more regions that you want to target for international sales. By creating a market, you can configure a distinct, localized shopping experience for customers from a specific area of the world. For example, you can change currency, configure international pricing, or add market-specific domains or subfolders.
Provides an object instance represented by a MetaobjectDefinition.
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.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. If your app is granted access, then you can add thescope to your app along with
or
. Private apps 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 for apps that don't have a legitimate use for the associated data.
A page on the Online Store.
A payment customization.
The
Product
object lets you manage products in a merchant’s store.Products are the goods and services that merchants offer to customers. They can include various details such as title, description, price, images, and options such as size or color. You can use product variants to create or update different versions of the same product. You can also add or update product media. Products can be organized by grouping them into a collection.
Learn more about working with Shopify's product model, including limitations and considerations.
Represents a product variant.
Represents a collection of general settings and information about the shop.
Fields with this union
The resource making the reference.