Polaris Smarty Functions
The Polaris services are accessible using these Smarty functions.
This article offers a brief overview of the functions available in the Aurora front-end for accessing the Polaris service data and how to use them.
Introduction
The 'read only' services provided by Polaris can all be accessed via the functions detailed in this article (subject to permissions). What this means is that any service currently provided by Polaris for reading data, can be used via these functions as if being accessed directly over an API integration service.
You have access to the entire responses issued by Polaris.
Polaris Request (polaris_request)
You are able to fetch all of the data from all of the readonly/GET services detailed in the Polaris API Reference material using this function, subject to your use of valid access credentials.
For more detail regarding the data returned by this function, please refer to the Polaris API Reference.
Accepted Parameters
Parameter | Value | Default | Description | Required |
---|---|---|---|---|
item | String | "polaris_response" | The name of the Smart Template Variable into which you would like to load the data being requested. | No |
service | String | The Public name of the service you would like to query, e.g. customers or products. | Yes | |
endpoint | String | The endpoint on the service that you would like to access, e.g. customers/dataTypes. | Yes | |
param_x | Variable | You can provide any number of other desires parameters to this function that will then be passed along to the requested Polaris service. For example, param_id="23" or param_firstName="ben". These values will then be passed to the Polaris service for processing. | No |
Data Returned
Field | Values | Description |
---|---|---|
[ item ].x | Array( Polaris response array ) | The data returned by this function is saved to the variable named in the item parameter. For more detail regarding the data returned by this function, please refer to the Polaris API Reference. |
Example template code
{polaris_request service="customers" endpoint="customers" item="customers" param_postcode="AB1 2CD" page="1"}
------
<pre>
{foreach from=$customers item="polaris_data"}
{$polaris_data|@print_r}
{/foreach}
</pre>
------
{polaris_request service="orders" endpoint="orders/23" item="order"}
------
<pre>
{$order|@print_r}
</pre>
------
Updated almost 2 years ago