> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shoply.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Get the overview

> A period's headline figures (revenue, orders, customers and the rest), the same figures for the period before, and a day by day series. What the dashboard's home page draws.

Needs the `analytics.read` permission (Read Analytics). It is one of the heavier reads, and is counted against a smaller budget of its own: 60 a minute for each key.



## OpenAPI

````yaml /api-reference/openapi.json get /stores/{storeId}/analytics/overview
openapi: 3.1.0
info:
  title: Shoply API
  version: '1'
  description: >-
    Everything a store's own server can do with a secret API key: its catalogue,
    orders, customers, marketing, finance and the rest of what the dashboard
    does. And the Customer API, which a buyer's own device asks with a token of
    theirs.
servers:
  - url: https://api.shoply.gg/v1
security:
  - apiKey: []
tags:
  - name: API key
  - name: Store
  - name: Domain
  - name: Payment methods
  - name: Analytics
  - name: Storefronts
  - name: Storefront code
  - name: Payment Routing
  - name: Custom payment methods
  - name: Products
  - name: Product pictures
  - name: Stock
  - name: Categories
  - name: Upsells
  - name: Subscriptions
  - name: Orders
  - name: Invoices
  - name: Reviews
  - name: Coupons
  - name: Coupon categories
  - name: Coupon pop-up
  - name: Sales
  - name: Blog
  - name: Search settings
  - name: Redirects
  - name: Sitemap
  - name: Cart Recovery
  - name: Email Marketing
  - name: Email Templates
  - name: Customers
  - name: Affiliates
  - name: Support Tickets
  - name: Blacklist
  - name: Fraud protection
  - name: Disputes
  - name: Finance
  - name: Tax
  - name: Expenses
  - name: Expense setup
  - name: API requests
  - name: Webhook endpoints
  - name: Webhook deliveries
  - name: Customer API
paths:
  /stores/{storeId}/analytics/overview:
    get:
      tags:
        - Analytics
      summary: Get the overview
      description: >-
        A period's headline figures (revenue, orders, customers and the rest),
        the same figures for the period before, and a day by day series. What
        the dashboard's home page draws.


        Needs the `analytics.read` permission (Read Analytics). It is one of the
        heavier reads, and is counted against a smaller budget of its own: 60 a
        minute for each key.
      operationId: analytics.overview
      parameters:
        - name: storeId
          in: path
          required: true
          description: >-
            The store's ID. A key reaches the store it was made in: `GET /key`
            answers which.
          schema:
            type: string
        - name: range
          in: query
          required: false
          description: The period.
          schema:
            type: string
            enum:
              - today
              - yesterday
              - 7d
              - 30d
              - this_week
              - last_week
              - this_month
              - last_month
              - this_year
            default: 30d
        - name: from
          in: query
          required: false
          description: >-
            The first day of a period of your own, as `YYYY-MM-DD`. With `to`,
            in place of `range`.
          schema:
            type: string
        - name: to
          in: query
          required: false
          description: Its last day, as `YYYY-MM-DD`.
          schema:
            type: string
        - name: tz
          in: query
          required: false
          description: The time zone those days are in, as an IANA name. Left out, UTC.
          schema:
            type: string
            example: Europe/Berlin
      responses:
        '200':
          description: It worked.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    nullable: true
                  code:
                    nullable: true
                  data:
                    type: object
                    properties:
                      store:
                        type: object
                        properties:
                          id:
                            type: string
                          name:
                            type: string
                          slug:
                            type: string
                      range:
                        type: object
                        properties:
                          preset:
                            type: string
                          from:
                            type: string
                          to:
                            type: string
                          days:
                            type: integer
                          timezone:
                            type: string
                          inProgress:
                            type: boolean
                      currencyCode:
                        type: string
                      totals:
                        type: object
                        properties:
                          revenue:
                            type: number
                          orders:
                            type: integer
                          completedOrders:
                            type: integer
                          newCustomers:
                            type: integer
                          averageOrderValue:
                            type: number
                          visitors:
                            type: integer
                          conversionRate:
                            type: integer
                          recovered:
                            type: object
                            properties:
                              revenue:
                                type: integer
                              orders:
                                type: integer
                      previous:
                        type: object
                        properties:
                          revenue:
                            type: integer
                          orders:
                            type: integer
                          newCustomers:
                            type: integer
                          averageOrderValue:
                            type: integer
                          visitors:
                            type: integer
                          conversionRate:
                            type: integer
                      change:
                        type: object
                        properties:
                          revenue:
                            nullable: true
                          orders:
                            nullable: true
                          newCustomers:
                            nullable: true
                          averageOrderValue:
                            nullable: true
                          visitors:
                            nullable: true
                          conversionRate:
                            nullable: true
                      funnel:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            count:
                              type: integer
                            previousCount:
                              type: integer
                            rate:
                              type: integer
                            previousRate:
                              type: integer
                            change:
                              nullable: true
                      returningCustomers:
                        type: object
                        properties:
                          customers:
                            type: integer
                          returning:
                            type: integer
                          rate:
                            type: integer
                          previous:
                            type: object
                            properties:
                              customers:
                                type: integer
                              returning:
                                type: integer
                              rate:
                                type: integer
                          change:
                            nullable: true
                      series:
                        type: object
                        properties:
                          bucket:
                            type: string
                          points:
                            type: array
                            items:
                              type: object
                              properties:
                                at:
                                  type: string
                                revenue:
                                  type: integer
                                orders:
                                  type: integer
                                previousAt:
                                  type: string
                                previousRevenue:
                                  type: integer
                                previousOrders:
                                  type: integer
                      customerSeries:
                        type: object
                        properties:
                          bucket:
                            type: string
                          points:
                            type: array
                            items:
                              type: object
                              properties:
                                at:
                                  type: string
                                customers:
                                  type: integer
                                previousAt:
                                  type: string
                                previousCustomers:
                                  type: integer
                      statusCounts:
                        type: object
                        properties:
                          completed:
                            type: integer
                          pending:
                            type: integer
                          refunded:
                            type: integer
                          cancelled:
                            type: integer
                          chargeback:
                            type: integer
                      statusTotals:
                        type: object
                        properties:
                          completed:
                            type: object
                            properties:
                              orders:
                                type: integer
                              amount:
                                type: number
                          pending:
                            type: object
                            properties:
                              orders:
                                type: integer
                              amount:
                                type: number
                          refunded:
                            type: object
                            properties:
                              orders:
                                type: integer
                              amount:
                                type: number
                          cancelled:
                            type: object
                            properties:
                              orders:
                                type: integer
                              amount:
                                type: number
                          chargeback:
                            type: object
                            properties:
                              orders:
                                type: integer
                              amount:
                                type: integer
                      week:
                        type: array
                        items:
                          type: array
                          items:
                            type: integer
                      topCountries:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            orders:
                              type: integer
                            revenue:
                              type: integer
                            share:
                              type: integer
                      topPaymentMethods:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            orders:
                              type: integer
                            revenue:
                              type: integer
                            share:
                              type: integer
                      topProducts:
                        type: array
                        items:
                          type: object
                          properties:
                            productName:
                              type: string
                            units:
                              type: integer
                            orders:
                              type: integer
                            revenue:
                              type: number
                      lifetime:
                        type: object
                        properties:
                          products:
                            type: integer
                          orders:
                            type: integer
                          customers:
                            type: integer
                          categories:
                            type: integer
              example:
                success: true
                message: null
                code: null
                data:
                  store:
                    id: 743d82fb-6aad-44bb-ab00-d54c4b0eecb7
                    name: Northwind Keys
                    slug: northwind
                  range:
                    preset: 30d
                    from: '2026-09-23'
                    to: '2026-10-22'
                    days: 30
                    timezone: UTC
                    inProgress: true
                  currencyCode: USD
                  totals:
                    revenue: 167.98
                    orders: 5
                    completedOrders: 5
                    newCustomers: 4
                    averageOrderValue: 33.6
                    visitors: 0
                    conversionRate: 0
                    recovered:
                      revenue: 0
                      orders: 0
                  previous:
                    revenue: 0
                    orders: 0
                    newCustomers: 0
                    averageOrderValue: 0
                    visitors: 0
                    conversionRate: 0
                  change:
                    revenue: null
                    orders: null
                    newCustomers: null
                    averageOrderValue: null
                    visitors: null
                    conversionRate: null
                  funnel:
                    - key: visitors
                      count: 0
                      previousCount: 0
                      rate: 0
                      previousRate: 0
                      change: null
                    - key: carted
                      count: 0
                      previousCount: 0
                      rate: 0
                      previousRate: 0
                      change: null
                  returningCustomers:
                    customers: 1
                    returning: 0
                    rate: 0
                    previous:
                      customers: 0
                      returning: 0
                      rate: 0
                    change: null
                  series:
                    bucket: day
                    points:
                      - at: '2026-09-23'
                        revenue: 0
                        orders: 0
                        previousAt: '2026-08-24'
                        previousRevenue: 0
                        previousOrders: 0
                      - at: '2026-09-24'
                        revenue: 89
                        orders: 1
                        previousAt: '2026-08-25'
                        previousRevenue: 0
                        previousOrders: 0
                  customerSeries:
                    bucket: day
                    points:
                      - at: '2026-09-23'
                        customers: 0
                        previousAt: '2026-08-24'
                        previousCustomers: 0
                      - at: '2026-09-24'
                        customers: 0
                        previousAt: '2026-08-25'
                        previousCustomers: 0
                  statusCounts:
                    completed: 5
                    pending: 2
                    refunded: 1
                    cancelled: 2
                    chargeback: 0
                  statusTotals:
                    completed:
                      orders: 5
                      amount: 167.98
                    pending:
                      orders: 2
                      amount: 109.99
                    refunded:
                      orders: 1
                      amount: 9.99
                    cancelled:
                      orders: 2
                      amount: 19.98
                    chargeback:
                      orders: 0
                      amount: 0
                  week:
                    - - 0
                      - 0
                    - - 0
                      - 0
                  topCountries:
                    - key: DE
                      orders: 1
                      revenue: 49
                      share: 100
                  topPaymentMethods:
                    - key: stripe
                      orders: 1
                      revenue: 49
                      share: 20
                    - key: custom_c009621ccc3e9d74
                      orders: 1
                      revenue: 9.99
                      share: 20
                  topProducts:
                    - productName: Northwind Pro
                      units: 2
                      orders: 2
                      revenue: 58.99
                    - productName: Throwaway product
                      units: 3
                      orders: 3
                      revenue: 30
                  lifetime:
                    products: 1
                    orders: 10
                    customers: 4
                    categories: 1
        '401':
          $ref: '#/components/responses/NoKey'
        '403':
          $ref: '#/components/responses/NotAllowed'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooMany'
      x-codeSamples:
        - lang: javascript
          label: Node.js
          source: |
            import Shoply from "@shoplygg/node";

            const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });

            const result = await shoply.analytics.overview();
        - lang: php
          label: PHP
          source: |
            <?php

            require 'vendor/autoload.php';

            $shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);

            $result = $shoply->analytics->overview();
        - lang: python
          label: Python
          source: |
            import shoply

            client = shoply.Client()  # reads SHOPLY_API_KEY

            result = client.analytics.overview()
components:
  responses:
    NoKey:
      description: >-
        No API key was sent, or the one sent is not a live key:
        `api_key_required`, `invalid_api_key`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Refusal'
    NotAllowed:
      description: >-
        The key is real and may not do this: `missing_scope` (with
        `requiredScope`), `ip_not_allowed`, `account_unavailable`, or
        `dashboard_only` for something only a person in the dashboard may do.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Refusal'
    NotFound:
      description: >-
        There is no such thing in this store: `not_found`. A store that is not
        the key's own is answered the same way.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Refusal'
    TooMany:
      description: >-
        The key has used up its budget for now: `rate_limited`. `Retry-After`
        says how many seconds to wait.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Refusal'
  schemas:
    Refusal:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          description: What is wrong, in words for a person.
        code:
          type: string
          description: What is wrong, as a word that does not change.
        data:
          nullable: true
        errors:
          type: object
          description: >-
            For `validation_failed`: what is wrong with each field, by the
            field's name.
          additionalProperties:
            type: string
      required:
        - success
        - message
        - code
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        A secret API key, made under Developers in the dashboard:
        `Authorization: Bearer shoply_sk_...`

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.