REST API for Latepoint icon

REST API for Latepoint

Consume REST API for LatePoint on Tools

Actions40

Overview

This node interacts with the LatePoint REST API to retrieve a list of coupons based on specified filters and sorting options. It is designed to fetch multiple coupon records, optionally filtered by criteria such as coupon code, status, discount type, discount value range, validity dates, usage limits, and search terms. The node supports pagination controls to limit the number of results or return all available coupons.

Common scenarios where this node is beneficial include:

  • Retrieving active or expired coupons for reporting or auditing.
  • Fetching coupons with specific discount types or values for marketing analysis.
  • Searching coupons by partial matches in their name or description.
  • Sorting coupons by creation date, discount value, or validity period.
  • Integrating coupon data into workflows that automate promotions or customer notifications.

Practical example:

  • A marketing automation workflow could use this node to get all active percentage-based coupons valid within a certain date range, then send personalized emails to customers about these offers.

Properties

Name Meaning
Filters Collection of optional filters to narrow down the coupons retrieved. Includes:
• Coupon Code (string)
• Status (Active, Inactive, Expired)
• Discount Type (Fixed Amount, Percentage)
• Discount Value Min/Max (number)
• Valid From/Until (date string YYYY-MM-DD)
• Usage Limit Min/Max (number)
• Search (string across coupon fields)
• Sort By (ID, Code, Discount Value, Valid From, Valid Until)
• Sort Order (Ascending, Descending)
• Include Meta (boolean to include metadata in response)
Description Optional text description or prompt to provide context or purpose for the API call. Useful for AI-assisted configurations.
Return All Boolean flag indicating whether to return all matching coupons or limit the number of results.
Limit Maximum number of coupons to return if "Return All" is false. Accepts values from 1 to 100.

Output

The node outputs an array of JSON objects, each representing a coupon record retrieved from the LatePoint API. Each coupon object includes fields such as:

  • Coupon code
  • Status (active, inactive, expired)
  • Discount type and value
  • Validity dates (valid from, valid until)
  • Usage limits
  • Metadata (if requested)

If the node is configured to return all results, it will paginate through the API responses internally and output all matching coupons.

No binary data is produced by this node.

Dependencies

  • Requires connection to the LatePoint REST API.
  • Requires configuration of an API key credential for authentication.
  • The base URL and API key must be set in the node credentials.
  • The node sends requests with Bearer token authorization and expects JSON responses.

Troubleshooting

  • No credentials configured!
    This error occurs if the API key credential is missing or not set up correctly. To resolve, configure the required API key credential in n8n before running the node.

  • Invalid JSON in body:
    When using custom JSON bodies for create or update operations, malformed JSON will cause errors. Ensure JSON syntax is correct.

  • Empty or no results returned:
    Check filter criteria for correctness; overly restrictive filters may yield no coupons. Also verify API connectivity and permissions.

  • API rate limits or network errors:
    If the API returns errors due to rate limiting or connectivity issues, consider adding retry logic or checking network settings.

Links and References

Discussion