Lehjah variables are placeholders that can be used within URLs, headers, queries, or parameters when setting up data connectors.

These variables allow dynamic data to be passed between your platform and Lehjah, enabling flexible and accurate data retrieval. All variables should be wrapped with double curly brackets, like {{variableName}}.

variables mock

Key Variables

{{businessId}}

The {{businessId}} variable represents the unique ID of a business on your platform. It is crucial that this ID corresponds to the business entity, not a user, as multiple users may have access to the same business.

  • Use Case: This variable can be used to filter data specifically for a business, ensuring that only relevant data is pulled.

{{sessionToken}}

The {{sessionToken}} variable holds the current session token of the user on your platform. This token is essential for authenticating requests and can be passed either in the header or as a query parameter. Additionally, the sessionToken should be provided as a parameter to the embedded widget.

  • Use Case: This variable is commonly used to authenticate API requests, ensuring secure communication between your platform and Lehjah.

{{fromDate}} and {{toDate}}

These variables are used for filtering data by date range. The {{fromDate}} represents the start date, and the {{toDate}} represents the end date.

  • Use Case: Use these variables to pull data for a specific time period, such as transactions or reports within a given date range.

{{pageLimit}} and {{pageNumber}}

These variables are used for pagination purposes. The {{pageLimit}} defines the maximum number of records per page, and {{pageNumber}} specifies the page number being requested.

  • Use Case: These variables are crucial when dealing with large datasets, allowing you to manage and navigate data efficiently through pagination.

Using Variables

When configuring data connectors or embedding widgets, ensure that the variables are correctly wrapped in double curly brackets. For example:

  • URL: https://api.yourplatform.com/businesses/{{businessId}}/transactions
  • Header: Authorization: Bearer {{sessionToken}}
  • Query Parameter: ?from={{fromDate}}&to={{toDate}}&limit={{pageLimit}}&page={{pageNumber}}

Summary

Leverage these variables to dynamically adjust requests and responses between your platform and Lehjah. Properly using variables ensures seamless data integration and enhances the flexibility of your platform’s interaction with Lehjah.