Actions21
Pedidos → Update Status
AI-generatedOverview
This node interacts with the Tiny ERP API v3 using OAuth2 authentication. Specifically, for the Pedidos resource and the Update Status operation, it updates the status of an existing order by its ID. This is useful in workflows where you need to programmatically change the state of orders based on external triggers or business logic, such as marking an order as shipped after dispatch or cancelling an order due to stock issues.
Practical examples:
- Automatically update an order status to "Shipped" once a shipping provider confirms delivery.
- Change order status to "Cancelled" if payment fails or customer requests cancellation.
- Mark orders as "In Production" when manufacturing starts.
Properties
| Name | Meaning |
|---|---|
| ID | The unique identifier of the order (Pedido) to update. |
| Status | The new status to assign to the order. Options: Approved, Cancelled, Delivered, In Production, Pending, Shipped. |
Output
The node outputs JSON data representing the updated order information returned from the Tiny ERP API after changing its status. Each output item contains a json field with the updated order details.
If multiple items are processed, the output is an array of such JSON objects.
No binary data output is indicated.
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 authenticated user having permission to update order statuses.
Troubleshooting
- Unknown resource error: If the resource name is incorrect or unsupported, the node throws an error indicating an unknown resource.
- Authentication errors: Ensure the OAuth2 credentials are valid and have not expired.
- Invalid ID: Providing a non-existent or malformed order ID will likely cause the API to return an error.
- Invalid status value: Only the predefined status options are accepted; using other values may cause failures.
- API rate limits or connectivity issues: Network problems or API throttling can cause execution failures.
To resolve these:
- Double-check the order ID and status values.
- Verify OAuth2 credentials and refresh tokens if needed.
- Confirm network connectivity and API availability.
Links and References
- Tiny ERP API Documentation (example link, replace with actual)
- n8n OAuth2 Credential Setup