Overview
This node manages orders on the Sapo platform, a popular e-commerce system. It supports various operations such as creating, retrieving, updating, deleting, canceling orders, and marking them as paid or fulfilled. The "Cancel" operation specifically allows users to cancel an existing order by providing its Order ID.
Common scenarios for using this node include automating order management workflows, synchronizing order statuses between Sapo and other systems, or bulk processing orders based on business rules. For example, after detecting a payment failure in another system, you could use this node to automatically cancel the corresponding order in Sapo.
Properties
| Name | Meaning |
|---|---|
| Operation | The action to perform on the order. Options: Cancel, Count, Create, Delete, Get, Get Many, Mark Fulfilled, Mark Paid, Update |
| Order ID | The unique numeric identifier of the order to operate on. Required for operations like Cancel, Get, Update, Delete, Mark Paid, Mark Fulfilled |
| Return All | (For "Get Many" operation) Whether to return all matching orders or limit the number of results |
| Limit | (For "Get Many" operation when Return All is false) Maximum number of orders to return |
| Additional Fields | (For "Get Many" operation) Optional filters such as creation date range, status, financial status, and fulfillment status |
| Data | (For Create and Update operations) JSON object containing the order data to send to Sapo |
Output
The node outputs a JSON object representing the result of the performed operation:
- For Cancel operation, the output JSON contains the details of the canceled order as returned by the Sapo API.
- For other operations, the output varies accordingly (e.g., order details for Get, confirmation for Delete).
- If an error occurs and "Continue On Fail" is enabled, the output JSON will contain an
errorfield with the error message.
The node does not output binary data.
Dependencies
- Requires an active connection to the Sapo API via an API key credential configured in n8n.
- Uses the internal Sapo API base class to interact with order endpoints.
- No additional external dependencies beyond the Sapo API and n8n environment.
Troubleshooting
Common issues:
- Invalid or missing Order ID when required will cause errors.
- Network or authentication failures with the Sapo API can prevent successful operations.
- Providing malformed JSON in the Data property for create/update may cause request failures.
Error messages:
- Errors from the Sapo API are propagated and shown in the node's error output.
- If "Continue On Fail" is disabled, the node execution stops on error; enabling it allows workflow continuation with error details in output.
Resolutions:
- Ensure the Order ID is correct and exists in Sapo.
- Verify API credentials and network connectivity.
- Validate JSON input before sending.