Lectful Central icon

Lectful Central

Interact with the Lectful Central API for admin operations

Coupon Management → Update Coupon

AI-generated

Overview

The "Update Coupon" operation in the Lectful Central node allows users to modify existing coupon details within the Lectful Central API. This operation is useful for administrators or marketing teams who need to update coupon metadata such as expiration dates, descriptions, usage limits, or prefill data after a coupon has been created.

Typical scenarios include:

  • Extending the expiration date of a coupon to allow longer usage.
  • Adding or updating a description to clarify coupon terms.
  • Adjusting usage limits or prefill data to control how the coupon can be redeemed.

For example, an e-commerce platform might use this operation to update a seasonal discount coupon's expiry date or add a note about new terms and conditions.

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 identifier of the coupon to update (required).
Expires At New expiration date for the coupon; must be a future date (optional).
Description Optional text description to update the coupon's details.

Output

The node outputs the JSON response from the Lectful Central API after attempting to update the coupon. This typically includes the updated coupon object with its current properties reflecting the changes made.

If the API returns an error, the output JSON will contain an error field with the error message.

No binary data is produced by this operation.

Dependencies

  • Requires access to the Lectful Central API.
  • Authentication via either stored credentials configured in n8n or manual entry of the base URL and API key.
  • Proper permissions on the API key to perform coupon updates.

Troubleshooting

  • Missing or invalid credentials: If neither stored credentials nor manual overrides are properly set, the node will throw an error indicating that valid credentials are required.
  • Invalid Coupon ID: Providing a non-existent or incorrect coupon ID will result in an API error.
  • Invalid date format or past expiration date: The Expires At property must be a valid future date; otherwise, the API may reject the request.
  • Malformed JSON in optional fields: Although not directly applicable here, if extending functionality with JSON fields, ensure proper formatting to avoid errors.
  • API connectivity issues: Network problems or incorrect base URLs will cause request failures.

To resolve these issues:

  • Verify credentials and authentication mode.
  • Confirm the coupon ID exists and is correct.
  • Ensure date formats comply with ISO 8601 and represent future dates.
  • Check network connectivity and API endpoint correctness.

Links and References

Discussion