Kiwify

Consumir API Kiwify

Actions3

Overview

This node integrates with the Kiwify API to list sales data filtered by various criteria. It is useful for automating the retrieval of sales records within a specified date range, optionally filtered by status, payment method, product ID, or affiliate ID. The node can also return detailed information about each sale if desired.

Practical examples include:

  • Generating daily or weekly sales reports filtered by creation or update dates.
  • Monitoring sales statuses such as approved, paid, or refunded.
  • Extracting sales related to specific products or affiliates for performance analysis.
  • Fetching full sale details for further processing or auditing.

Properties

Name Meaning
Data de Início Start date to filter sales (required).
Data de Fim End date to filter sales (required when start date is provided).
Filtrar por Type of date to filter by: "Data de Criação" (created) or "Data de Atualização" (updated).
Status Filter sales by status. Options: Aprovado, Autorizado, Estornado, Pago, Pendente, Reembolso Pendente, Processando, Reembolsado, Reembolso Solicitado, Recusado, Aguardando Pagamento.
Método de Pagamento Filter sales by payment method. Options: Boleto, Cartão de Crédito, Pix.
ID do Produto Filter sales by product ID (string).
ID do Afiliado Filter sales by affiliate ID (string).
Exibir Detalhes Completos da Venda Boolean flag to indicate whether to return full sale details.
Limite Maximum number of results to return (pagination limit).
Página Page number for pagination.

Output

The node outputs an array of JSON objects representing sales that match the specified filters. Each object contains sales data fields as returned by the Kiwify API. If the option to view full sale details is enabled, the output includes comprehensive information about each sale.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating requests to the Kiwify API.
  • The node makes HTTP GET requests to https://public-api.kiwify.com/v1/sales with appropriate query parameters and headers.
  • Pagination is supported via limit and page parameters.
  • Proper configuration of the API credentials in n8n is necessary for successful execution.

Troubleshooting

  • Common Issues:

    • Missing or invalid API credentials will cause authentication failures.
    • Providing an invalid date range (e.g., end date before start date) may result in empty responses or errors.
    • Requesting pages beyond available data may return empty results.
    • Using unsupported status or payment method values will be ignored or cause no matches.
  • Error Messages:

    • Errors from the API are returned as error messages in the output JSON under an error field.
    • Network or connectivity issues will throw exceptions; ensure internet access and correct endpoint URLs.
    • If the node is set to continue on fail, errors per item are captured and returned without stopping the workflow.

Links and References

Discussion