Nuvem Solution icon

Nuvem Solution

Interact with Nuvem Solution API

Actions120

Política de Preço → Consultar por ID

AI-generated

Overview

This node integrates with the Nuvem Solution API to perform various operations across multiple resources. Specifically, for the resource Política de Preço (Price Policy) and operation Consultar por ID (Get by ID), it retrieves detailed information about a specific price policy by its unique identifier.

This node is beneficial in scenarios where you need to fetch pricing policies from the Nuvem Solution system to use them in workflows such as pricing validation, reporting, or synchronization with other systems.

Practical example:
You have an automation that processes sales orders and needs to apply the correct price policy based on the customer's profile or product category. Using this node, you can retrieve the exact price policy details by ID to ensure accurate pricing logic downstream.


Properties

Name Meaning
Política de Preço ID The unique identifier of the price policy to retrieve

The property is required and expects a string representing the ID of the price policy.


Output

The node outputs a JSON object containing the details of the requested price policy as returned by the Nuvem Solution API. The structure typically includes all relevant fields describing the price policy, such as identifiers, pricing rules, validity periods, and any associated metadata.

No binary data output is involved in this operation.


Dependencies

  • Requires an API key credential for authenticating with the Nuvem Solution API.
  • The node uses the base URL and authentication tokens obtained from these credentials to make authorized HTTP requests.
  • Proper configuration of the API credentials within n8n is necessary before using this node.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Providing an incorrect or non-existent price policy ID will result in errors or empty responses.
    • Network connectivity issues may prevent successful API calls.
  • Error messages:

    • "Authentication failed: Invalid response from server" indicates problems with the provided API credentials.
    • "The operation "getById" is not supported!" would occur if the operation name is misspelled or unsupported.
    • HTTP errors from the API (e.g., 404 Not Found) usually mean the specified price policy ID does not exist.
  • Resolutions:

    • Verify and update your API credentials in n8n.
    • Double-check the price policy ID input for correctness.
    • Ensure network access to the Nuvem Solution API endpoint.
    • Review API documentation or contact support if unexpected errors persist.

Links and References


Summary of execute() method logic for Resource "polPreco" and Operation "getById":

  • Retrieves the API credentials including base URL and authentication tokens.
  • Authenticates if necessary to obtain a valid access token.
  • Constructs an HTTP GET request to the endpoint /erp/estoque/polpreco/{polPrecoId} where {polPrecoId} is the user-provided price policy ID.
  • Sends the request with proper authorization headers.
  • Returns the JSON response from the API as the node's output.

This approach ensures secure and efficient retrieval of price policy data from the Nuvem Solution platform.

Discussion