forked from lytics/pathforajs-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustom-form.sh
45 lines (43 loc) · 1.27 KB
/
custom-form.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Create the base experience in Lytics Experience UI.
# Generate a new token, or paste an existing one below.
# https://learn.lytics.com/understanding/product-docs/account-management/managing-api-tokens
export LIOKEY={api_token_here}
# Paste the experience ID below and run the command to apply the overrides
curl -s -H "Authorization: $LIOKEY" \
-H "Content-Type: text/json" \
-XPATCH "http://api.lytics.io/api/experience/{experience_id}" -d '{
"experience": {
"vehicle": {
"detail_override": {
"formElements": [
{
"type": "text",
"required": true,
"label": "Email Address",
"name": "email"
},
{
"type": "checkbox-group",
"required": true,
"label": "Which feeds would you like to subscribe to?",
"name": "subscription_feeds",
"values": [
{
"label": "Beauty & Perfumes",
"value": "beauty"
},
{
"label": "Electronics",
"value": "electronics"
},
{
"label": "Fashion",
"value": "fashion"
}
]
}
]
}
}
}
}' | jq '.'