Blog Post

Custom Reporting with Shopify APIs: Guide

Want better Shopify insights? Custom reporting with Shopify APIs lets you go beyond basic analytics. Here's why it's a game-changer for New Zealand businesses:

  • Track What Matters: Analyse NZD revenue, customer behaviour, and seasonal trends specific to New Zealand.
  • Automate Reporting: Save time with real-time updates, scheduled exports, and workflow automation.
  • Customised Insights: Monitor sales, inventory, and marketing performance with tailored data visualisations.
  • Stay Compliant: Align reports with New Zealand’s fiscal year (1 April - 31 March), GST requirements, and local time zones.

How to Start:

  1. Set up a Shopify custom app for API access.
  2. Use API scopes like read_orders and read_products to pull relevant data.
  3. Automate exports with cron jobs or webhooks for real-time updates.
  4. Build dashboards that display NZD revenue, DD/MM/YYYY dates, and local insights.

This guide breaks down the steps to create custom reports that help New Zealand businesses make smarter decisions, save time, and grow.

How to Automate Product Reporting from Shopify to Google Sheets Using API

Shopify

Setting Up Shopify API Access

To create custom reports tailored to your Shopify store, you'll need to set up API access. This involves building a custom app, configuring the correct permissions, and ensuring secure connections. For businesses in New Zealand, this process is especially useful for tracking revenue in NZD, managing data in the local timezone, and generating reports that align with regional needs.

Creating a Custom App

A custom app allows you to access Shopify data directly. Unlike public apps in the Shopify App Store, custom apps are designed specifically for your store, providing a secure way to interact with your business data via Shopify's APIs.

To start, go to your Shopify admin panel and enable custom app development. Navigate to Settings > Apps and sales channels > Develop apps, then select Allow custom app development. Once activated, you can create your custom app by clicking Create a custom app in the same section.

When creating the app, you'll need to provide basic details like the app name and developer information. Choose a name that clearly reflects the app's purpose, especially if you plan to manage multiple apps. After this, set up API scopes before installing the app. Once installed, you'll receive API access tokens, which are essential for authenticating requests to Shopify's APIs.

Setting API Scopes and Permissions

API scopes control what parts of your store data the app can access. For reporting purposes, it's important to select scopes that match your specific data needs. Stick to the principle of least privilege - request only the data necessary for your reports.

Here are some common scopes for sales and performance reporting:

Scope Access Level Purpose for Reporting
read_orders Orders, customers, transactions Tracks sales performance and revenue
read_products Products, variants, collections Analyses product performance
read_customers Customer data Enables segmentation and behaviour analysis
read_inventory Inventory details Tracks stock levels and turnover
read_reports Existing Shopify reports Compares with pre-existing report data
read_all_orders Historical order data Allows analysis beyond Shopify's default 60-day limit

For businesses in New Zealand, the read_all_orders scope is particularly useful for analysing year-over-year trends or seasonal sales, such as summer versus winter product performance. Shopify's default access is limited to the last 60 days [2], so this extended scope is essential for longer-term insights.

If you're working with development stores, ensure you select the appropriate data use in the Partner Dashboard. This will automatically grant the necessary permissions to access customer and store data.

Setting Up API Clients

Once your custom app is created and the scopes are configured, the next step is to set up API clients to handle authentication and data requests. Depending on your preferences, you can use Node.js or Python.

Start by gathering your API credentials - the API key, secret, and access token generated during app installation. Save your Admin API access token securely, as it will only be shown once.

For Node.js development:

  • Initialise your project with npm init -y to create a package.json file.

  • Install necessary packages: npm install express axios dotenv.

  • Save your credentials in a .env file:

    SHOPIFY_STORE_URL=your-store.myshopify.com
    SHOPIFY_ACCESS_TOKEN=your-access-token
    SHOPIFY_API_KEY=your-api-key
    SHOPIFY_API_SECRET=your-api-secret
    

Set up an Express server to handle API requests, ensuring you include the X-Shopify-Access-Token header for authentication. For New Zealand stores, configure the timezone to Pacific/Auckland to keep timestamps aligned with local business hours.

If you prefer Python, Shopify's Python API libraries can simplify tasks like order processing or inventory management. These tools also support integrations with third-party services like payment gateways or ERP systems, enhancing customer experiences with features like personalised recommendations.

Handling API Rate Limits and Webhooks

Shopify's REST API allows only two calls per second [3]. To keep your system stable, implement error handling and retry logic to manage rate limits during high-traffic periods.

For real-time updates, consider using webhooks. These allow your app to respond automatically to events like order creation or product updates. For example, your reports can refresh instantly as new data becomes available, giving you up-to-date insights for decision-making.

"Connecting your Node.js app to Shopify's API opens up many possibilities - from automation to full app development. With a reliable setup, you can build everything from simple order notifiers to complete back-office solutions." - CartCoders [3]

Security Best Practices

Always prioritise security when working with Shopify's API. Never expose access tokens in front-end code. Use environment variables and secure server-side storage to protect your credentials. If you need to rotate your tokens for security reasons, you'll need to delete and recreate the app.

With your API clients set up and secure, you're ready to build custom reports tailored to your Shopify store's needs.

Building Custom Reports with Shopify Data

Once you’ve set up API access, you can turn Shopify’s raw data into tailored reports that support better business decisions. This involves creating reports that align with New Zealand’s fiscal year, display revenue in NZD, and use local date formats.

Mapping API Data Fields to Report Metrics

Shopify's Admin API provides extensive store data, and your job is to identify the right endpoints to extract metrics that matter to your business.

For sales metrics, the Orders API is your go-to. The total_price field gives you gross sales figures, while subtotal_price excludes taxes and shipping, making it useful for calculating profit margins. If you’re tracking GST separately, the total_tax field provides the exact amount collected per order - a crucial metric for New Zealand businesses.

Customer behaviour analysis often requires merging data from multiple endpoints. For example, use the customer_id field to track repeat purchases and the created_at timestamp to review shopping trends over time. Since metafield values are stored as strings, you’ll need to convert them into numbers when necessary [6].

Product performance can be analysed by mapping the line_items array from orders to specific products. Each line item includes fields like product_id, variant_id, quantity, and price, helping you pinpoint your best-sellers and most profitable variants.

While Shopify’s dashboards already cover basics like total sales, average order value, and conversion rates [4], custom reports allow you to go deeper. You can add calculations specific to your business or combine data in ways that Shopify's standard reports don’t support.

Applying Filters and Date Formats

To create reports that resonate with New Zealand businesses, proper filtering and date formatting are essential. This means aligning date ranges with local fiscal years, converting timestamps to the Pacific/Auckland timezone, and formatting dates in DD/MM/YYYY.

Shopify uses UTC timestamps, so you’ll need to adjust them to New Zealand’s timezone. For date formatting, the strftime method in Shopify can help you create custom formats [7]. Use %d/%m/%Y to meet local expectations.

New Zealand’s fiscal year runs from 1 April to 31 March, so your filters should reflect this. For instance, when comparing year-over-year performance, set the date range from 01/04/2024 to 31/03/2025 for the current fiscal year.

Currency formatting is equally important. Display amounts in NZD using commas as thousand separators (e.g., $1,234,567.89) and always include the dollar sign to avoid confusion with other currencies.

Here’s an example of how to set up date formats in your theme’s locales/en.json file:

{
  "date_formats": {
    "nz_standard": "%d/%m/%Y",
    "nz_full": "%A, %d %B %Y",
    "fiscal_year": "FY %Y"
  }
}

You can then use this format in reports: {{ order.created_at | time_tag: format: 'nz_standard' }} [7].

When working with large datasets, keep Shopify’s API limits in mind. The REST Admin API allows 40 requests per app per store per minute, while Shopify Plus stores have ten times this limit [5]. To avoid performance issues, consider using pagination and caching.

With these filters and formats in place, you’re ready to turn raw data into reports that provide actionable insights.

Example: Building a Sales Performance Report

Let’s walk through creating a sales performance report that tracks revenue growth, highlights top products, and compares performance across time periods.

Step 1: Data Collection Setup
Start by defining your reporting period and key metrics, using the data mapping and filters outlined earlier.

Step 2: Revenue Calculation and Formatting
Use created_at_min and created_at_max filters to pull order data for your selected date range. Sum the total_price field for total revenue, format it in NZD, and generate separate API calls for month-to-month comparisons.

Step 3: Product Performance Analysis
Extract product data from the line_items array. Group items by product_id and calculate total quantities and revenue for each product. This helps you identify your best-performing products and variants.

Step 4: Customer Segmentation
Analyse the customer object in orders to categorise sales by new and returning customers. Count unique customer_id values to track customer acquisition and identify repeat buyers by locating customers with multiple orders in your date range.

Step 5: Report Generation and Formatting
Combine the collected data into a structured report. Use DD/MM/YYYY for dates, display currency in NZD, and include percentage changes for period-over-period comparisons.

Your final report should feature metrics like total revenue, number of orders, average order value, top products, and customer acquisition stats. This approach gives you a clear, locally relevant view of your business performance and lays the groundwork for automated reports and real-time updates in the next steps.

Automating Report Generation and Data Workflows

Once you've built your custom reports, the next step is to automate your data workflows so they run seamlessly. For businesses in New Zealand, this involves setting up systems that handle local time zones, format currency in NZD, and adapt to the needs of growing datasets.

Managing API Rate Limits

Shopify's API rate limits can become a challenge if your workflows exceed the allowed requests. Shopify uses a leaky bucket algorithm to regulate API requests. Think of it as each app having a bucket that fills with "marbles" (requests) and gradually empties over time.

The rate limits vary based on your Shopify plan. For example:

  • REST Admin API: Standard stores can make 2 requests per second, while Shopify Plus stores are allowed 20 requests per second [13].
  • GraphQL Admin API: Standard stores receive 100 points per second, whereas Shopify Plus accounts are allocated 1,000 points per second [10].

To stay within these limits, you’ll need to implement client-side throttling. This involves monitoring API response headers and adjusting your request rates dynamically [11]. If you exceed the limit, Shopify responds with a 429 Too Many Requests error and a Retry-After header [10][13]. Use retry mechanisms with exponential backoff, starting with a one-second delay, and consider strategies like bulk operations, caching frequently accessed data, and staggering requests to avoid redundancy [10][12][11][13].

For resource-heavy API tasks, schedule them during off-peak hours in NZST. Running bulk exports between 2:00 AM and 6:00 AM NZST - notably low-traffic times - can help reduce performance strain on your store.

Once your rate limits are under control, you can confidently move on to automating data exports for continuous insights.

Scheduling Automatic Data Exports

Automating data exports simplifies your reporting process. Shopify’s built-in export tools are fine for basic needs, but they fall short when it comes to recurring, automated exports [8]. For more advanced workflows, you’ll need to set up scheduled processes.

Setting Up Cron Jobs for NZST

Cron jobs are a reliable way to automate exports. Configure them to align with New Zealand business hours or your financial reporting calendar. For instance, you could schedule weekly sales reports to generate every Monday at 8:00 AM NZST, giving your team fresh data to start the week. Make sure your server’s timezone is set to Pacific/Auckland to handle daylight saving time changes automatically.

Cloud Storage Integration

Export your data to cloud storage platforms like AWS S3 or Google Cloud Storage for easy access and integration with BI tools. Organise file paths by using dates in DD/MM/YYYY format and prefixing currency values with NZD to ensure clarity.

Using Webhooks for Real-Time Updates

While scheduled exports are great for periodic reporting, webhooks allow for real-time updates that respond immediately to store events. By setting up webhooks for actions like order creation, product updates, or customer registrations, you can trigger instant report updates or alerts without relying on constant API polling. Businesses using event-driven workflows have reported a 30% boost in operational efficiency [17].

Practical Implementation and Security Considerations

Here’s how some companies are using webhooks effectively:

  • A direct-to-consumer fashion brand linked Shopify webhooks with its inventory management system to push updates instantly when a SKU changed, cutting down on customer support tickets [16].
  • A gifting business used an order/create webhook to trigger handwritten card printing via a third-party API [16].

To manage webhook traffic effectively:

  • Use asynchronous processing by placing a message broker between Shopify and your application [14].
  • Verify webhook authenticity with HMAC signatures and ensure all endpoints use HTTPS [14][15].
  • Set up reconciliation jobs to sync your application data with Shopify, as webhook delivery failures can occasionally occur [14].
  • Monitor webhook response times alongside API rate limits to maintain smooth performance [15].

Real-Time Alerts for New Zealand Businesses

Webhooks can also be used to set up real-time alerts for critical events. For example, you might want notifications for:

  • Orders over $1,000 NZD
  • Abandoned carts during peak hours
  • Low inventory levels

These instant alerts allow you to react quickly, improving customer satisfaction and streamlining operations. Whether it’s responding to a high-value order or addressing inventory shortages, real-time updates can make a big difference.

sbb-itb-f46a14b

Creating Dashboards and Sharing Reports

Now that your automated data flows are in place, the next step is to create dashboards that clearly present the data and share reports effectively with your team. This ensures the insights you gather can directly inform business decisions.

Building NZD Revenue Tracking Dashboards

To make sure your dashboard aligns with New Zealand conventions, update your Shopify account's region settings to "English (New Zealand)." This simple step adjusts currency values to NZD and formats dates to the DD/MM/YYYY style automatically[18]. It keeps your revenue tracking consistent and easy to understand.

When designing dashboards, focus on metrics that are particularly relevant to New Zealand businesses. For example, track monthly recurring revenue in NZD, average order value trends, and seasonal performance during key periods like Christmas or Boxing Day. Use proper thousand separators and decimals for clarity.

Choose chart types that make comparisons and trends obvious. For instance:

  • Stacked bar charts: Compare revenue from online sales versus in-store pickups.
  • Line graphs: Track revenue trends over time.

Make sure your charts reflect Pacific/Auckland time settings, accounting for daylight saving changes, and stick to DD/MM/YYYY formatting for dates. Tailor dashboard views to different stakeholders. For example, your finance team might need profit margin breakdowns, while the marketing team might focus on campaign performance and customer acquisition costs. Regardless of the view, ensure all data uses NZD formatting and New Zealand date conventions.

Exporting Reports for Teams and Stakeholders

Sharing reports effectively starts with choosing the right export format and maintaining consistent formatting. Shopify supports formats like CSV, XML, JSONL, and Apache Parquet, which integrate easily with tools like Excel or Google Sheets while retaining New Zealand-specific settings[19].

To manually export data, go to the relevant section (Products, Orders, or Customers) in Shopify and click Export. For PDF reports, use your browser’s print function and save the page as a PDF to preserve formatting[19].

If you need automated sharing, tools like Coupler.io are a great option. They connect Shopify data directly to platforms like Google Sheets, Excel, Looker Studio, Power BI, Tableau, or Qlik[9]. These tools allow you to blend data and ensure your stakeholders always have access to updated, well-formatted reports.

Before sharing reports externally - whether with subcontractors or accountants - double-check that all necessary details are included. For example, tax reports often require specifics about Users, Products, and Orders. Always format currency values with the NZD prefix and use DD/MM/YYYY dates to avoid confusion with international stakeholders[9].

Set up regular exports that align with your business cycles. For instance, you might send weekly sales reports every Tuesday morning or distribute monthly financial summaries on the first business day of each month. This consistency helps everyone plan around the timely delivery of insights.

Using Almond Labs' Roadmap Toolkit for Reports

Almond Labs

To make managing reports even easier, you might want to explore Almond Labs' Roadmap toolkit. Designed for New Zealand businesses, it simplifies report creation with a no-code approach. Instead of building complex API integrations, Roadmap provides pre-built components that seamlessly integrate with Shopify data while adhering to local formatting standards.

The toolkit’s Campaign Builder automatically formats revenue data in NZD and displays dates using New Zealand conventions. This lets you create dashboards to track metrics like loyalty programme performance, bundle sales success, and customer retention - no coding required.

Another standout feature is the Tag Library, which helps with report segmentation. It can automatically tag customers based on purchase behaviour, location within New Zealand, or engagement with specific campaigns. These tags become powerful filters in your dashboards, making it easy to analyse data by customer group or region.

Roadmap also includes Analytics and Optimisation tools focused on metrics important to New Zealand e-commerce businesses, such as customer retention rates, average order value growth, and conversion trends. These pre-built reports save time compared to building custom API solutions while still offering valuable insights into your business performance.

For businesses running multiple campaigns or seasonal promotions, Roadmap’s dashboard sharing features ensure everyone stays on the same page. Its user-friendly no-code interface allows marketing team members to create and adjust reports without developer assistance, streamlining your reporting process. As your business expands with new campaigns, loyalty programmes, or customer segments, Roadmap automatically integrates this data into your dashboards - all while maintaining consistent New Zealand formatting.

Conclusion: Getting Started with Custom Shopify Reports

Custom Shopify API reports are reshaping how New Zealand lifestyle brands interpret and act on market data. As outlined in this guide, these reports offer precision and flexibility through real-time insights, automated data collection, and outputs tailored to local needs. They provide a strong foundation for making smarter, faster decisions.

Main Benefits of Shopify API Reporting

Custom Shopify API reporting can have a direct impact on your bottom line. For example, businesses using Shopify APIs for headless commerce have reported a 30% increase in revenue, thanks to expanded product offerings and improved customer experiences[21]. This growth is driven by the ability to deliver personalised experiences across multiple channels while keeping data tracking consistent.

Automation is another major advantage. Instead of spending hours manually exporting and formatting data, your team can focus on analysing trends and making strategic decisions. Custom reports simplify this process by delivering precise metrics tailored to your business needs - whether that’s tracking seasonal sales during Boxing Day or monitoring customer retention across different regions in New Zealand.

Integration is where custom API reporting truly shines. Take the example of Spiral Scout’s work with Saysh, a female-led lifestyle shoe brand, in 2023. They created API integrations between Saysh and tools like Notion and Dropbox, streamlining information transfer, improving product management, and making data more accessible[20]. For New Zealand businesses, similar integrations can connect Shopify data with local accounting software, inventory systems, and marketing platforms, ensuring seamless operations and better decision-making.

Your Next Steps for Custom Report Building

Getting started with custom reporting doesn’t have to be overwhelming. Begin by identifying gaps in your current reporting. Maybe you want to track sales performance by region in New Zealand, measure the success of your loyalty programmes, or analyse customer behaviour that’s unique to your market.

From there, create a custom app within your Shopify admin to access the API. Define the API scopes carefully to ensure your app has the right permissions to pull the data you need[22]. If you’re using Advanced Shopify or Shopify Plus, take advantage of ShopifyQL to run analytical queries directly within Shopify, eliminating the need for external tools[23][24].

For a more streamlined approach, tools like Almond Labs’ Roadmap toolkit can simplify the process. This no-code platform makes it easy to build custom reports without technical expertise. Features like the Campaign Builder automatically format revenue data in NZD and follow New Zealand date conventions, while the Tag Library helps segment reports by customer behaviour or geographic area. This allows your marketing team to create and adjust reports independently, making the process more accessible across your organisation.

Start small - perhaps by automating a single, time-consuming manual report. Once you experience the time savings and accuracy improvements, you can gradually expand to more complex reporting needs. The key is to set clear objectives and build your custom reporting capabilities step by step, rather than trying to overhaul everything at once.

As your business grows, the benefits of custom Shopify API reporting will only become more evident. With over one million businesses worldwide using Shopify[1], those that embrace custom reporting will be better equipped to adapt to market changes, meet customer expectations, and maintain efficiency.

FAQs

How can I customise Shopify API reports to meet New Zealand's fiscal year and GST requirements?

Aligning Shopify API Reports with New Zealand Standards

To ensure your Shopify API reports meet New Zealand's fiscal year and GST requirements, it’s crucial to customise your reporting to reflect local standards. In New Zealand, the fiscal year begins on 1 April and ends on 31 March, so your reports should be adjusted to match this timeframe.

GST in New Zealand is set at a standard rate of 15% for most goods and services. If your business has an annual turnover exceeding NZD 60,000, you are required to register for GST.

When setting up custom reports, make sure they:

  • Cover sales data within the correct fiscal period.
  • Include accurate GST calculations for compliance.

By automating these processes with Shopify APIs, you can save time, minimise errors, and ensure your reports are always current and aligned with New Zealand’s tax regulations.

How can I manage Shopify API rate limits when automating workflows for my New Zealand e-commerce business?

To handle Shopify API rate limits effectively while automating workflows for your New Zealand e-commerce business, you’ll need to approach API usage thoughtfully and plan with care.

Begin by identifying your specific API requirements. Whether it’s updating inventory or processing orders, calculate how many API calls these tasks will need. This approach helps you cut down on unnecessary requests and keeps your operations running smoothly. Keep an eye on API response headers to monitor your remaining limits and adjust your requests as needed.

If you hit rate limit errors, follow the retry timing provided in the API response and space out your requests to avoid further disruptions. For tasks that involve a large number of calls, break them into smaller batches or schedule them during off-peak times to minimise the chance of exceeding limits.

By managing your API usage smartly, you can streamline workflows and keep your Shopify operations running efficiently in the New Zealand market.

How can I use webhooks to get real-time updates for my Shopify store's custom reports, and what security steps should I take?

Webhooks in Shopify

Webhooks in Shopify are a handy way to get real-time updates for your custom reports. Instead of constantly polling the API, Shopify can notify your specified URL whenever key events happen, like new orders or product updates. This means your data stays up-to-date without the extra hassle. For instance, when a customer places an order, a webhook can immediately update your reporting system.

To keep your webhook data safe, make sure your endpoint uses HTTPS. This encrypts the data and prevents it from being intercepted. Another important security measure is HMAC signature verification, which ensures the data genuinely comes from Shopify. By comparing the signature Shopify provides with one you generate, you can confirm the request’s authenticity. These precautions help safeguard your data and ensure your reporting system runs smoothly.

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Block quote

Ordered list

  1. Item 1
  2. Item 2
  3. Item 3

Unordered list

  • Item A
  • Item B
  • Item C

Text link

Bold text

Emphasis

Superscript

Subscript

June 12, 2025

More Articles

-->