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 manage coupons, specifically supporting the update operation for coupons. It allows users to modify existing coupon records by specifying the coupon code and providing updated data fields. This is useful in scenarios where you need to change coupon details such as discount type, value, validity dates, or usage limits without creating a new coupon.

Practical examples include:

  • Updating the discount percentage or fixed amount of an existing coupon.
  • Changing the active date range during which the coupon can be used.
  • Modifying the usage limit or description of a coupon.

Properties

Name Meaning
Coupon Code The alphanumeric code of the coupon to update. This uniquely identifies the coupon record to modify.
Send Body Whether to send a custom JSON body or form data instead of using individual fields.
Body Content Type When sending a custom body, choose between JSON or Form Data format.
JSON Body A JSON object representing the full request body to send when updating the coupon. Allows complete control over the update payload.
Form Data Key-value pairs to send as form data parameters in the request body when updating the coupon.
Additional Fields Individual fields to update on the coupon, such as name, description, discount type, discount value, active from/to dates, and usage limit. These are used if not sending a custom body.
Name The name of the coupon.
Description A textual description of the coupon.
Discount Type The type of discount applied by the coupon. Options: "Percent" (percentage discount) or "Fixed Amount" (fixed monetary discount).
Discount Value The numeric value of the discount, interpreted according to the discount type.
Active From The start date (YYYY-MM-DD) from which the coupon becomes valid.
Active To The end date (YYYY-MM-DD) until which the coupon remains valid.
Usage Limit The maximum number of times the coupon can be used.

Output

The node outputs the JSON response returned by the LatePoint API after updating the coupon. This typically includes the updated coupon object with all its properties reflecting the changes made.

If multiple coupons were updated (not typical for this operation), it would output an array of coupon objects. Otherwise, a single JSON object representing the updated coupon is returned.

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 use.

Troubleshooting

  • Invalid JSON in body: If using the JSON Body option, ensure the JSON syntax is correct. Errors will indicate parsing issues.
  • Missing Coupon Code: The coupon code is required to identify which coupon to update. Omitting it will cause errors.
  • Authentication errors: Ensure the API key credential is correctly configured and has sufficient permissions.
  • API endpoint errors: Verify that the coupon code exists; otherwise, the API may return a not found error.
  • Incorrect field types: For example, discount value should be a number, and dates should follow YYYY-MM-DD format.

Links and References

Discussion