Nuvem Solution icon

Nuvem Solution

Interact with Nuvem Solution API

Actions120

Ordem de Serviço → Listar Agendamentos por ID

AI-generated

Overview

This node integrates with the Nuvem Solution API to perform various operations related to service orders and other business resources. Specifically, for the resource "Ordem de Serviço" (Service Order) and operation "Listar Agendamentos por ID" (List Schedules by Service Order ID), it retrieves the list of schedules associated with a given service order ID.

This functionality is useful in scenarios where you need to fetch scheduled appointments or tasks linked to a particular service order, such as managing workshop schedules, tracking service progress, or integrating scheduling data into automated workflows.

Practical example:
You have a service order created for vehicle maintenance and want to automatically retrieve all scheduled appointments related to that order to notify technicians or update calendars.

Properties

Name Meaning
ID da Ordem de Serviço The numeric identifier of the service order for which to list the schedules. This is required.

Output

The node outputs a JSON array containing the schedule details related to the specified service order ID. Each item in the output array represents a schedule entry with its associated data as returned by the Nuvem Solution API.

The exact structure of each schedule object depends on the API response but typically includes information such as appointment dates, times, assigned personnel, status, and other relevant scheduling details.

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to the Nuvem Solution API.
  • Requires credentials including:
    • Base URL of the API
    • Software key
    • Secret
    • User ID
    • User key
  • These credentials must be configured in n8n under the appropriate credential type (an API key credential).
  • The node uses bearer token authentication obtained via an authentication request to the API.

Troubleshooting

  • Authentication failures: If the node throws errors about authentication failure, verify that the software key, secret, user ID, and user key are correctly set and valid.
  • Invalid service order ID: Providing an invalid or non-existent service order ID will likely result in an error or empty results. Confirm the ID before running the node.
  • API connectivity issues: Network problems or incorrect base URL configuration can cause request failures. Ensure the API endpoint is reachable from your n8n instance.
  • Unexpected API responses: If the API changes or returns unexpected data, the node may fail or return incomplete data. Check the API documentation and update credentials or parameters accordingly.

Links and References

  • Nuvem Solution API Documentation (general reference; specific endpoints require access)
  • For detailed API usage, consult your Nuvem Solution account representative or developer resources.

Summary of the execute() logic for "Ordem de Serviço" - "Listar Agendamentos por ID"

  • Retrieves the ordemServicoId parameter (service order ID).
  • Constructs a GET request to the endpoint:
    /erp/oficina/ordensServico/agendamentos/listar/{ordemServicoId}
  • Uses bearer token authorization with a token obtained from the authentication endpoint.
  • Sends the request and returns the JSON response as output.

This operation is part of a larger switch-case structure handling multiple resources and operations, but for the requested resource-operation pair, the above describes the core behavior.

Discussion