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 in the code). Specifically, for the Rapid Response Unit resource and the Create Rapid Response Unit operation, it allows users to create a new rapid response unit within a company. This is useful in scenarios where organizations need to programmatically manage emergency or security response teams by adding units with specific details such as name, code, contact numbers, address, and vehicles.

Practical examples include:

  • Automatically creating rapid response units when onboarding new security teams.
  • Integrating with other systems to dynamically update or add units based on operational needs.
  • Managing multiple units across different companies via automation workflows.

Properties

Name Meaning
Company Id The unique identifier of the company to which the rapid response unit belongs.
Name The name of the rapid response unit being created.
Code A code for the unit, limited to a maximum of 10 digits.
Additional Fields Optional extra information including:
- Phone Numbers One or more phone numbers associated with the unit.
- Address Line The physical address line for the unit's location.
- Vehicle Details about one or more vehicles assigned to the unit, each with registration number and description.

Output

The node outputs JSON data representing the newly created rapid response unit. This typically includes all the properties sent during creation along with any additional metadata returned by the Ajax API, such as unique IDs or timestamps confirming successful creation.

If the node supports binary data output, it would generally relate to attachments or media linked to the unit, but this is not evident from the provided code snippet.

Dependencies

  • Requires an active connection to the Ajax API, authenticated via an API key credential configured in n8n.
  • Uses internal helper classes for HTTP communication, state management, and operation resolution/execution.
  • No external environment variables are explicitly required beyond the API authentication credential.

Troubleshooting

  • Authentication errors: Ensure the API key credential is correctly set up and has permissions to create rapid response units.
  • Validation errors: The "Code" property must be numeric and no longer than 10 digits; invalid input will cause the API to reject the request.
  • Missing required fields: "Company Id," "Name," and "Code" are mandatory; omitting them will result in errors.
  • Network issues: Connectivity problems with the Ajax API endpoint can cause timeouts or failures.
  • Unexpected API responses: If the API changes or returns unexpected data, the node might fail; verify API version compatibility.

Links and References


Note: The summary is based solely on static analysis of the provided source code and property definitions without runtime execution or access to dynamic imports.

Discussion