Actions21
Pedidos → Update
AI-generatedOverview
This node interacts with the Tiny ERP API v3 using OAuth2 authentication. Specifically, for the Pedidos resource and the Update operation, it updates an existing order in the Tiny ERP system by specifying the order ID and any fields to modify. This is useful in scenarios where you need to programmatically adjust order details such as customer association, total value, or add observations after the order has been created.
Practical examples include:
- Updating the total value of an order after applying discounts.
- Changing the customer linked to an order if it was initially assigned incorrectly.
- Adding notes or observations to an order for internal tracking or communication purposes.
Properties
| Name | Meaning |
|---|---|
| ID | The unique identifier of the order to update (required). |
| Additional Fields | Optional fields to update on the order: |
| - Customer ID | The ID of the customer associated with the order. |
| - Total Value | The new total monetary value of the order. |
| - Observation | Any textual observation or note related to the order. |
Output
The node outputs JSON data representing the updated order object returned from the Tiny ERP API. Each item in the output corresponds to one updated order, containing all relevant fields as returned by the API after the update operation.
If multiple input items are processed, the output will be an array of JSON objects, each reflecting the result of updating a single order.
No binary data output is produced by this node.
Dependencies
- Requires an OAuth2 API credential configured in n8n to authenticate with the Tiny ERP API.
- Depends on the Tiny ERP API v3 being accessible and the provided credentials having permission to update orders.
- No additional external dependencies beyond the standard n8n environment and the OAuth2 credential setup.
Troubleshooting
Common issues:
- Invalid or missing order ID: The node requires a valid order ID; ensure the ID exists in Tiny ERP.
- Insufficient permissions: The OAuth2 token must have rights to update orders.
- Network or API errors: Temporary connectivity issues or API downtime can cause failures.
Error messages:
"Unknown resource: pedidos": Indicates the resource name might be misspelled or not supported.- Errors related to invalid parameters typically indicate missing required fields or incorrect data types.
- Authentication errors suggest problems with the OAuth2 credential configuration.
Resolutions:
- Verify the order ID is correct and exists in the Tiny ERP system.
- Check that the OAuth2 credential is properly set up and authorized.
- Review the additional fields for correct data types and valid values.
- Enable "Continue On Fail" option in the node settings to handle partial failures gracefully.
Links and References
- Tiny ERP API Documentation (general reference for API endpoints and data structures)
- n8n OAuth2 Credential Setup (guide on configuring OAuth2 credentials in n8n)