Nuvem Solution icon

Nuvem Solution

Interact with Nuvem Solution API

Actions120

Pedido → Criar Item

AI-generated

Overview

The "Criar Item" operation under the "Pedido" (Order) resource allows users to create a new item within an existing order in the Nuvem Solution system. This node operation is useful when you need to add products or services to an already created order, enabling dynamic and incremental order building.

Typical use cases include:

  • Adding additional products to a customer's order after initial creation.
  • Automating order updates by appending items based on external triggers or workflows.
  • Integrating with inventory or sales systems to reflect real-time order modifications.

For example, after creating an order for a customer, you might want to add multiple items one by one as they are selected or confirmed. This operation facilitates that by sending the item details as a JSON payload to the API endpoint responsible for adding items to orders.

Properties

Name Meaning
ID do Pedido The unique numeric identifier of the existing order to which the item will be added.
Request Body A JSON object representing the details of the item to be created within the order.

The "Request Body" property expects a JSON structure describing the item attributes such as product ID, quantity, price, etc., depending on the API's requirements.

Output

The node outputs a JSON array containing the response from the API after attempting to create the order item. The structure typically includes details about the newly created item, confirmation status, or error messages if the operation failed.

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to the Nuvem Solution API.
  • Requires credentials including an API base URL, software key, secret, user ID, and user key for authentication.
  • The node uses bearer token authentication obtained via an internal authentication request before making the item creation call.
  • Proper configuration of these credentials in n8n is necessary for successful API communication.

Troubleshooting

  • Authentication Failures: If the node throws errors related to authentication, verify that the API credentials (software key, secret, user ID, user key) are correct and have not expired.
  • Invalid Order ID: Providing a non-existent or incorrect order ID will result in API errors. Ensure the "ID do Pedido" corresponds to a valid existing order.
  • Malformed JSON in Request Body: The "Request Body" must be valid JSON. Syntax errors or missing required fields can cause the API to reject the request.
  • API Endpoint Errors: Network issues or API downtime may cause failures. Check connectivity and API status.
  • Permission Issues: The authenticated user must have permissions to modify orders and add items.

To resolve errors, review the error message returned by the node, validate input parameters, and confirm API access rights.

Links and References

Discussion