Actions21
Overview
This node integrates with the Square API to manage invoices, among other resources like bookings and customers. Specifically, for the Invoice resource's Delete operation, it allows users to delete an existing invoice by providing its unique ID and version number. This is useful in scenarios where an invoice needs to be removed from the system, such as when an invoice was created in error or is no longer relevant.
Practical example: A business automating their billing process can use this node to programmatically delete outdated or incorrect invoices from their Square account without manual intervention.
Properties
| Name | Meaning |
|---|---|
| Invoice ID | The unique identifier of the invoice to delete. |
| Version | The current version number of the invoice, required to ensure concurrency control. |
(Note: The "Version" property is used internally in the delete request but was not provided in the user properties JSON; it is required based on the code.)
Output
The node outputs a JSON object representing the response from the Square API after attempting to delete the invoice. Typically, this will include confirmation of deletion or any error messages returned by the API.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for authenticating with the Square API.
- The node uses the Square API endpoint, switching between sandbox and production environments based on the configured credentials.
- No additional external dependencies are needed beyond the Square API access.
Troubleshooting
- Missing or invalid Invoice ID: The node requires a valid invoice ID to perform deletion. Ensure the ID is correct and exists in your Square account.
- Version mismatch error: The delete operation requires the current version of the invoice to prevent accidental deletion of updated invoices. If you get a version conflict error, retrieve the latest invoice version before deleting.
- API authentication errors: Verify that the API key credential is correctly set up and has sufficient permissions.
- Network or API errors: Check connectivity and Square API status if requests fail unexpectedly.
- Empty update fields (for update operations): Although not directly related to delete, the code throws errors if update fields are empty; ensure proper input for other operations.
If the node is set to continue on failure, errors will be returned in the output JSON under an error field instead of stopping execution.