> ## 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.

# Listar vendas

> Obtenha uma lista de todas as vendas. O período máximo entre o start_date e o end_date é de 90 dias..



## OpenAPI

````yaml get /sales
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:
  /sales:
    get:
      tags:
        - Vendas
      description: >-
        Obtenha uma lista de todas as vendas. O período máximo entre o
        start_date e o end_date é de 90 dias
      parameters:
        - $ref: '#/components/parameters/SaleStatus'
        - $ref: '#/components/parameters/ViewFullSaleDetails'
        - $ref: '#/components/parameters/SalePaymentMethod'
        - $ref: '#/components/parameters/SaleProductId'
        - $ref: '#/components/parameters/SaleAffiliateId'
        - name: page_size
          in: query
          schema:
            type: string
        - name: page_number
          in: query
          schema:
            type: string
        - name: start_date
          in: query
          required: true
          schema:
            type: string
        - name: end_date
          in: query
          required: true
          schema:
            type: string
        - name: updated_at_start_date
          in: query
          schema:
            type: string
        - name: updated_at_end_date
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Get Sales
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse'
                oneOf: []
              examples:
                disabilitar view_full_sale_details:
                  summary: Sales example
                  value:
                    pagination:
                      count: 10
                      page_number: 1
                      page_size: 10
                    data:
                      - id: 5cbb3832-7b5f-4cf2-b04e-ca6a4289d896
                        reference: 9dAQA5a
                        type: product
                        created_at: '2023-10-31T16:53:05.119Z'
                        updated_at: '2023-10-31T16:57:01.810Z'
                        product:
                          id: aaa86f40-d7ae-11ed-acc6-e1c45591a30e
                          name: my product
                        shipping:
                          id: 255f7ae0-8694-40f9-b905-7507fe6bc58f
                          name: Entrega Grátis
                          price: 0
                        status: paid
                        payment_method: boleto
                        net_amount: 0
                        currency: BRL
                        customer:
                          id: 29eb9963-8f4f-4c03-9897-63bdba0d5eb2
                          name: my customer
                          email: mycustomer@mail.com
                          cpf: '99999999999'
                          mobile: '+5599999999999'
                          instagram: y_instagram
                          country: BR
                          address:
                            street: Rua Danilo
                            number: '407'
                            complement: Apt. 123
                            neighborhood: Jardim dos Jardineiros
                            city: Paulista
                            state: SE
                            zipcode: 46121-175
                habilitar view_full_sale_details:
                  summary: Sales example
                  value:
                    pagination:
                      count: 10
                      page_number: 1
                      page_size: 10
                    data:
                      - id: 5cbb3832-7b5f-4cf2-b04e-ca6a4289d896
                        reference: 9dAQA5a
                        type: product
                        created_at: '2023-10-31T16:53:05.119Z'
                        updated_at: '2023-10-31T16:57:01.810Z'
                        product:
                          id: aaa86f40-d7ae-11ed-acc6-e1c45591a30e
                          name: my product
                        shipping:
                          id: 255f7ae0-8694-40f9-b905-7507fe6bc58f
                          name: Entrega Grátis
                          price: 0
                        status: paid
                        payment_method: boleto
                        net_amount: 0
                        currency: BRL
                        customer:
                          id: 29eb9963-8f4f-4c03-9897-63bdba0d5eb2
                          name: my customer
                          email: mycustomer@mail.com
                          cpf: '99999999999'
                          mobile: '+5599999999999'
                          instagram: y_instagram
                          country: BR
                          address:
                            street: Rua Danilo
                            number: '407'
                            complement: Apt. 123
                            neighborhood: Jardim dos Jardineiros
                            city: Paulista
                            state: SE
                            zipcode: 46121-175
                        approved_date: '2023-10-31T16:34:35.491Z'
                        boleto_url: null
                        card_last_digits: '1115'
                        card_rejection_reason: null
                        card_type: mastercard
                        installments: 12
                        is_one_click: true
                        parent_order_id: null
                        payment:
                          charge_amount: 10388
                          charge_currency: BRL
                          net_amount: 8853
                          product_base_price: 60037
                          product_base_currency: BRL
                          settlement_amount: 8853
                          settlement_currency: USD
                          fee: 984
                          fee_currency: USD
                          sale_tax_rate: 5.6
                          sale_tax_amount: 551
                        refunded_at: null
                        sale_type: producer
                        tracking:
                          sck: null
                          src: null
                          utm_campaign: null
                          utm_content: null
                          utm_medium: null
                          utm_source: null
                          utm_term: null
                          s1: null
                          s2: null
                          s3: null
                        two_cards: false
                        revenue_partners:
                          - account_id: RpL2PsVt7gEN50Q
                            legal_name: My Coproducer
                            document_id: '12345678910'
                            percentage: 50
                            net_amount_split: 4426
                            charge_amount_split: 5000
                        affiliate_commission:
                          name: My affiliate
                          document: '123456789'
                          email: myaffiliate@email.com
                          amount: 2849
                cliente com CNPJ:
                  summary: Sales example
                  value:
                    pagination:
                      count: 10
                      page_number: 1
                      page_size: 10
                    data:
                      - id: 5cbb3832-7b5f-4cf2-b04e-ca6a4289d896
                        reference: 9dAQA5a
                        type: product
                        created_at: '2023-10-31T16:53:05.119Z'
                        updated_at: '2023-10-31T16:57:01.810Z'
                        product:
                          id: aaa86f40-d7ae-11ed-acc6-e1c45591a30e
                          name: my product
                        shipping:
                          id: 255f7ae0-8694-40f9-b905-7507fe6bc58f
                          name: Entrega Grátis
                          price: 0
                        status: paid
                        payment_method: boleto
                        net_amount: 0
                        currency: BRL
                        customer:
                          id: 29eb9963-8f4f-4c03-9897-63bdba0d5eb2
                          name: my customer
                          email: mycustomer@mail.com
                          cnpj: '99999999999999'
                          mobile: '+5599999999999'
                          instagram: y_instagram
                          country: BR
                          address:
                            street: Rua Danilo
                            number: '407'
                            complement: Apt. 123
                            neighborhood: Jardim dos Jardineiros
                            city: Paulista
                            state: SE
                            zipcode: 46121-175
        '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:
            - sales
components:
  parameters:
    SaleStatus:
      name: status
      in: query
      required: false
      schema:
        type: string
        enum:
          - approved
          - authorized
          - chargedback
          - paid
          - pending
          - pending_refund
          - processing
          - refunded
          - refund_requested
          - refused
          - waiting_payment
    ViewFullSaleDetails:
      name: view_full_sale_details
      in: query
      required: false
      schema:
        type: boolean
    SalePaymentMethod:
      name: payment_method
      in: query
      required: false
      schema:
        type: string
        enum:
          - boleto
          - credit_card
          - pix
    SaleProductId:
      name: product_id
      in: query
      required: false
      schema:
        type: string
        example: ba385b7c-cac1-4422-925d-7f707d8267d2
    SaleAffiliateId:
      name: affiliate_id
      in: query
      required: false
      schema:
        type: string
        example: ba385b7c-cac1-4422-925d-7f707d8267d2
  schemas:
    PaginatedResponse:
      type: object
      properties:
        pagination:
          type: object
          properties:
            count:
              type: number
              example: 10
            page_number:
              type: number
              example: 1
            page_size:
              type: number
              example: 10
        data:
          type: array
          example: []
          items: {}
    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

````