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 Update Rapid Response Unit operation, it allows users to update details of an existing rapid response unit within a company. This can be useful in scenarios where emergency or security teams need to keep their unit information current, such as updating contact numbers, vehicle details, or address information.

Practical examples include:

  • Updating the phone numbers associated with a rapid response unit.
  • Changing the unit's name or code.
  • Adding or modifying vehicle registration numbers and descriptions linked to the unit.
  • Adjusting the physical address of the unit.

Properties

Name Meaning
Company Id The unique identifier of the company to which the rapid response unit belongs.
Id The unique identifier of the rapid response unit to update.
Name The new name for the rapid response unit.
Code A code for the rapid response unit; must contain a maximum of 10 digits.
Additional Fields Optional extra fields that can be updated:
- Phone Numbers One or more phone numbers associated with the unit.
- Address Line The physical address line of the unit.
- Vehicle Details about vehicles assigned to the unit, including registration number and description.

Output

The node outputs JSON data representing the updated rapid response unit object as returned by the Ajax API. This typically includes all the updated fields such as company ID, unit ID, name, code, phone numbers, address, and vehicle details.

If the node supports binary data output, it is not evident from the provided code snippet and properties related to this operation.

Dependencies

  • Requires an API key credential for authenticating with the Ajax API.
  • Depends on the HttpClient class for making HTTP requests to the backend Ajax API.
  • Uses internal state management and operation resolution utilities to handle the request lifecycle.
  • The node expects proper configuration of the Ajax API credentials within n8n.

Troubleshooting

  • Missing or invalid API credentials: Ensure that the API key credential for the Ajax API is correctly configured and has sufficient permissions.
  • Invalid input values: For example, the "Code" property must be numeric and no longer than 10 digits; violating this may cause validation errors.
  • Resource or operation mismatch: Make sure the resource is set to "Rapid Response Unit" and the operation to "Update Rapid Response Unit" when using these properties.
  • Network or API errors: Check network connectivity and verify that the Ajax API endpoint is reachable and operational.
  • Incorrect IDs: Providing an invalid company ID or rapid response unit ID will likely result in errors indicating the resource was not found.

Links and References

Discussion