Square icon

Square

Consume Square API

Overview

This node interacts with the Square API to retrieve multiple booking records based on specified filters and limits. It is useful for scenarios where you need to fetch a list of bookings, such as generating reports, syncing booking data with other systems, or displaying upcoming appointments in an application.

For example, you can use this node to:

  • Retrieve all bookings for a specific customer or location.
  • Get bookings within a certain date range.
  • Limit the number of bookings returned for pagination or performance reasons.

Properties

Name Meaning
Return All Whether to return all matching bookings or only up to a specified limit.
Limit Maximum number of bookings to return (used only if "Return All" is false).
Filters Collection of optional filters to narrow down the bookings:
- Customer ID Filter bookings by a specific customer ID.
- Location ID Filter bookings by a specific location ID.
- Start At Max Filter bookings starting before this date/time.
- Start At Min Filter bookings starting after this date/time.
- Team Member ID Filter bookings by a specific team member ID.

Output

The output is a JSON array where each item represents a booking object retrieved from the Square API. Each booking object contains details such as booking ID, customer information, location, start time, team member assigned, and other booking-specific data.

No binary data is output by this operation.

Dependencies

  • Requires an API key credential for authenticating with the Square API.
  • The node uses the Square API base URL, which switches between sandbox and production environments based on the credential environment setting.
  • No additional external dependencies are required beyond the configured Square API credentials.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication errors.
    • Using filters with incorrect IDs (e.g., non-existent customer or location IDs) may result in empty results.
    • Requesting too many items without enabling "Return All" may truncate results unexpectedly.
  • Error messages:

    • Authentication errors typically indicate invalid or expired API keys; verify and update your credentials.
    • Rate limiting errors from the Square API suggest too many requests in a short period; implement retries or reduce request frequency.
    • Validation errors may occur if filter values are malformed; ensure IDs and dates are correctly formatted.

Links and References

Discussion