Actions63
- Authentication Actions
- Tenant Management Actions
- Blog Management Actions
- Image Management Actions
- BuilderX AI Integration Actions
- Form Submissions Actions
- Subscription Management Actions
- Subscription Operations Actions
- Product Family Management Actions
- Feature Management Actions
- Invoice Management Actions
- Payment Management Actions
- Payment Method Management Actions
- Coupon Management Actions
- Health Checks Actions
Overview
The "Delete Coupon" operation in the Lectful Central node allows users to delete an unused coupon from the Lectful Central system via its API. This operation is useful for administrators or automated workflows that need to manage coupon lifecycle by removing coupons that are no longer valid or needed, ensuring that only active and relevant coupons remain available.
Practical examples include:
- Automatically cleaning up expired or unused coupons from a marketing campaign.
- Removing mistakenly created coupons before they are used.
- Integrating with other systems to synchronize coupon availability by deleting coupons when certain conditions are met.
Properties
| Name | Meaning |
|---|---|
| Authentication Mode | Choose how to authenticate with the Lectful Central API: - Use Stored Credentials - Manual Configuration (provide base URL and API key manually) |
| Base URL Override | Optional base URL to override the credential setting (used only in Manual Configuration mode). Should not include /api/v1. |
| API Key Override | Optional API key to override the credential setting (used only in Manual Configuration mode). |
| Coupon ID | The unique numeric identifier of the coupon to delete. This property is required. |
Output
The output of this operation is a JSON object representing the API response after attempting to delete the specified coupon. Typically, this will confirm successful deletion or provide error details if the deletion failed.
Example output structure:
{
"message": "Coupon deleted successfully"
}
or, in case of failure:
{
"error": "Coupon cannot be deleted because it has been used"
}
No binary data is output by this operation.
Dependencies
- Requires access to the Lectful Central API.
- Requires either stored credentials configured in n8n or manual entry of the API base URL and API key.
- The API key must have sufficient permissions to delete coupons.
- No additional external dependencies beyond HTTP access to the Lectful Central API.
Troubleshooting
- Missing or invalid credentials: If neither stored credentials nor manual configuration is properly set, the node will throw an error indicating missing or invalid credentials. Ensure credentials are correctly configured or manual parameters are provided.
- Base URL or API key missing in manual mode: When using manual authentication mode, both Base URL Override and API Key Override must be provided; otherwise, an error is thrown.
- Coupon ID not provided: The operation requires a valid coupon ID. Omitting this will cause an error.
- Coupon already used or active: The API may reject deletion if the coupon has been used or is active. The error message from the API will indicate this.
- Network or API errors: Standard HTTP errors such as timeouts, unauthorized access, or server errors can occur. Check network connectivity and API key permissions.
- Invalid API endpoint: Ensure the Base URL does not include
/api/v1as the node appends this automatically.
Links and References
- Lectful Central API Documentation (Assumed link, replace with actual if available)
- n8n documentation on HTTP Request Node for understanding API calls
- Best practices for managing coupons in SaaS platforms (general reference)
This summary covers the static analysis of the "Delete Coupon" operation within the Lectful Central node's execute method, focusing on input properties, expected outputs, dependencies, and common troubleshooting scenarios.