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

# Retrieve analytics

> Retrieve analytics for a link, a domain, or the authenticated workspace. The response type depends on the `event` and `type` query parameters.

<Note>
  Analytics endpoints require a [Pro plan](https://codeqr.io/pricing) subscription
  or higher.
</Note>


## OpenAPI

````yaml get /analytics
openapi: 3.0.3
info:
  title: CodeQR.io API
  description: >-
    SaaS platform for creating dynamic QR Codes, trackable short links, and
    interactive pages, focused on automation, analytics, and engagement.
  version: 0.0.1
  contact:
    name: CodeQR.io Support
    email: contact@codeqr.io
    url: https://codeqr.io/api
  license:
    name: AGPL-3.0 license
servers:
  - url: https://api.codeqr.io
    description: Production API
security: []
paths:
  /analytics:
    get:
      tags:
        - Analytics
      summary: Retrieve analytics for a link, a domain, or the authenticated workspace.
      description: >-
        Retrieve analytics for a link, a domain, or the authenticated workspace.
        The response type depends on the `event` and `type` query parameters.
      operationId: retrieveAnalytics
      parameters:
        - in: query
          name: event
          description: >-
            The type of event to retrieve analytics for. Defaults to
            'analytics'.
          schema:
            type: string
            enum:
              - clicks
              - leads
              - sales
              - scans
              - views
              - composite
            default: clicks
            description: >-
              The type of event to retrieve analytics for. Defaults to
              'analytics'.
        - in: query
          name: groupBy
          description: >-
            The parameter to group the analytics data points by. Defaults to
            'count' if undefined.
          schema:
            type: string
            enum:
              - timeseries
              - clicks
              - count
              - totals
              - top_urls
              - top_links
              - top_qrcodes
              - top_pages
              - top_events
              - scans
              - views
              - country
              - city
              - region
              - devices
              - browsers
              - os
              - referers
              - referer_urls
              - trend_live
              - kpis
              - analytics
              - continents
              - countries
              - cities
              - clicks
              - scans
              - views
              - leads
              - sales
              - composite
            default: count
            description: >-
              The parameter to group the analytics data points by. Defaults to
              'count' if undefined.
        - in: query
          name: domain
          description: The domain of the short link.
          schema:
            type: string
            description: The domain of the short link.
        - in: query
          name: key
          description: The short link slug.
          schema:
            type: string
            description: The short link slug.
        - in: query
          name: linkId
          description: The unique ID of the short link on CodeQR.
          schema:
            type: string
            description: The unique ID of the short link on CodeQR.
        - in: query
          name: qrcodeId
          description: The unique ID of the QR code on CodeQR.
          schema:
            type: string
            description: The unique ID of the QR code on CodeQR.
        - in: query
          name: pageId
          description: The unique ID of the page on CodeQR.
          schema:
            type: string
            description: The unique ID of the page on CodeQR.
        - in: query
          name: externalId
          description: >-
            This is the ID of the link in the your database. Must be prefixed
            with 'ext_' when passed as a query parameter.
          schema:
            type: string
            description: >-
              This is the ID of the link in the your database. Must be prefixed
              with 'ext_' when passed as a query parameter.
        - in: query
          name: interval
          description: >-
            The interval to retrieve analytics for. Takes precedence over start
            and end.
          schema:
            type: string
            enum:
              - 1h
              - 24h
              - 7d
              - 30d
              - 90d
              - ytd
              - 1y
              - all
              - all_unfiltered
            description: >-
              The interval to retrieve analytics for. Takes precedence over
              start and end.
        - in: query
          name: start
          description: The start date and time when to retrieve analytics from.
          schema:
            type: string
            description: The start date and time when to retrieve analytics from.
        - in: query
          name: end
          description: >-
            The end date and time when to retrieve analytics from. If not
            provided, defaults to the current date.
          schema:
            type: string
            description: >-
              The end date and time when to retrieve analytics from. If not
              provided, defaults to the current date.
        - in: query
          name: timezone
          description: >-
            The IANA time zone code for aligning timeseries granularity (e.g.
            America/New_York). Defaults to UTC.
          schema:
            type: string
            description: >-
              The IANA time zone code for aligning timeseries granularity (e.g.
              America/New_York). Defaults to UTC.
            example: America/New_York
            default: UTC
        - in: query
          name: continent
          description: The continent to retrieve analytics for.
          schema:
            $ref: '#/components/schemas/continentCode'
        - in: query
          name: country
          description: The country to retrieve analytics for.
          schema:
            $ref: '#/components/schemas/countryCode'
        - in: query
          name: city
          description: The city to retrieve analytics for.
          schema:
            type: string
            description: The city to retrieve analytics for.
            example: New York
        - in: query
          name: device
          description: The device to retrieve analytics for.
          schema:
            type: string
            description: The device to retrieve analytics for.
            example: Desktop
        - in: query
          name: browser
          description: The browser to retrieve analytics for.
          schema:
            type: string
            description: The browser to retrieve analytics for.
            example: Chrome
        - in: query
          name: os
          description: The OS to retrieve analytics for.
          schema:
            type: string
            description: The OS to retrieve analytics for.
            example: Windows
        - in: query
          name: referer
          description: The referer to retrieve analytics for.
          schema:
            type: string
            description: The referer to retrieve analytics for.
            example: google.com
        - in: query
          name: url
          description: The URL to retrieve analytics for.
          schema:
            type: string
            description: The URL to retrieve analytics for.
        - in: query
          name: excludeRoot
          description: Whether to exclude the root link from the response.
          schema:
            type: boolean
            description: Whether to exclude the root link from the response.
        - in: query
          name: root
          description: >-
            Filter for root domains. If true, filter for domains only. If false,
            filter for links only. If undefined, return both.
          schema:
            type: boolean
            description: >-
              Filter for root domains. If true, filter for domains only. If
              false, filter for links only. If undefined, return both.
        - in: query
          name: tagId
          description: The tag ID to retrieve analytics for.
          schema:
            type: string
            description: The tag ID to retrieve analytics for.
        - in: query
          name: type
          description: The type of analytics to retrieve.
          schema:
            type: string
            description: The type of analytics to retrieve.
        - in: query
          name: types
          description: The types of analytics to retrieve.
          schema:
            type: string
            description: The types of analytics to retrieve.
      responses:
        '200':
          description: Analytics data
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/AnalyticsCount'
                  - type: array
                    items:
                      $ref: '#/components/schemas/AnalyticsTimeseries'
                    title: AnalyticsTimeseries
                  - type: array
                    items:
                      $ref: '#/components/schemas/AnalyticsContinents'
                    title: AnalyticsContinents
                  - type: array
                    items:
                      $ref: '#/components/schemas/AnalyticsCountries'
                    title: AnalyticsCountries
                  - type: array
                    items:
                      $ref: '#/components/schemas/AnalyticsRegions'
                    title: AnalyticsRegions
                  - type: array
                    items:
                      $ref: '#/components/schemas/AnalyticsCities'
                    title: AnalyticsCities
                  - type: array
                    items:
                      $ref: '#/components/schemas/AnalyticsDevices'
                    title: AnalyticsDevices
                  - type: array
                    items:
                      $ref: '#/components/schemas/AnalyticsBrowsers'
                    title: AnalyticsBrowsers
                  - type: array
                    items:
                      $ref: '#/components/schemas/AnalyticsOS'
                    title: AnalyticsOS
                  - type: array
                    items:
                      $ref: '#/components/schemas/AnalyticsReferers'
                    title: AnalyticsReferers
                  - type: array
                    items:
                      $ref: '#/components/schemas/AnalyticsRefererUrls'
                    title: AnalyticsRefererUrls
                  - type: array
                    items:
                      $ref: '#/components/schemas/AnalyticsTopLinks'
                    title: AnalyticsTopLinks
                  - type: array
                    items:
                      $ref: '#/components/schemas/AnalyticsTopUrls'
                    title: AnalyticsTopUrls
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          $ref: '#/components/responses/409'
        '410':
          $ref: '#/components/responses/410'
        '422':
          $ref: '#/components/responses/422'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      security:
        - token: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Codeqr from '@codeqr/ts';

            const client = new Codeqr({
              apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted
            });

            const analytics = await client.analytics.retrieve();

            console.log(analytics);
components:
  schemas:
    continentCode:
      type: string
      enum:
        - AF
        - AN
        - AS
        - EU
        - NA
        - OC
        - SA
      description: The continent to retrieve analytics for.
    countryCode:
      type: string
      enum:
        - AF
        - AL
        - DZ
        - AS
        - AD
        - AO
        - AI
        - AQ
        - AG
        - AR
        - AM
        - AW
        - AU
        - AT
        - AZ
        - BS
        - BH
        - BD
        - BB
        - BY
        - BE
        - BZ
        - BJ
        - BM
        - BT
        - BO
        - BA
        - BW
        - BV
        - BR
        - IO
        - BN
        - BG
        - BF
        - BI
        - KH
        - CM
        - CA
        - CV
        - KY
        - CF
        - TD
        - CL
        - CN
        - CX
        - CC
        - CO
        - KM
        - CG
        - CD
        - CK
        - CR
        - CI
        - HR
        - CU
        - CY
        - CZ
        - DK
        - DJ
        - DM
        - DO
        - EC
        - EG
        - SV
        - GQ
        - ER
        - EE
        - ET
        - FK
        - FO
        - FJ
        - FI
        - FR
        - GF
        - PF
        - TF
        - GA
        - GM
        - GE
        - DE
        - GH
        - GI
        - GR
        - GL
        - GD
        - GP
        - GU
        - GT
        - GN
        - GW
        - GY
        - HT
        - HM
        - VA
        - HN
        - HK
        - HU
        - IS
        - IN
        - ID
        - IR
        - IQ
        - IE
        - IL
        - IT
        - JM
        - JP
        - JO
        - KZ
        - KE
        - KI
        - KP
        - KR
        - KW
        - KG
        - LA
        - LV
        - LB
        - LS
        - LR
        - LY
        - LI
        - LT
        - LU
        - MO
        - MG
        - MW
        - MY
        - MV
        - ML
        - MT
        - MH
        - MQ
        - MR
        - MU
        - YT
        - MX
        - FM
        - MD
        - MC
        - MN
        - MS
        - MA
        - MZ
        - MM
        - NA
        - NR
        - NP
        - NL
        - NC
        - NZ
        - NI
        - NE
        - NG
        - NU
        - NF
        - MK
        - MP
        - 'NO'
        - OM
        - PK
        - PW
        - PS
        - PA
        - PG
        - PY
        - PE
        - PH
        - PN
        - PL
        - PT
        - PR
        - QA
        - RE
        - RO
        - RU
        - RW
        - SH
        - KN
        - LC
        - PM
        - VC
        - WS
        - SM
        - ST
        - SA
        - SN
        - SC
        - SL
        - SG
        - SK
        - SI
        - SB
        - SO
        - ZA
        - GS
        - ES
        - LK
        - SD
        - SR
        - SJ
        - SZ
        - SE
        - CH
        - SY
        - TW
        - TJ
        - TZ
        - TH
        - TL
        - TG
        - TK
        - TO
        - TT
        - TN
        - TR
        - TM
        - TC
        - TV
        - UG
        - UA
        - AE
        - GB
        - US
        - UM
        - UY
        - UZ
        - VU
        - VE
        - VN
        - VG
        - VI
        - WF
        - EH
        - YE
        - ZM
        - ZW
        - AX
        - BQ
        - CW
        - GG
        - IM
        - JE
        - ME
        - BL
        - MF
        - RS
        - SX
        - SS
        - XK
      description: The country to retrieve analytics for.
    AnalyticsCount:
      type: object
      properties:
        clicks:
          type: number
          description: The total number of clicks
          default: 0
        scans:
          type: number
          description: The total number of scans
          default: 0
        viwes:
          type: number
          description: The total number of views
          default: 0
        leads:
          type: number
          description: The total number of leads
          default: 0
        sales:
          type: number
          description: The total number of sales
          default: 0
        saleAmount:
          type: number
          description: The total amount of sales, in cents
          default: 0
      required:
        - clicks
        - scans
        - viwes
        - leads
        - sales
        - saleAmount
      title: AnalyticsCount
    AnalyticsTimeseries:
      type: object
      properties:
        start:
          type: string
          description: The starting timestamp of the interval
        clicks:
          type: number
          description: The number of clicks in the interval
          default: 0
        scans:
          type: number
          description: The number of scans in the interval
          default: 0
        views:
          type: number
          description: The number of views in the interval
          default: 0
        leads:
          type: number
          description: The number of leads in the interval
          default: 0
        sales:
          type: number
          description: The number of sales in the interval
          default: 0
        saleAmount:
          type: number
          description: The total amount of sales in the interval, in cents
          default: 0
      required:
        - start
        - clicks
        - scans
        - views
        - leads
        - sales
        - saleAmount
    AnalyticsContinents:
      type: object
      properties:
        continent:
          type: string
          enum:
            - AF
            - AN
            - AS
            - EU
            - NA
            - OC
            - SA
          description: >-
            The 2-letter ISO 3166-1 code representing the continent associated
            with the location of the user.
        clicks:
          type: number
          description: The number of clicks from this continent
          default: 0
        leads:
          type: number
          description: The number of leads from this continent
          default: 0
        sales:
          type: number
          description: The number of sales from this continent
          default: 0
        saleAmount:
          type: number
          description: The total amount of sales from this continent, in cents
          default: 0
      required:
        - clicks
        - leads
        - sales
        - saleAmount
    AnalyticsCountries:
      type: object
      properties:
        country:
          type: string
          enum:
            - AF
            - AL
            - DZ
            - AS
            - AD
            - AO
            - AI
            - AQ
            - AG
            - AR
            - AM
            - AW
            - AU
            - AT
            - AZ
            - BS
            - BH
            - BD
            - BB
            - BY
            - BE
            - BZ
            - BJ
            - BM
            - BT
            - BO
            - BA
            - BW
            - BV
            - BR
            - IO
            - BN
            - BG
            - BF
            - BI
            - KH
            - CM
            - CA
            - CV
            - KY
            - CF
            - TD
            - CL
            - CN
            - CX
            - CC
            - CO
            - KM
            - CG
            - CD
            - CK
            - CR
            - CI
            - HR
            - CU
            - CY
            - CZ
            - DK
            - DJ
            - DM
            - DO
            - EC
            - EG
            - SV
            - GQ
            - ER
            - EE
            - ET
            - FK
            - FO
            - FJ
            - FI
            - FR
            - GF
            - PF
            - TF
            - GA
            - GM
            - GE
            - DE
            - GH
            - GI
            - GR
            - GL
            - GD
            - GP
            - GU
            - GT
            - GN
            - GW
            - GY
            - HT
            - HM
            - VA
            - HN
            - HK
            - HU
            - IS
            - IN
            - ID
            - IR
            - IQ
            - IE
            - IL
            - IT
            - JM
            - JP
            - JO
            - KZ
            - KE
            - KI
            - KP
            - KR
            - KW
            - KG
            - LA
            - LV
            - LB
            - LS
            - LR
            - LY
            - LI
            - LT
            - LU
            - MO
            - MG
            - MW
            - MY
            - MV
            - ML
            - MT
            - MH
            - MQ
            - MR
            - MU
            - YT
            - MX
            - FM
            - MD
            - MC
            - MN
            - MS
            - MA
            - MZ
            - MM
            - NA
            - NR
            - NP
            - NL
            - NC
            - NZ
            - NI
            - NE
            - NG
            - NU
            - NF
            - MK
            - MP
            - 'NO'
            - OM
            - PK
            - PW
            - PS
            - PA
            - PG
            - PY
            - PE
            - PH
            - PN
            - PL
            - PT
            - PR
            - QA
            - RE
            - RO
            - RU
            - RW
            - SH
            - KN
            - LC
            - PM
            - VC
            - WS
            - SM
            - ST
            - SA
            - SN
            - SC
            - SL
            - SG
            - SK
            - SI
            - SB
            - SO
            - ZA
            - GS
            - ES
            - LK
            - SD
            - SR
            - SJ
            - SZ
            - SE
            - CH
            - SY
            - TW
            - TJ
            - TZ
            - TH
            - TL
            - TG
            - TK
            - TO
            - TT
            - TN
            - TR
            - TM
            - TC
            - TV
            - UG
            - UA
            - AE
            - GB
            - US
            - UM
            - UY
            - UZ
            - VU
            - VE
            - VN
            - VG
            - VI
            - WF
            - EH
            - YE
            - ZM
            - ZW
            - AX
            - BQ
            - CW
            - GG
            - IM
            - JE
            - ME
            - BL
            - MF
            - RS
            - SX
            - SS
            - XK
          description: >-
            The 2-letter ISO 3166-1 country code for the country associated with
            the location of the user. Learn more: https://codeqr.io/geo
        city:
          type: string
          enum:
            - '*'
          default: '*'
        clicks:
          type: number
          description: The number of clicks from this country
          default: 0
        leads:
          type: number
          description: The number of leads from this country
          default: 0
        sales:
          type: number
          description: The number of sales from this country
          default: 0
        saleAmount:
          type: number
          description: The total amount of sales from this country, in cents
          default: 0
      required:
        - country
        - city
        - clicks
        - leads
        - sales
        - saleAmount
    AnalyticsRegions:
      type: object
      properties:
        country:
          type: string
          enum:
            - AF
            - AL
            - DZ
            - AS
            - AD
            - AO
            - AI
            - AQ
            - AG
            - AR
            - AM
            - AW
            - AU
            - AT
            - AZ
            - BS
            - BH
            - BD
            - BB
            - BY
            - BE
            - BZ
            - BJ
            - BM
            - BT
            - BO
            - BA
            - BW
            - BV
            - BR
            - IO
            - BN
            - BG
            - BF
            - BI
            - KH
            - CM
            - CA
            - CV
            - KY
            - CF
            - TD
            - CL
            - CN
            - CX
            - CC
            - CO
            - KM
            - CG
            - CD
            - CK
            - CR
            - CI
            - HR
            - CU
            - CY
            - CZ
            - DK
            - DJ
            - DM
            - DO
            - EC
            - EG
            - SV
            - GQ
            - ER
            - EE
            - ET
            - FK
            - FO
            - FJ
            - FI
            - FR
            - GF
            - PF
            - TF
            - GA
            - GM
            - GE
            - DE
            - GH
            - GI
            - GR
            - GL
            - GD
            - GP
            - GU
            - GT
            - GN
            - GW
            - GY
            - HT
            - HM
            - VA
            - HN
            - HK
            - HU
            - IS
            - IN
            - ID
            - IR
            - IQ
            - IE
            - IL
            - IT
            - JM
            - JP
            - JO
            - KZ
            - KE
            - KI
            - KP
            - KR
            - KW
            - KG
            - LA
            - LV
            - LB
            - LS
            - LR
            - LY
            - LI
            - LT
            - LU
            - MO
            - MG
            - MW
            - MY
            - MV
            - ML
            - MT
            - MH
            - MQ
            - MR
            - MU
            - YT
            - MX
            - FM
            - MD
            - MC
            - MN
            - MS
            - MA
            - MZ
            - MM
            - NA
            - NR
            - NP
            - NL
            - NC
            - NZ
            - NI
            - NE
            - NG
            - NU
            - NF
            - MK
            - MP
            - 'NO'
            - OM
            - PK
            - PW
            - PS
            - PA
            - PG
            - PY
            - PE
            - PH
            - PN
            - PL
            - PT
            - PR
            - QA
            - RE
            - RO
            - RU
            - RW
            - SH
            - KN
            - LC
            - PM
            - VC
            - WS
            - SM
            - ST
            - SA
            - SN
            - SC
            - SL
            - SG
            - SK
            - SI
            - SB
            - SO
            - ZA
            - GS
            - ES
            - LK
            - SD
            - SR
            - SJ
            - SZ
            - SE
            - CH
            - SY
            - TW
            - TJ
            - TZ
            - TH
            - TL
            - TG
            - TK
            - TO
            - TT
            - TN
            - TR
            - TM
            - TC
            - TV
            - UG
            - UA
            - AE
            - GB
            - US
            - UM
            - UY
            - UZ
            - VU
            - VE
            - VN
            - VG
            - VI
            - WF
            - EH
            - YE
            - ZM
            - ZW
            - AX
            - BQ
            - CW
            - GG
            - IM
            - JE
            - ME
            - BL
            - MF
            - RS
            - SX
            - SS
            - XK
          description: 'The 2-letter country code of the region: https://d.to/geo'
        region:
          type: string
          description: >-
            The 2-letter ISO 3166-2 region code representing the region
            associated with the location of the user.
        city:
          type: string
          enum:
            - '*'
          default: '*'
        clicks:
          type: number
          description: The number of clicks from this region
          default: 0
        leads:
          type: number
          description: The number of leads from this region
          default: 0
        sales:
          type: number
          description: The number of sales from this region
          default: 0
        saleAmount:
          type: number
          description: The total amount of sales from this region, in cents
          default: 0
      required:
        - country
        - region
        - city
        - clicks
        - leads
        - sales
        - saleAmount
    AnalyticsCities:
      type: object
      properties:
        city:
          type: string
          description: The name of the city
        country:
          type: string
          enum:
            - AF
            - AL
            - DZ
            - AS
            - AD
            - AO
            - AI
            - AQ
            - AG
            - AR
            - AM
            - AW
            - AU
            - AT
            - AZ
            - BS
            - BH
            - BD
            - BB
            - BY
            - BE
            - BZ
            - BJ
            - BM
            - BT
            - BO
            - BA
            - BW
            - BV
            - BR
            - IO
            - BN
            - BG
            - BF
            - BI
            - KH
            - CM
            - CA
            - CV
            - KY
            - CF
            - TD
            - CL
            - CN
            - CX
            - CC
            - CO
            - KM
            - CG
            - CD
            - CK
            - CR
            - CI
            - HR
            - CU
            - CY
            - CZ
            - DK
            - DJ
            - DM
            - DO
            - EC
            - EG
            - SV
            - GQ
            - ER
            - EE
            - ET
            - FK
            - FO
            - FJ
            - FI
            - FR
            - GF
            - PF
            - TF
            - GA
            - GM
            - GE
            - DE
            - GH
            - GI
            - GR
            - GL
            - GD
            - GP
            - GU
            - GT
            - GN
            - GW
            - GY
            - HT
            - HM
            - VA
            - HN
            - HK
            - HU
            - IS
            - IN
            - ID
            - IR
            - IQ
            - IE
            - IL
            - IT
            - JM
            - JP
            - JO
            - KZ
            - KE
            - KI
            - KP
            - KR
            - KW
            - KG
            - LA
            - LV
            - LB
            - LS
            - LR
            - LY
            - LI
            - LT
            - LU
            - MO
            - MG
            - MW
            - MY
            - MV
            - ML
            - MT
            - MH
            - MQ
            - MR
            - MU
            - YT
            - MX
            - FM
            - MD
            - MC
            - MN
            - MS
            - MA
            - MZ
            - MM
            - NA
            - NR
            - NP
            - NL
            - NC
            - NZ
            - NI
            - NE
            - NG
            - NU
            - NF
            - MK
            - MP
            - 'NO'
            - OM
            - PK
            - PW
            - PS
            - PA
            - PG
            - PY
            - PE
            - PH
            - PN
            - PL
            - PT
            - PR
            - QA
            - RE
            - RO
            - RU
            - RW
            - SH
            - KN
            - LC
            - PM
            - VC
            - WS
            - SM
            - ST
            - SA
            - SN
            - SC
            - SL
            - SG
            - SK
            - SI
            - SB
            - SO
            - ZA
            - GS
            - ES
            - LK
            - SD
            - SR
            - SJ
            - SZ
            - SE
            - CH
            - SY
            - TW
            - TJ
            - TZ
            - TH
            - TL
            - TG
            - TK
            - TO
            - TT
            - TN
            - TR
            - TM
            - TC
            - TV
            - UG
            - UA
            - AE
            - GB
            - US
            - UM
            - UY
            - UZ
            - VU
            - VE
            - VN
            - VG
            - VI
            - WF
            - EH
            - YE
            - ZM
            - ZW
            - AX
            - BQ
            - CW
            - GG
            - IM
            - JE
            - ME
            - BL
            - MF
            - RS
            - SX
            - SS
            - XK
          description: 'The 2-letter country code of the city: https://codeqr.io/geo'
        clicks:
          type: number
          description: The number of clicks from this city
          default: 0
        leads:
          type: number
          description: The number of leads from this city
          default: 0
        sales:
          type: number
          description: The number of sales from this city
          default: 0
        saleAmount:
          type: number
          description: The total amount of sales from this city, in cents
          default: 0
      required:
        - city
        - country
        - clicks
        - leads
        - sales
        - saleAmount
    AnalyticsDevices:
      type: object
      properties:
        device:
          type: string
          description: The name of the device
        clicks:
          type: number
          description: The number of clicks from this device
          default: 0
        leads:
          type: number
          description: The number of leads from this device
          default: 0
        sales:
          type: number
          description: The number of sales from this device
          default: 0
        saleAmount:
          type: number
          description: The total amount of sales from this device, in cents
          default: 0
      required:
        - device
        - clicks
        - leads
        - sales
        - saleAmount
    AnalyticsBrowsers:
      type: object
      properties:
        browser:
          type: string
          description: The name of the browser
        clicks:
          type: number
          description: The number of clicks from this browser
          default: 0
        leads:
          type: number
          description: The number of leads from this browser
          default: 0
        sales:
          type: number
          description: The number of sales from this browser
          default: 0
        saleAmount:
          type: number
          description: The total amount of sales from this browser, in cents
          default: 0
      required:
        - browser
        - clicks
        - leads
        - sales
        - saleAmount
    AnalyticsOS:
      type: object
      properties:
        os:
          type: string
          description: The name of the OS
        clicks:
          type: number
          description: The number of clicks from this OS
          default: 0
        leads:
          type: number
          description: The number of leads from this OS
          default: 0
        sales:
          type: number
          description: The number of sales from this OS
          default: 0
        saleAmount:
          type: number
          description: The total amount of sales from this OS, in cents
          default: 0
      required:
        - os
        - clicks
        - leads
        - sales
        - saleAmount
    AnalyticsReferers:
      type: object
      properties:
        referer:
          type: string
          description: The name of the referer. If unknown, this will be `(direct)`
        clicks:
          type: number
          description: The number of clicks from this referer
          default: 0
        leads:
          type: number
          description: The number of leads from this referer
          default: 0
        sales:
          type: number
          description: The number of sales from this referer
          default: 0
        saleAmount:
          type: number
          description: The total amount of sales from this referer, in cents
          default: 0
      required:
        - referer
        - clicks
        - leads
        - sales
        - saleAmount
    AnalyticsRefererUrls:
      type: object
      properties:
        refererUrl:
          type: string
          description: The full URL of the referer. If unknown, this will be `(direct)`
        clicks:
          type: number
          description: The number of clicks from this referer to this URL
          default: 0
        leads:
          type: number
          description: The number of leads from this referer to this URL
          default: 0
        sales:
          type: number
          description: The number of sales from this referer to this URL
          default: 0
        saleAmount:
          type: number
          description: The total amount of sales from this referer to this URL, in cents
          default: 0
      required:
        - refererUrl
        - clicks
        - leads
        - sales
        - saleAmount
    AnalyticsTopLinks:
      type: object
      properties:
        link:
          type: string
          description: The unique ID of the short link
          deprecated: true
        id:
          type: string
          description: The unique ID of the short link
        domain:
          type: string
          description: The domain of the short link
        key:
          type: string
          description: The key of the short link
        shortLink:
          type: string
          description: The short link URL
        url:
          type: string
          description: The destination URL of the short link
        createdAt:
          type: string
          description: The creation timestamp of the short link
        clicks:
          type: number
          description: The number of clicks from this link
          default: 0
        leads:
          type: number
          description: The number of leads from this link
          default: 0
      required:
        - link
        - id
        - domain
        - key
        - shortLink
        - url
        - createdAt
        - clicks
        - leads
    AnalyticsTopUrls:
      type: object
      properties:
        url:
          type: string
          description: The destination URL
        clicks:
          type: number
          description: The number of clicks from this URL
          default: 0
        leads:
          type: number
          description: The number of leads from this URL
          default: 0
        sales:
          type: number
          description: The number of sales from this URL
          default: 0
        saleAmount:
          type: number
          description: The total amount of sales from this URL, in cents
          default: 0
      required:
        - url
        - clicks
        - leads
        - sales
        - saleAmount
  responses:
    '400':
      description: >-
        The server cannot or will not process the request due to something that
        is perceived to be a client error (e.g., malformed request syntax,
        invalid request message framing, or deceptive request routing).
      content:
        application/json:
          schema:
            x-speakeasy-name-override: BadRequest
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - bad_request
                    description: A short code indicating the error code returned.
                    example: bad_request
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: https://docs.codeqr.io/api-reference/errors#bad-request
                required:
                  - code
                  - message
            required:
              - error
    '401':
      description: >-
        Although the HTTP standard specifies "unauthorized", semantically this
        response means "unauthenticated". That is, the client must authenticate
        itself to get the requested response.
      content:
        application/json:
          schema:
            x-speakeasy-name-override: Unauthorized
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - unauthorized
                    description: A short code indicating the error code returned.
                    example: unauthorized
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: https://docs.codeqr.io/api-reference/errors#unauthorized
                required:
                  - code
                  - message
            required:
              - error
    '403':
      description: >-
        The client does not have access rights to the content; that is, it is
        unauthorized, so the server is refusing to give the requested resource.
        Unlike 401 Unauthorized, the client's identity is known to the server.
      content:
        application/json:
          schema:
            x-speakeasy-name-override: Forbidden
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - forbidden
                    description: A short code indicating the error code returned.
                    example: forbidden
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: https://docs.codeqr.io/api-reference/errors#forbidden
                required:
                  - code
                  - message
            required:
              - error
    '404':
      description: The server cannot find the requested resource.
      content:
        application/json:
          schema:
            x-speakeasy-name-override: NotFound
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - not_found
                    description: A short code indicating the error code returned.
                    example: not_found
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: https://docs.codeqr.io/api-reference/errors#not-found
                required:
                  - code
                  - message
            required:
              - error
    '409':
      description: >-
        This response is sent when a request conflicts with the current state of
        the server.
      content:
        application/json:
          schema:
            x-speakeasy-name-override: Conflict
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - conflict
                    description: A short code indicating the error code returned.
                    example: conflict
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: https://docs.codeqr.io/api-reference/errors#conflict
                required:
                  - code
                  - message
            required:
              - error
    '410':
      description: >-
        This response is sent when the requested content has been permanently
        deleted from server, with no forwarding address.
      content:
        application/json:
          schema:
            x-speakeasy-name-override: InviteExpired
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - invite_expired
                    description: A short code indicating the error code returned.
                    example: invite_expired
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: https://docs.codeqr.io/api-reference/errors#invite-expired
                required:
                  - code
                  - message
            required:
              - error
    '422':
      description: >-
        The request was well-formed but was unable to be followed due to
        semantic errors.
      content:
        application/json:
          schema:
            x-speakeasy-name-override: UnprocessableEntity
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - unprocessable_entity
                    description: A short code indicating the error code returned.
                    example: unprocessable_entity
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: >-
                      https://docs.codeqr.io/api-reference/errors#unprocessable-entity
                required:
                  - code
                  - message
            required:
              - error
    '429':
      description: >-
        The user has sent too many requests in a given amount of time ("rate
        limiting")
      content:
        application/json:
          schema:
            x-speakeasy-name-override: RateLimitExceeded
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - rate_limit_exceeded
                    description: A short code indicating the error code returned.
                    example: rate_limit_exceeded
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: >-
                      https://docs.codeqr.io/api-reference/errors#rate-limit_exceeded
                required:
                  - code
                  - message
            required:
              - error
    '500':
      description: The server has encountered a situation it does not know how to handle.
      content:
        application/json:
          schema:
            x-speakeasy-name-override: InternalServerError
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - internal_server_error
                    description: A short code indicating the error code returned.
                    example: internal_server_error
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: >-
                      https://docs.codeqr.io/api-reference/errors#internal-server_error
                required:
                  - code
                  - message
            required:
              - error
  securitySchemes:
    token:
      type: http
      description: Default authentication mechanism
      scheme: bearer

````