How describe qs param like foo[]=something&foo[]=something2 multivalues

I need build request like

/v5/adv/campaigns?status[]=3&status[]=1&status[]=8&direction_id[]=1&direction_id[]=61

I try do

{
	"url": "/adv/campaigns?{{if(length(parameters.id) == 0; '';'id[]='+ join(parameters.id;'&id[]='}}))}}{{'rate_model[]=' + join(parameters.rate_model;'&rate_model[]=')}}",
	// "url": "/adv/statistics?{{'group_by[]=' + join(parameters.group_by;'&group_by[]=')}}",     // Relative to base URL
	// "method": "GET",
	// "headers": {
	// 	"Authorization": "Bearer {{connection.apiKey}}"
	// },                         // Additional HTTP headers
	// "qs": {
	// 	// "group_by": "{{parameters.group_by}}",
	// 	"day_from": "{{parameters.day_from}}",
	// 	"day_to": "{{parameters.day_to}}",
	// 	"campaign_id[]": "{{parameters.campaign_id}}",
	// 	"product_id[]": "{{parameters.product_id}}"
	// },                              // Query string like ?group_by=hhh&day_from=2024-10-10...

	"qs": {
		"is_archive": "{{parameters.is_acrhive}}",
		"status[]": "{{parameters.status}}"
	},                              // Query string


	// Response handling
	"response": {
		"output": "{{body}}"
	}
}

if you try to collect parameters via join in url then if there are other parameters in qs the second sign ? will be substituted which is not valid. And the description of parameters via the mapping parameter does not produce the desired result.

[
	{
		"name": "id",        // Makes value accesible via "{{parameters.id}}".
		"type": "uinteger",  // Sends the value as unsigned integer.
		"label": "campaign_id",  // Sets the user friendly label visible in the module.
		"required": false     // Sets the parameter as mandatory.
	},
	{
		"name": "status",
		"type": "select",
		"multiple": true,
		"required": false,
		"label": "Status",
		"options":[
			{
				"label": "Draft",
				"value": 1
			},
			{
				"label": "Moderation pending",
				"value": 2
			},
			{
				"label": "Rejected",
				"value": 3
			},
			{
				"label": "Ready",
				"value": 4
			},
			{
				"label": "Test run",
				"value": 5
			},
			{
				"label": "Working",
				"value": 6
			},
			{
				"label": "Paused",
				"value": 7
			},
			{
				"label": "Stopped",
				"value": 8
			},
			{
				"label": "Completed",
				"value": 9
			}
		]
	},
	{
		"name": "direction",
		"type": "select",
		"multiple": true,
		"label": "Direction",
		"required": false,
		"options":[
			{
				"label": "Onclick ad format",
				"value": 1
			},
			{
				"label": "Interstitial ad format",
				"value": 15
			},
			{
				"label": "Push notification ad format",
				"value": 61
			},
			{
				"label": "Native banner ad format",
				"value": 68
			}
		]
	},
	{
		"name": "rate_model",
		"type": "select",
		"multiple": true,
		"required": false,
		"label": "Rate model",
		"options":[
			{
				"label": "Cost per mile",
				"value": "cpm"
			},
			{
				"label": "Smart cost per mile (with auto optimisation)t",
				"value": "scpm"
			},
			{
				"label": "Cost per action",
				"value": "cpa"
			},
			{
				"label": "Cost per click",
				"value": "cpc"
			}
		]
	},
	{
		"name": "is_archive",
		"type": "select",
		"required": false,
		"label": "Is Archive",
		"options":[
			{
				"label": "Not archived",
				"value": 0
			},
			{
				"label": "Archived",
				"value": 1
			}
		]
	}
]

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.