REST API for Latepoint icon

REST API for Latepoint

Consume REST API for LatePoint on Tools

Actions40

Overview

The node provides integration with the LatePoint REST API, specifically enabling operations on various resources such as bookings, customers, agents, services, payments, orders, coupons, and locations. For the Payments - Update operation, it allows updating an existing payment record by specifying its unique identifier and modifying fields like amount, payment method, status, transaction ID, notes, and associated booking or customer IDs.

This node is beneficial in scenarios where you need to programmatically update payment details within a booking management system, for example:

  • Correcting payment amounts after manual adjustments.
  • Changing payment status from pending to completed after confirmation.
  • Adding transaction IDs or notes for audit purposes.
  • Linking payments to different bookings or customers.

Practical example: After receiving confirmation from a payment gateway, you can use this node to update the payment status to "completed" and add the external transaction ID.

Properties

Name Meaning
ID The unique identifier of the payment to update. This is required to specify which payment record will be modified.
Description A text description or prompt to provide context or purpose for the API call (mainly for AI understanding).
Send Body Whether to send a custom JSON body or form data instead of using individual fields. Applicable for create and update operations.
Body Content Type When sending a custom body, choose between JSON or Form Data format.
JSON Body Custom JSON object to send as the request body when Send Body is true and Body Content Type is JSON. Allows full control over the update payload.
Form Data Custom form data parameters to send as the request body when Send Body is true and Body Content Type is form.
Additional Fields Collection of individual fields to update when not sending a custom body. For Payments resource, these include:
- Booking ID The booking ID associated with this payment.
- Customer ID The customer ID related to this payment.
- Amount The payment amount (number with two decimal precision).
- Payment Method The method used for payment. Options: Cash, Credit Card, PayPal, Stripe, Bank Transfer.
- Payment Status The status of the payment. Options: Pending, Completed, Failed, Refunded.
- Transaction ID External transaction ID from the payment processor.
- Notes Additional notes or comments about the payment.

Output

The output is a JSON object representing the updated payment record returned from the LatePoint API. If multiple items are returned (unlikely for update), each item is output separately.

The structure typically includes all payment fields such as:

  • id (payment identifier)
  • booking_id
  • customer_id
  • amount
  • payment_method
  • status
  • transaction_id
  • notes
  • created_date, updated_date (timestamps)
  • Any other metadata provided by the API

No binary data output is involved.

Dependencies

  • Requires an API key credential for authenticating with the LatePoint REST API.
  • The base URL and API key must be configured in the node credentials.
  • The node sends HTTP requests with Bearer token authorization and expects JSON responses.
  • No additional external dependencies beyond the LatePoint API service.

Troubleshooting

  • Missing Credentials Error: If no API key credential is configured, the node throws "No credentials configured!" Ensure the API key is set up correctly.
  • Invalid JSON Body: When using custom JSON body input, invalid JSON syntax will cause errors like "Invalid JSON in body". Validate JSON formatting before running.
  • Invalid ID: Providing an incorrect or non-existent payment ID will result in API errors indicating the resource was not found.
  • Permission Issues: API key must have sufficient permissions to update payments; otherwise, authorization errors may occur.
  • Network/Timeout Errors: Ensure network connectivity to the LatePoint API endpoint and that the base URL is correct.

Links and References

Discussion