REST API for Latepoint icon

REST API for Latepoint

Consume REST API for LatePoint on Tools

Actions40

Overview

This node enables creating new coupon records in the LatePoint system via its REST API. It is useful for automating marketing and discount management workflows, such as generating promotional coupons or special offer codes dynamically based on business logic or customer interactions.

Typical use cases include:

  • Creating percentage or fixed amount discount coupons to incentivize customers.
  • Defining coupon validity periods and usage limits.
  • Automating coupon creation as part of a larger booking or order processing workflow.

For example, you could create a 10% off coupon valid for one month with a usage limit of 100 redemptions, then distribute it to customers automatically.

Properties

Name Meaning
Code The alphanumeric code that identifies the coupon (required for update/delete/get operations).
Name The name of the coupon.
Description A description of the coupon's purpose or details.
Discount Type The type of discount applied by the coupon. Options: percent (percentage discount), fixed (fixed amount discount).
Discount Value The numeric value of the discount. For percent type, this is the percentage; for fixed type, this is the fixed amount.
Active From The start date from which the coupon is active, in YYYY-MM-DD format.
Active To The end date until which the coupon is active, in YYYY-MM-DD format.
Usage Limit The maximum number of times the coupon can be used. Zero or empty means unlimited usage.
Send Body Boolean flag indicating whether to send a custom JSON body or form data instead of individual fields when creating or updating.
Body Content Type When Send Body is true, specifies the format of the request body: json or form.
JSON Body When Send Body is true and Body Content Type is json, this JSON object is sent as the request body.
Form Data When Send Body is true and Body Content Type is form, this collection of key-value pairs is sent as form data in the request body.
Description (input) A general description or prompt to help AI understand the context and purpose of the API call (not directly related to coupon fields).

Output

The node outputs the JSON response returned by the LatePoint API after creating the coupon. This typically includes the full coupon object with all its properties such as code, name, discount details, active dates, usage limits, and status.

If multiple coupons are created (bulk operations not shown here), the output would be an array of such objects.

No binary data output is involved.

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 before execution.

Troubleshooting

  • Invalid JSON in body: If using the custom JSON body option, ensure the JSON syntax is correct. Errors parsing JSON will cause the node to fail.
  • Missing credentials: The node throws an error if no API credentials are configured.
  • Invalid or missing required fields: The API may reject requests missing mandatory coupon fields like code or discount_value.
  • API errors: Any HTTP or API-level errors will be surfaced. Check the error message for details such as invalid parameters or authorization issues.
  • Usage limits: Setting a usage limit of zero means unlimited usage; ensure this matches your intended behavior.

Links and References

Discussion