Nuvem Solution icon

Nuvem Solution

Interact with Nuvem Solution API

Actions120

Pedido → Alterar Pagamento

AI-generated

Overview

The "Alterar Pagamento" operation under the "Pedido" (Order) resource allows users to update payment information for a specific order in the Nuvem Solution system. This node operation sends a PATCH request to the API endpoint responsible for modifying payment details of an existing order.

This functionality is beneficial in scenarios where payment terms, methods, or statuses need to be updated after an order has been created. For example, if a customer changes their payment method or if a payment needs to be marked as completed or adjusted, this operation facilitates those updates programmatically within an n8n workflow.

Practical examples include:

  • Updating the payment status of an order after receiving confirmation from a payment gateway.
  • Modifying payment conditions due to negotiated terms with a customer.
  • Correcting payment data errors without recreating the entire order.

Properties

Name Meaning
ID do Pedido The unique numeric identifier of the order whose payment information will be updated.
Request Body A JSON object containing the payment data fields to update for the specified order.

The "Request Body" property expects a JSON structure that matches the API's expected format for payment updates. Users must provide valid JSON representing the payment details to be changed.

Output

The node outputs a JSON array containing the response from the Nuvem Solution API after attempting to update the payment information. The structure of the output JSON corresponds directly to the API's response for the payment update endpoint, typically including confirmation of the update, updated payment details, or error messages if the update failed.

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to the Nuvem Solution API.
  • Requires credentials providing:
    • Base URL of the API.
    • Software key.
    • Secret.
    • User ID.
    • User key.
  • The node uses these credentials to authenticate and authorize API requests.
  • Proper configuration of these credentials in n8n is necessary before using this node.

Troubleshooting

  • Invalid Order ID: If the provided order ID does not exist or is incorrect, the API may return an error indicating the order was not found. Verify the order ID before running the node.
  • Malformed JSON in Request Body: The "Request Body" must be valid JSON. Syntax errors or invalid structures will cause the request to fail. Use JSON validators to ensure correctness.
  • Authentication Errors: If credentials are missing or invalid, authentication will fail, resulting in errors. Ensure credentials are correctly set up and have sufficient permissions.
  • API Endpoint Changes: If the Nuvem Solution API changes its endpoints or request formats, the node might fail. Keep the node and credentials updated according to the latest API documentation.
  • Network Issues: Connectivity problems can cause timeouts or failures. Check network access to the API base URL.

Common error messages:

  • "Authentication failed: Invalid response from server": Indicates issues with API credentials or connectivity.
  • "Unknown operation: alterarPagamento": Suggests a mismatch between the requested operation and supported operations; verify operation spelling and availability.
  • HTTP 4xx or 5xx errors with descriptive messages from the API should be reviewed and addressed accordingly.

Links and References


Note: This summary is based solely on static analysis of the provided source code and input properties, without runtime execution or external API inspection.

Discussion