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

> Consulte os detalhes de uma venda específica, passando o order_id.



## OpenAPI

````yaml get /sales/{id}
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/{id}:
    get:
      tags:
        - Vendas
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Response description
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SaleDetails'
              examples:
                cliente com CPF:
                  summary: Sale example
                  value:
                    id: fc96cec5-1ff1-49b3-aa22-0e131f353b62
                    reference: iYJwhMP
                    type: product
                    created_at: '2023-10-31T16:34:35.491Z'
                    updated_at: '2023-10-31T16:36:02.005Z'
                    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: credit_card
                    net_amount: 8853
                    currency: USD
                    customer:
                      id: b17dd04e-5acc-41ae-a4b2-cba0d2436406
                      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: Sale example
                  value:
                    id: fc96cec5-1ff1-49b3-aa22-0e131f353b62
                    reference: iYJwhMP
                    type: product
                    created_at: '2023-10-31T16:34:35.491Z'
                    updated_at: '2023-10-31T16:36:02.005Z'
                    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: credit_card
                    net_amount: 8853
                    currency: USD
                    customer:
                      id: b17dd04e-5acc-41ae-a4b2-cba0d2436406
                      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
                    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
        '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:
  schemas:
    SaleDetails:
      type: object
      properties:
        id:
          type: string
          example: 588aa8f4-fb61-4d26-bf61-ad4cd6de42cd
        reference:
          type: string
          example: 9dAQA5a
        type:
          type: string
          example: product
        created_at:
          type: string
          example: '2023-10-31T16:53:05.119Z'
        updated_at:
          type: string
          example: '2023-10-31T16:53:05.119Z'
        product:
          $ref: '#/components/schemas/SaleProduct'
        status:
          type: string
          example: paid
        payment_method:
          type: string
          example: credit_card
        net_amount:
          type: number
          example: 0
        customer:
          $ref: '#/components/schemas/Customer'
        approved_date:
          type: string
          example: '2023-10-31T16:34:35.491Z'
        boleto_url: {}
        card_last_digits:
          type: string
          example: '1115'
        card_rejection_reason: {}
        card_type:
          type: string
          example: mastercard
        installments:
          type: number
          example: 12
        is_one_click:
          type: boolean
          example: true
        parent_order_id: {}
        payment:
          $ref: '#/components/schemas/PaymentDetails'
        refunded_at: {}
        sale_type:
          type: string
          example: producer
        tracking:
          $ref: '#/components/schemas/Tracking'
        two_cards:
          type: boolean
          example: false
        revenue_partners:
          type: array
          revenue_partners:
            $ref: '#/components/schemas/RevenuePartners'
        affiliate_commission:
          $ref: '#/components/schemas/AffiliateCommission'
    OAuthErrorResponse:
      type: object
      properties:
        error:
          type: string
          example: auth_error
        message:
          type: string
          example: 'Invalid client: client is invalid'
    SaleProduct:
      type: object
      properties:
        id:
          type: string
          example: 2e1d37f7-3c68-4712-907f-a14368302e69
        name:
          type: string
          example: Meu Produto
    Customer:
      type: object
      properties:
        id:
          type: string
          example: 3319e377-912c-405c-9d98-34ac241da46b
        name:
          type: string
          example: Meu Cliente
        email:
          type: string
          example: meucliente@mail.com
        cpf:
          type: string
          example: '99999999999'
        mobile:
          type: string
          example: '+5599999999999'
    PaymentDetails:
      type: object
      properties:
        charge_amount:
          type: number
          example: 12048
        fee:
          type: number
          example: 1348
        net_amount:
          type: number
          example: 8652
        product_base_price:
          type: number
          example: 10000
    Tracking:
      type: object
      properties:
        sck: {}
        src: {}
        utm_campaign: {}
        utm_content: {}
        utm_medium: {}
        utm_source: {}
        utm_term: {}
        s1: {}
        s2: {}
        s3: {}
    AffiliateCommission:
      type: object
      properties:
        name:
          type: string
          example: My Affiliate
        document:
          type: string
          example: '123456789'
        email:
          type: string
          example: myaffiliate@email.com
        amount:
          type: number
          example: '2480'
  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

````