Connecting to External Services
Limio Custom Components can access custom APIs.
As of release 102, Limio has introduced a new method for creating simple generic integrations that can be utilised in custom components through our backend. This approach enables access to protected resources and avoids CORS issues. This is useful if you want to check some data against a third-party API such as a checkout field against an external service.
Features
Supports appending specific values to query strings in GET requests
Allows adding parameters to bodies for POST requests
Currently supports query string and body parameters
Configuring an Integration
Navigate to Settings -> Integration and select "Generic"
A configuration modal will open
Configure the following:
Name: Helps in selecting the correct integration for a request (does not affect functionality)
Base URL: Sets the foundation of the endpoint
Key-Value Construct: Defines parameters for query strings and request bodies
Key-Value Construct
The Key-Value Construct is used to define parameters that will be added to the request. There are two types of parameters:
1. Query Parameters
Use the prefix
query.for the keyThese parameters will be added to the URL as query string parameters
Examples:
query.page
1
?page=1
query.sort
asc
?sort=asc
query.filter_by
date
?filter_by=date
Multiple query parameters will be combined:
query.page
1
query.sort
asc
query.filter_by
date
Result in URL: ?page=1&sort=asc&filter_by=date
2. Body Parameters
Use the prefix
body.for the keyThese parameters will be added to the request body for POST requests
Examples:
body.username
john_doe
{ "username": "john_doe" }
body.email
jd@ex.com
{ "email": "jd@ex.com" }
body.age
30
{ "age": 30 }
Multiple body parameters will be combined into a single JSON object:
body.username
john_doe
body.email
jd@ex.com
body.age
30
Result in Request Body:

Using Integrations in a Component
To use these integrations in a component, contact Limio Support to obtain the necessary import for creating a request.
Example Limio App Config
Example Custom Component Usage
Example Request from Limio Backend
The response will be passed directly back to the frontend untouched.
The image below illustrates the flow

Important Notes
The request method to
api/integrations/generic/endpointmust always be POST. Themethodin the body is the method Limio then uses to call the integration endpoint, and it must beGETorPOST.Config parameter handling:
query.-prefixed config values are always appended to the URL as query parameters, for both GET and POST.body.-prefixed config values are only added to the request body whenmethodis POST. They are dropped on a GET.
Any additional parameters you include in the request body alongside
method,nameandpathare only forwarded whenmethodis POST, as Limio sends a request body for POST only. On a GET they are dropped, so anything a GET endpoint needs must be part ofpathor configured as aquery.value.
Last updated
Was this helpful?

