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

# Consultar estatísticas de vendas



## OpenAPI

````yaml get /stats
openapi: 3.1.0
info:
  version: 1.0.0
  title: API Kiwify
  description: ''
servers:
  - url: https://public-api.kiwify.com/v1/
    description: base
security: []
tags:
  - name: Autenticação
  - name: Conta
  - name: Produtos
  - name: Vendas
  - name: Financeiro
  - name: Affiliados
  - name: Webhooks
  - name: Eventos
paths:
  /stats:
    get:
      tags:
        - Vendas
      parameters:
        - $ref: '#/components/parameters/SaleProductId'
        - name: start_date
          in: query
          schema:
            type: string
        - name: end_date
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Statistics data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Stats'
              examples:
                Stats:
                  summary: Stats example
                  value:
                    credit_card_approval_rate: 50
                    total_sales: 3
                    total_net_amount: 25956
                    refund_rate: 25
                    chargeback_rate: 0
                    total_boleto_generated: 2
                    total_boleto_paid: 1
                    boleto_rate: 50
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthErrorResponse'
              examples:
                InvalidClient:
                  value:
                    error: auth_error
                    message: 'Invalid token: access token is invalid'
          description: Solicitação Inválida
      security:
        - AccountIdHeader: []
          OAuth2:
            - stats
components:
  parameters:
    SaleProductId:
      name: product_id
      in: query
      required: false
      schema:
        type: string
        example: ba385b7c-cac1-4422-925d-7f707d8267d2
  schemas:
    Stats:
      type: object
      properties:
        credit_card_approval_rate:
          type: number
          example: 50
        total_sales:
          type: number
          example: 3
        total_net_amount:
          type: number
          example: 25956
        refund_rate:
          type: number
          example: 25
        chargeback_rate:
          type: number
          example: 0
        total_boleto_generated:
          type: number
          example: 2
        total_boleto_paid:
          type: number
          example: 1
        boleto_rate:
          type: number
          example: 50
    OAuthErrorResponse:
      type: object
      properties:
        error:
          type: string
          example: auth_error
        message:
          type: string
          example: 'Invalid client: client is invalid'
  securitySchemes:
    AccountIdHeader:
      type: apiKey
      in: header
      name: x-kiwify-account-id
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: /oauth/token
          scopes:
            stats: stats
            products: products
            events: events
            sales: sales
            sales_refund: sales_refund
            financial: financial
            affiliates: affiliates
            webhooks: webhooks

````