Lectful Central icon

Lectful Central

Interact with the Lectful Central API for admin operations

Overview

The "Update Plan" operation in the Subscription Management resource allows users to modify an existing subscription plan within the Lectful Central system. This node interacts with the Lectful Central API to update details such as the plan's name, description, associated product family, active status, and display order.

This operation is beneficial when managing subscription offerings dynamically, for example:

  • Updating a plan’s description to reflect new features or changes.
  • Activating or deactivating plans based on business needs.
  • Changing the sort order to prioritize certain plans in user interfaces.
  • Reassigning a plan to a different product family.

Practical example: A SaaS company wants to update the description and activate a previously inactive subscription plan to promote it during a marketing campaign.

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.
Plan ID The unique identifier of the subscription plan to update. (Required)
Plan Name New name for the subscription plan. If not provided, the name remains unchanged.
Plan Description New description for the subscription plan. Optional multiline text.
Product Family ID ID of the product family to which the plan belongs. If greater than zero, updates the association.
Is Active Boolean flag indicating whether the plan is active (true) or inactive (false).
Sort Order Numeric value defining the display order of the plan among others.

Output

The node outputs an array of JSON objects, each representing the API response for the processed input item. For the "Update Plan" operation, the output JSON contains the updated subscription plan data returned by the Lectful Central API after a successful update.

Example structure of the output JSON (simplified):

{
  "id": 123,
  "name": "Updated Plan Name",
  "description": "Updated description",
  "product_family_id": 45,
  "is_active": true,
  "sort_order": 2,
  // ... other plan fields as returned by the API
}

No binary data is produced by this operation.

Dependencies

  • Requires access to the Lectful Central API.
  • Authentication can be done via stored credentials configured in n8n or manual entry of Base URL and API key.
  • The API key must have sufficient permissions to update subscription plans.
  • No additional external dependencies beyond HTTP access to the Lectful Central API.

Troubleshooting

  • Missing or invalid credentials: If using stored credentials, ensure they are correctly configured with valid Base URL and API key. If using manual mode, both Base URL Override and API Key Override must be provided.
  • Plan ID required: The operation requires a valid Plan ID; omitting this will cause an error.
  • Invalid Product Family ID: Providing a non-existent product family ID may result in API errors.
  • API errors: Errors from the Lectful Central API (e.g., permission denied, invalid data) will be returned in the node output or cause execution failure unless "Continue On Fail" is enabled.
  • JSON parsing issues: Not applicable here since inputs are simple types, but always ensure numeric IDs and booleans are correctly set.

Links and References


If you need further details about other operations or resources, feel free to ask!

Discussion