curl --request POST \
--url https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/select \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"component_ids": [
"component_id"
],
"variant": "variant"
}
'import requests
url = "https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/select"
payload = {
"component_ids": ["component_id"],
"variant": "variant"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({component_ids: ['component_id'], variant: 'variant'})
};
fetch('https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/select', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/select",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'component_ids' => [
'component_id'
],
'variant' => 'variant'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/select"
payload := strings.NewReader("{\n \"component_ids\": [\n \"component_id\"\n ],\n \"variant\": \"variant\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/select")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"component_ids\": [\n \"component_id\"\n ],\n \"variant\": \"variant\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/select")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"component_ids\": [\n \"component_id\"\n ],\n \"variant\": \"variant\"\n}"
response = http.request(request)
puts response.read_body{
"description": "<string>",
"display_name": "<string>",
"name": "<string>",
"priority": "10",
"tags": [
"<string>"
],
"type": "COMPONENT_REFERENCE",
"boundary": {
"type": "ANCESTOR_TYPE",
"ancestor_type": "<string>"
},
"component_type": "<string>",
"lookup_strategy": {
"type": "CAMPAIGN_PATH"
},
"selectable_filters": [
{
"type": "COMPONENT_TYPE",
"component_type": "<string>"
}
],
"source": "INHERITED",
"unmatched_description": "<string>",
"values": {
"default": {},
"en": {}
}
}Select components for a component reference list
Replaces the components selected for the named COMPONENT_REFERENCE_LIST setting with the components in component_ids, and captures them in the setting value. The request carries the complete set to end up selected, so a picker sends what the user chose without working out which components to add and which to remove; an empty list clears the selection. Returns the setting in the same shape as GET and PUT on the setting itself. A component whose lookup captures no key values is still selectable even though selectable-components omits it: the stored component.id is the reference, and the captured values only exist to recover it.
curl --request POST \
--url https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/select \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"component_ids": [
"component_id"
],
"variant": "variant"
}
'import requests
url = "https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/select"
payload = {
"component_ids": ["component_id"],
"variant": "variant"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({component_ids: ['component_id'], variant: 'variant'})
};
fetch('https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/select', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/select",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'component_ids' => [
'component_id'
],
'variant' => 'variant'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/select"
payload := strings.NewReader("{\n \"component_ids\": [\n \"component_id\"\n ],\n \"variant\": \"variant\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/select")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"component_ids\": [\n \"component_id\"\n ],\n \"variant\": \"variant\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/select")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"component_ids\": [\n \"component_id\"\n ],\n \"variant\": \"variant\"\n}"
response = http.request(request)
puts response.read_body{
"description": "<string>",
"display_name": "<string>",
"name": "<string>",
"priority": "10",
"tags": [
"<string>"
],
"type": "COMPONENT_REFERENCE",
"boundary": {
"type": "ANCESTOR_TYPE",
"ancestor_type": "<string>"
},
"component_type": "<string>",
"lookup_strategy": {
"type": "CAMPAIGN_PATH"
},
"selectable_filters": [
{
"type": "COMPONENT_TYPE",
"component_type": "<string>"
}
],
"source": "INHERITED",
"unmatched_description": "<string>",
"values": {
"default": {},
"en": {}
}
}Authorizations
Body
The complete set of components to end up selected. Every id must be eligible for this reference: inside the setting's boundary, carrying the required component types, and not excluded by a selectable filter. Send an empty list to clear the selection.
The complete set of components to end up selected. Every id must be eligible for this reference: inside the setting's boundary, carrying the required component types, and not excluded by a selectable filter. Send an empty list to clear the selection.
The setting value variant the selection is captured in. Defaults to default.
Response
The setting after the selection, in the same shape GET and PUT return.
Stored campaign component component reference variable definition. Fields description and unmatched_description are unevaluated and appear in buildtime-evaluatable form.
The description as configured: a literal value, or an expression (type:string) when defined dynamically. Buildtime expressions use CampaignBuildtimeContext.
"10"
COMPONENT_REFERENCE, COMPONENT_REFERENCE_LIST Boundary that limits where selectable components are resolved from.
- Option 1
- Option 2
Show child attributes
Show child attributes
Component type that can be selected by this variable.
Lookup strategy used to match selectable components.
- Option 1
- Option 2
Show child attributes
Show child attributes
Filters that narrow the components available for selection.
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
INHERITED, LOCAL, PARAMETER Description shown when a saved reference no longer matches a selectable component. Buildtime expressions use CampaignBuildtimeContext.
Open map of setting values keyed by value key. There is no fixed or maximum number of keys. Any string key may be present; each value uses the same shape for this setting's type. The properties listed here are common examples only and are not required.
Show child attributes
Show child attributes
Was this page helpful?
