Lectful Central icon

Lectful Central

Interact with the Lectful Central API for admin operations

Overview

The "Cancel Coupon" operation in the Lectful Central node allows users to cancel an active coupon by its ID. This action prevents any future use of the specified coupon, effectively deactivating it within the system.

This operation is useful in scenarios where a coupon needs to be invalidated before its natural expiration or usage limit is reached, such as when a promotion ends early or if a coupon was issued in error.

Practical example:
A marketing team issues a discount coupon for a limited-time campaign but decides to end the campaign early. Using this node operation, they can cancel the coupon immediately to prevent customers from applying it after the campaign has ended.

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 (without /api/v1). Used only in Manual Configuration mode.
API Key Override Optional API key to override the credential setting. Used only in Manual Configuration mode.
Coupon ID The unique identifier (number) of the coupon to cancel. This property is required.

Output

The output of the "Cancel Coupon" operation is the JSON response returned by the Lectful Central API after attempting to cancel the coupon. It typically contains details about the cancellation result, such as confirmation of success or relevant status information.

If the API returns an error, the output will contain an error message describing the issue.

No binary data is involved in 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 perform coupon cancellation operations.

Troubleshooting

  • Missing or invalid credentials:
    If neither stored credentials nor manual configuration parameters are provided correctly, the node will throw an error indicating that valid credentials are required.

  • Missing Coupon ID:
    The operation requires a valid coupon ID. Omitting this parameter or providing an invalid ID will cause the API request to fail.

  • API errors:
    Errors returned by the Lectful Central API (e.g., coupon not found, coupon already canceled) will be surfaced in the node's output. Review the error message for details.

  • Manual Configuration mode errors:
    When using manual mode, ensure both the Base URL Override and API Key Override are provided; otherwise, the node will throw an error.

Links and References

Discussion