Accessing detailed data in your Shopify admin using JSON

JSON, short for JavaScript Object Notation, is a format for storing and transporting data, often used when data is sent from servers to webpages. In most resource pages in the Shopify admin, such as the Orders, Products, or Customers pages, you can access more detailed data using JSON.

Although you aren't required to perform advanced development tasks using JSON, being able to access the JSON file for a particular resource in your Shopify admin can help you gather more detailed information, or troubleshoot or investigate issues yourself. For example, you can review the JSON file for a product to find its variant ID, which can be required for certain data migration tasks or theme code customizations. For another example, you can refer to an order's JSON file to confirm the data variable that you want to use when building an automated workflow in Shopify Flow.

JSON is most often used by developers, but even users with limited coding knowledge can benefit from learning how to find and interpret some common JSON information in their Shopify admin.

Reformatting a JSON file

Raw JSON data displays as a long sequence of nested variables and brackets, which is challenging for a human user to read.

To make the JSON formatting more readable, consider any of the following options:

  • Install a JSON viewer extension in your browser.
  • Use the pretty-print capability that most modern web browsers have available by default:

Screenshot of a JSON product file with example product information displayed. The

Accessing JSON files in your Shopify admin

The Shopify admin is the central hub for managing all aspects of your business, and is designed to display only the most useful and relevant information by default. The extra information that's collected whenever actions are performed in your admin is stored in the .json files of different resource pages. These extra details aren't displayed to you by default because that amount of information would be overwhelming and unhelpful, and would make your admin difficult to use.

For most business tasks, you can use Shopify's existing tools to access and interpret your store's information. However, it can occasionally be helpful to review the specific information about particular resources, such as products or orders, when troubleshooting why or when something happened.

Example: Access an order's JSON file

In this example, you'll access the JSON file of an order in your Shopify admin.

Steps:

  1. From your Shopify admin, go to Orders.

  2. Click any order in the Orders list.

  3. In the browser address bar, add .json to the end of the URL address. It will be similar to this example:

https://admin.shopify.com/store/{example-shop-name}/orders/12345678901234.json
  1. Hit Enter to reload the page in JSON formatting.
  2. Optional: If you don't have a JSON viewer extension installed in your browser, then activate the Pretty-print setting in your browser to make the JSON file more user-friendly. Learn more about reformatting a JSON file.

You'll notice that lots of expected information about the order displays, such as the "currency" and "line_items" associated with the order, but lots of other detailed information is included as well, such as the "client_details" from the customer's browser session when they placed the order. This kind of information is useful for overall session tracking and marketing platform analytics, but isn't necessary for you to process and fulfill the order.

Displaying specific fields in a JSON file

You can force JSON files to display only specific fields, which can make information easier to interpret when you know the particular properties that you want to include. At the end of any JSON file URL in the browser address bar, add ?fields= and then include the property names that you want to display, in any order, separated by a comma.

For example, to display an order's ID, customer information, total price, and tags, add ?fields=id,customer,total_price,tags to the end of the JSON file URL, such as in the following example:

https://admin.shopify.com/store/{example-shop-name}/orders/12345678901234.json?fields=id,customer,total_price,tags

Using other JSON resources

You can use the following JSON resources to display specific information in your Shopify admin:

  • Product count: Add /count.json to the end of the Products list URL to display the total number of products. The full URL should be:
https://admin.shopify.com/store/{example-shop-name}/products/count.json
  • Transactions: Add /transactions.json to the end of an order page URL to display only order transaction information. Learn more about the Transactions resource.
  • Fulfillments: Add /fulfillments.json to the end of an order page URL to display only order fulfillment information. Learn more about the Fulfillment resource.
  • Abandoned checkouts: Add .json to the end of an abandoned checkout URL to display detailed information about the abandoned checkout. Learn more about the Abandoned checkout resource.

Common JSON properties for troubleshooting

The following table lists JSON properties that you might want to refer to for troubleshooting assistance with different resource types. For example, if you want to confirm when a particular product was published, then you can review the product's JSON file for the published_at property, which displays the date and time in ISO 8601 format.

This table doesn't include every possible JSON resource or property stored in the Shopify admin, so refer to the Shopify Developer Documentation for definitions of any resource or property that's not included here.

Lists some example admin resources and common properties associated with them, including definitions for what they might be used for when troubleshooting.
ResourceJSON propertyDefinition
Product
"product": {
  "created_at"
The time and date when the product was initially created.
"product": {
  "published_at"
The time and date when the product's status was set to Active.
"product": {
  "updated_at"
The most recent time and date when the product was updated. This can include changes to the product description, title, or SEO information, as well as automatic updates such as changes to inventory when a product is purchased.
Variant
"product": {
  "variants": [
    {
    "created_at"
The time and date when the variant was initially created. This can be different from the date and time that the overall product was created.
"product": {
  "variants": [
    {
    "updated_at"
The most recent time and date when the variant was updated. This can be different from the date and time that the overall product was last updated.
"product": {
  "variants": [
    {
    "inventory_quantity"
The current database value and what's accessible to customers for purchase. This could be a negative value if the variant inventory isn't being tracked, or if it's set to oversell.
"product": {
  "variants": [
    {
    "old_inventory_quantity"
The database value before the variant's last updated_at date.
Order
"order": {
   "line_items": [
    {
    "requires_shipping"
Displays as true or false. This indicates the product or variant's shipping settings at the time the order was placed.
"order": {
   "line_items": [
    {
    "taxable"
Displays as true or false. This indicates how the product or variant was set to charge taxes at the time the order was placed.
"order": {
   "line_items": [
    {
    "variant_inventory_management"
Displays as shopify, amazon_marketplace_web, null, or a third-party value depending on which fulfillment service is set to track the product's inventory. A value of null means the product wasn't being tracked at the time of the order.
"order": {
   "line_items": [
    {
    "fulfillable_quantity"
Displays how much inventory is still reserved by the system in order to complete the order. This doesn't equal the current variant inventory.
"order": {
   "line_items": [
    {
    "quantity"
The number of products or variants purchased.
"order": {
   "line_items": [
    {
    "tax_lines"
In the United States, this displays state, county, and municipal values. If no tax lines display, but tax was charged on the order, then this means that the tax was charged on the shipping cost.
Customer
"customer": {
  "created_at"
The time and date when the customer was initially created.
"customer": {
  "updated_at"
The most recent time and date when the customer profile was updated.

Metafields in JSON

Metafields are a flexible way to attach additional custom information to a Shopify resource, such as products or collections. Some examples of data stored using metafields include product specifications, size charts, downloadable documents, release dates, images, or part numbers. Learn more about using metafields.

You can add /metafields.json to the end of a supported resource page URL to display the metafields that are associated with that resource. Refer to the following table for some examples of resources and URL formats to use to display metafield information using JSON.

List some example admin resources along with an example JSON metafields file URL.
Example resource typeExample URL
Smart collectionhttps://admin.shopify.com/store/{your-store-name}/collections/{collection-id}/metafields.json
Customerhttps://admin.shopify.com/store/{your-store-name}/customers/{customer-id}/metafields.json
Orderhttps://admin.shopify.com/store/{your-store-name}/orders/{order-id}/metafields.json
Pagehttps://admin.shopify.com/store/{your-store-name}/pages/{page-id}/metafields.json
Producthttps://admin.shopify.com/store/{your-store-name}/products/{product-id}/metafields.json
Varianthttps://admin.shopify.com/store/{your-store-name}/products/{product-id}/variants/{variant-id}/metafields.json
Product imagehttps://admin.shopify.com/store/{your-store-name}/metafields.json?metafield[owner_id]={id}&metafield[owner_resource]=product_image

Note: Product image metafields can only be added through the API. Replace the {id} and other placeholders in the URL with the actual values from your API queries.

Storehttps://admin.shopify.com/store/{your-store-name}/metafields.json

For a complete list of resources that can have metafields, and the specific types of properties that are stored for each resource type, refer to the Metafield JSON resource in the Shopify Developer Documentation.

Events in JSON

Events are generated by some Shopify resources when certain actions are completed, such as the creation of a blog post, the fulfillment of an order, or the addition of a product.

You can add /events.json to the end of a supported resource page URL to display the events associated with that resource. Refer to the following table for some examples of resources and URL formats to use to display event information using JSON.

List some example admin resources along with an example JSON events file URL.
Example resource typeExample URL
Orderhttps://admin.shopify.com/store/{your-store-name}/orders/{order-id}/events.json

This file lists the author of events, informing you which users completed certain actions, such as who or what published a product.

Producthttps://admin.shopify.com/store/{your-store-name}/products/{product-id}/events.json

This file lists the author of events, informing you which users completed certain actions, such as who or what marked a payment as paid.

Storehttps://admin.shopify.com/store/{your-store-name}/events.json?limit=250

This URL format displays the 250 most recent events that took place on your store. Events can include but aren't limited to product creation or updates, page deletions, and variant updates.

For a complete list of resources that can create events, and the specific events that are created for each resource type, refer to the Event JSON resource in the Shopify Developer Documentation.