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

# Get revenue



## OpenAPI

````yaml get /{shopId}/analytics
openapi: 3.0.3
info:
  title: API V2
  version: 1.0.0
  contact: {}
servers:
  - url: http://staging.qshop.ng/apiv2
    description: Staging server
  - url: http://qshop.ng/api
    description: null
security: []
tags:
  - name: Analytics
  - name: Authentication
  - name: Storefront
  - name: Roles
  - name: Banks
  - name: Products
  - name: Shops
  - name: Roles1
  - name: Bank accounts
  - name: Users
  - name: Payment methods
  - name: Integrations
  - name: Subscriptions
  - name: Currency
  - name: Shipping zones
  - name: Shipping rates
  - name: Policies
  - name: Contact us
  - name: Locations
  - name: Reviews
  - name: Referral
  - name: Stripe
  - name: Campaigns
  - name: Credits
  - name: Product Tags
  - name: Product Attributes
  - name: Product Categories
  - name: Orders
  - name: Discount
  - name: Shipping
  - name: Redeem digital assets
  - name: Coupons
  - name: Currencies
  - name: Shop categories
  - name: Locations1
  - name: Features
  - name: Subscription plan
  - name: Recurring subscription plan
  - name: Shop payments
  - name: QDiscounts
  - name: Order status
  - name: Announcements
  - name: Wishlist
  - name: Transaction status
  - name: Templates
  - name: Config
  - name: Cart management
  - name: Users1
  - name: Profile
  - name: Domains
  - name: Transactions
  - name: Subscriptions1
  - name: Subscription statuses
  - name: Security
  - name: Payments
  - name: Payment methods1
  - name: Payment platforms
  - name: Public
  - name: social
  - name: Shipping1
  - name: Orders1
  - name: Integrations1
  - name: Webhook
  - name: ShopTags
  - name: Themes
paths:
  /{shopId}/analytics:
    get:
      tags:
        - Analytics
      summary: Get revenue
      description: Get revenue
      operationId: getRevenue
      parameters:
        - name: startDate
          in: query
          schema:
            type: string
            example: '2022-01-01'
        - name: endDate
          in: query
          schema:
            type: string
            example: '2022-11-21'
        - name: limit
          in: query
          schema:
            type: string
            example: nolimit
        - name: type
          in: query
          schema:
            type: string
            example: revenue
        - name: page
          in: query
          schema:
            type: string
            example: '1'
        - name: group
          in: query
          schema:
            type: string
            example: month
      responses:
        '200':
          description: '200'
          headers:
            Access-Control-Allow-Headers:
              schema:
                type: string
                example: >-
                  Content-Type, Authorization, Content-Length, X-Requested-With,
                  Token
            Access-Control-Allow-Methods:
              schema:
                type: string
                example: GET,PUT,POST,DELETE,OPTIONS,PATCH
            Access-Control-Allow-Origin:
              schema:
                type: string
                example: '*'
            Connection:
              schema:
                type: string
                example: keep-alive
            Content-Length:
              schema:
                type: string
                example: '160'
            Date:
              schema:
                type: string
                example: Mon, 21 Nov 2022 13:38:36 GMT
            ETag:
              schema:
                type: string
                example: W/"a0-pLruUE4gGpodEZqi3dSkqTBtdAQ"
            Keep-Alive:
              schema:
                type: string
                example: timeout=5
            X-Powered-By:
              schema:
                type: string
                example: Express
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      orderTotal:
                        type: array
                        items:
                          type: object
                          properties:
                            _id:
                              nullable: true
                              example: null
                            total:
                              type: number
                              example: 5000
                        example:
                          - _id: null
                            total: 5000
                      product:
                        type: number
                        example: 58
                      revenue:
                        type: array
                        items:
                          type: object
                          properties:
                            _id:
                              nullable: true
                              example: null
                            total:
                              type: number
                              example: 10008000
                        example:
                          - _id: null
                            total: 10008000
                  msg:
                    type: string
                    example: Revenue aggregation successful
                  success:
                    type: boolean
                    example: true
              examples:
                '200':
                  value:
                    data:
                      orderTotal:
                        - _id: null
                          total: 5000
                      product: 58
                      revenue:
                        - _id: null
                          total: 10008000
                    msg: Revenue aggregation successful
                    success: true

````