BCL icon

BCL

Consume BCL Payment API

Coupon → List

AI-generated

Overview

This node operation lists coupons from the BCL Payment API. It allows users to retrieve a paginated list of coupons with options to filter by status, search by term, and sort by specific fields such as code, creation date, or update date. This is useful for managing and reviewing available coupons in an e-commerce or payment system.

Use Case Examples

  1. Retrieve a list of all active coupons sorted by creation date in descending order.
  2. Search for coupons containing a specific term in their code or description.
  3. Paginate through coupons with a specified number of items per page.

Properties

Name Meaning
Page Page number for pagination of coupon list results.
Per Page Number of coupon items to retrieve per page, with a maximum of 100.
Search Search term to filter coupons by code or description.
Sort By Field to sort the coupon list by, such as code, created at, or updated at.
Sort Order Order to sort the coupons, either ascending or descending.
Status Filter coupons by their status: all, active, or inactive.

Output

JSON

  • id - Unique identifier of the coupon.
  • code - Coupon code string.
  • description - Description of the coupon.
  • discount_amount - Discount amount applied by the coupon.
  • discount_type - Type of discount, e.g., percentage or fixed.
  • is_active - Boolean indicating if the coupon is active.
  • start_date - Start date and time when the coupon becomes valid.
  • expiry_date - Expiry date and time of the coupon.
  • usage_limit - Maximum usage limit for the coupon.
  • created_at - Timestamp when the coupon was created.
  • updated_at - Timestamp when the coupon was last updated.

Dependencies

  • BCL Payment API with an API token credential

Troubleshooting

  • Authentication failed errors indicate invalid or expired API token; verify and update credentials.
  • Validation errors suggest incorrect or missing parameters; check input values and required fields.
  • Bad request errors mean the request format or parameters are invalid; review API documentation for correct usage.
  • Forbidden errors indicate insufficient permissions; ensure API token has proper access rights.
  • Not found errors mean the requested resource does not exist; verify coupon IDs and parameters.
  • Server errors indicate issues on the BCL server side; retry later or contact support.

Links

Discussion