Axelor icon

Axelor

Consume Axelor API

REST & Advances Service → Read a Record

AI-generated

Overview

The "REST & Advances Service" resource with the "Read a Record" operation allows you to retrieve a specific record from an Axelor domain model by its unique ID. This is useful for scenarios where you need to fetch detailed information about a single entity (such as a customer, order, or invoice) from your Axelor ERP system.

Common use cases:

  • Fetching details of a sales order by its ID.
  • Retrieving a customer's full profile for further processing.
  • Looking up a product or inventory item by its unique identifier.

Example:
You have a workflow that processes orders. For each order ID received, this node can fetch the complete order data from Axelor for validation, enrichment, or integration with other systems.

Properties

Name Type Meaning
Domain Models Resource Locator Selects the domain model (e.g., com.axelor.apps.sale.db.SaleOrder) to query.
ID Number The unique identifier of the specific record you want to retrieve from the domain model.

Output

  • The output is a JSON object containing all fields of the requested record from the selected domain model.
  • The structure of the output depends on the chosen domain model and the record's schema in Axelor.
  • Example output:
    {
      "id": 123,
      "name": "Sample Order",
      "status": "Confirmed",
      "customer": {
        "id": 45,
        "name": "Acme Corp"
      },
      ...
    }
    
  • No binary data is returned by this operation.

Dependencies

  • External Service: Requires access to an Axelor instance with REST API enabled.
  • Authentication: Needs valid Axelor API credentials configured in n8n under the credential type axelorApi.

Troubleshooting

Common issues:

  • Invalid Domain Model: If the domain model is incorrect or misspelled, the request will fail. Ensure you select or enter the correct domain model string.
  • Missing or Invalid ID: If the ID does not exist in the selected domain model, you may receive a "Not Found" error or an empty result.
  • Authentication Errors: If credentials are missing or invalid, you'll encounter authentication/authorization errors.
  • Connection Issues: Network problems or incorrect Axelor API URLs can cause connection failures.

Error messages and resolutions:

  • "404 Not Found": The specified ID does not exist in the selected domain model. Double-check the ID value.
  • "401 Unauthorized": Check your Axelor API credentials in n8n.
  • "400 Bad Request": The domain model string may be malformed or required parameters are missing.

Links and References

Discussion