Ajax icon

Ajax

Consume Ajax API (v.0.1.2)

Actions242

Overview

This node, named "Ajax," is designed to interact with the Ajax API (version indicated by the bundled version import). It supports multiple resources and operations, including the "Pro" resource with the "Create New Pro" operation. The node facilitates creating a new professional user ("Pro") in the Ajax system by sending the required data to the backend API.

Common scenarios for this node include:

  • Automating user onboarding workflows by programmatically creating new professional accounts.
  • Integrating Ajax user management into broader automation pipelines.
  • Synchronizing user data from other systems into the Ajax platform.

For example, you could use this node to create a new Pro user by providing their login, password hash, phone number, first name, language preference, agreement version, and preferred phone validation method (CALL or SMS).

Properties

Name Meaning
Login The username/login identifier for the new Pro user.
Password Hash The hashed password string for the new Pro user.
Phone The phone number associated with the new Pro user.
First Name The first name of the new Pro user.
Language The language preference for the new Pro user (e.g., "en", "fr").
Agreement Version Numeric version of the agreement accepted by the new Pro user.
Phone Validation Type Method used to validate the phone number; options are "CALL" or "SMS".

Output

The node outputs JSON data representing the response from the Ajax API after attempting to create the new Pro user. This typically includes details about the created user or error information if the creation failed.

If the node supports binary data output, it would relate to any files or media returned by the API, but based on the provided code and properties, the primary output is JSON structured data.

Dependencies

  • Requires an API key credential for authenticating with the Ajax API.
  • Depends on the @digital-boss/n8n-designpatterns package for resource-operation resolution and execution logic.
  • Uses internal modules for HTTP client communication and state management.
  • The node expects proper configuration of the Ajax API credentials within n8n.

Troubleshooting

  • Authentication errors: Ensure that the API key credential is correctly configured and has sufficient permissions.
  • Validation errors: Missing or invalid input properties (e.g., empty login or improperly formatted phone number) will cause the API to reject the request.
  • Network issues: Connectivity problems between n8n and the Ajax API endpoint can cause timeouts or failures.
  • Incorrect operation/resource selection: Make sure the "resource" is set to "Pro" and the "operation" to "Create New Pro" when using these specific properties.

Common error messages might include:

  • Unauthorized or forbidden access due to invalid credentials.
  • Validation errors indicating which required fields are missing or malformed.
  • API rate limiting or service unavailability messages.

Resolving these usually involves verifying credentials, checking input data correctness, and ensuring network connectivity.

Links and References

Discussion