Lectful icon

Lectful

Interact with the VIPay Lectful API

Overview

This node integrates with the Lectful API to manage enrollments and other educational resources. Specifically, for the Enrollment - Update operation, it allows updating an existing enrollment's approval status. This is useful in scenarios where you need to programmatically approve or disapprove a user's enrollment in a course, learning path, or live event.

Practical examples include:

  • Automatically approving enrollments after payment confirmation.
  • Revoking approval if certain conditions are not met.
  • Synchronizing enrollment statuses from external systems.

Properties

Name Meaning
Authentication Mode Choose how to authenticate with the Lectful 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 exclude /api/v1.
API Key Override Optional API key to override the credential setting (used only in Manual Configuration mode).
Enrollment ID The unique identifier of the enrollment to update (required).
Is Approved Boolean flag indicating whether the enrollment is approved (true) or not (false).

Output

The node outputs the JSON response returned by the Lectful API after updating the enrollment. This typically includes the updated enrollment object with its current properties such as ID, user info, enrollment status, and approval state.

Example output structure (simplified):

{
  "id": "string",
  "userId": "string",
  "enrollableType": "course|learning_path|live_event",
  "enrollableId": "string",
  "isApproved": true,
  "createdAt": "timestamp",
  "updatedAt": "timestamp"
}

No binary data is produced by this operation.

Dependencies

  • Requires access to the Lectful API.
  • Requires either stored credentials configured in n8n or manual entry of the base URL and API key.
  • The API key must have permissions to update enrollments.

Troubleshooting

  • Missing or invalid credentials: If neither stored credentials nor manual overrides are provided correctly, the node will throw an error indicating missing or invalid credentials.
  • Missing Enrollment ID: The Enrollment ID property is required; omitting it will cause the node to fail.
  • API errors: Errors returned by the Lectful API (e.g., unauthorized, not found) will be surfaced in the node's output or error messages.
  • Manual configuration errors: When using manual mode, ensure that the base URL does not include /api/v1 and that the API key is correct.
  • Continue on Fail: If enabled, the node will continue processing subsequent items even if one fails, returning error details in the output.

Links and References


If you need summaries for other operations or resources, feel free to ask!

Discussion