How to use Path Parameters in Service Suite?
You can construct the URL of the endpoint using javascript string concatenation expressions that can include variables. So for example in the following snippet the variable $clientNumber is used in the path of the URL of a POST call:
var $clientNumber = getLoggedClientNumber(); // or can be read from a CSV file
var $url = $server + “/customer/“+ $clientNumber +”/reports”;
var $payload = { “action“:”listinvoices”,”from”:”10/01/2020” };
var $response = post($url, $payload );
var $list = JSON.parse($response.getDataString());
Last updated: March 21, 2023
If you have any feedback on this topic, please contact us at documentation@appvance.ai