REST API for Latepoint icon

REST API for Latepoint

Consume REST API for LatePoint on Tools

Actions40

Overview

This node provides access to the LatePoint REST API, enabling automation and integration with LatePoint's booking and customer management system. Specifically, the Coupons - Get by Code operation retrieves detailed information about a single coupon using its unique alphanumeric code.

Typical use cases include:

  • Validating a coupon code entered by a user during checkout.
  • Fetching coupon details such as discount type, value, validity period, and usage limits for display or processing.
  • Automating workflows that depend on coupon data, e.g., applying discounts or checking coupon status before confirming an order.

Example: You can use this node to fetch a coupon by its code "SUMMER2024" to verify if it is active and retrieve its discount percentage before applying it to a customer's order.

Properties

Name Meaning
Description A text field where you can describe the purpose or context of this API call for AI assistance.
Coupon Code The alphanumeric coupon code to retrieve. This is required and identifies the specific coupon to get.

Output

The output is a JSON object representing the coupon details retrieved from the LatePoint API. It typically includes fields such as:

  • id: Unique identifier of the coupon.
  • code: The coupon code string.
  • name: Name of the coupon.
  • description: Description of the coupon.
  • discount_type: Type of discount (e.g., percent or fixed amount).
  • discount_value: Numeric value of the discount.
  • active_from: Start date when the coupon becomes valid.
  • active_to: End date when the coupon expires.
  • usage_limit: Maximum number of times the coupon can be used.
  • status: Current status of the coupon (e.g., active, inactive, expired).
  • Additional metadata fields if requested.

If the node encounters multiple coupons (not typical for "Get by Code"), it returns an array of coupon objects; otherwise, a single coupon object is returned.

No binary data is output by this operation.

Dependencies

  • Requires configuration of an API key credential for authenticating with the LatePoint REST API.
  • The base URL and API key must be set in the node credentials.
  • Network access to the LatePoint API endpoint is necessary.

Troubleshooting

  • No credentials configured!
    Error thrown if the API key credential is missing or not set up. Ensure you have configured the required API authentication token in n8n credentials.

  • Invalid JSON in body:
    If you modify the request body manually (not typical for "Get by Code"), ensure any JSON input is correctly formatted.

  • Coupon not found or invalid code:
    If the coupon code does not exist or is mistyped, the API may return an error or empty response. Verify the coupon code correctness.

  • Network or authorization errors:
    Check your API key validity and network connectivity to the LatePoint API.

Links and References

Discussion