BCL icon

BCL

Consume BCL Payment API

Overview

This node integrates with the BCL Payment API to manage coupons, forms, and payment links. Specifically for the Coupon - Update Status operation, it allows users to activate or deactivate a coupon by updating its status via the API.

Common scenarios where this node is beneficial include:

  • Enabling or disabling discount coupons dynamically based on marketing campaigns.
  • Temporarily suspending coupons without deleting them.
  • Automating coupon status changes as part of larger workflows (e.g., after certain sales targets or events).

Practical example:

  • A marketing team wants to automatically deactivate a coupon after a promotion ends. Using this node, they can update the coupon's active status to false, preventing further use.

Properties

Name Meaning
Coupon ID The unique numeric identifier of the coupon to update. Required.
Is Active Boolean flag indicating whether the coupon should be active (true) or inactive (false). Required.

Output

The node outputs an array of JSON objects representing the response from the BCL API after updating the coupon status. Each output item corresponds to one input item processed.

The JSON structure typically includes details about the updated coupon status, such as confirmation of activation state and any relevant metadata returned by the API.

No binary data output is produced by this operation.

Dependencies

  • Requires an API token credential for authenticating with the BCL Payment API.
  • The node makes HTTP requests to https://bcl.my/api endpoints.
  • Proper configuration of the API token credential in n8n is necessary for successful execution.

Troubleshooting

Common Issues

  • Authentication failures: Occur if the API token is invalid or expired.
  • Validation errors: May happen if required parameters are missing or incorrectly formatted.
  • Resource not found: If the specified coupon ID does not exist.
  • Permission errors: If the API token lacks rights to modify coupons.

Error Messages and Resolutions

  • "Authentication failed: Invalid or expired API token."
    Check and update the API token credential in n8n.

  • "Validation error: The API could not process your request."
    Verify that all required fields are provided and correctly formatted.

  • "Not found: The requested resource does not exist."
    Confirm the coupon ID is correct and exists in the system.

  • "Forbidden: You do not have permission to access this resource."
    Ensure the API token has sufficient permissions.

If the node is set to continue on fail, errors will be returned in the output JSON with details including error message, status code, timestamp, resource, and operation.

Links and References

Discussion