Keitaro icon

Keitaro

Работа с API Keitaro

Overview

This node integrates with the Keitaro API to manage various resources such as campaigns, streams, landings, offers, traffic, users, blacklists, bots, postbacks, sources, conversions, domains, clicks, filters, settings, logs, statistics, and groups. Specifically, for the 'source' resource with the 'create' operation, it allows users to create a new source by sending JSON-formatted source data to the Keitaro API. This is useful for automating the creation of traffic sources in Keitaro, enabling streamlined campaign management and tracking.

Use Case Examples

  1. Creating a new traffic source in Keitaro by providing source details in JSON format, which can then be used in campaigns for traffic tracking and optimization.
  2. Automating the addition of multiple sources to Keitaro from an external system by looping through source data and using this node to create each source.

Properties

Name Meaning
Данные Источника JSON-formatted data representing the source to be created in Keitaro, required for the create operation on the source resource.

Output

JSON

  • request
    • url - The URL of the API request made to Keitaro
    • method - HTTP method used for the API request
    • headers - Headers sent with the API request, with sensitive API key masked
  • resource - The resource type involved in the operation, e.g., 'source'
  • operation - The operation performed, e.g., 'create'
  • success - Indicates if the operation was successful (true for create)
  • data - The data returned from the Keitaro API after creating the source, typically the created source details
  • error - If an error occurred, contains error details including message, stack, resource, operation, request URL, HTTP status, status text, and response data

Dependencies

  • Keitaro API credentials including domain and API key

Troubleshooting

  • Ensure that the API credentials (domain and API key) are correctly set in the node credentials; missing or incorrect credentials will cause authentication errors.
  • The sourceData property must contain valid JSON with all required fields for creating a source; invalid or incomplete JSON will cause API errors.
  • For operations other than 'getAll' on the 'stats' resource, an error is thrown; ensure the correct operation is selected for the resource.
  • If the API returns an error status, the node throws an error with the API status code and message; check the API response for details and correct the request accordingly.
  • When using the 'create' operation, ensure that the sourceData is not empty; otherwise, the node will throw an error indicating missing data for the operation.

Discussion