Skip to main content

Update Multi Dynamic Preferences

This endpoint patches a specific dynamic preference or a set of dynamic preferences; only some preferences are updatable:

  • Section colors:
    • colorback
    • colorprimary
    • colorsecondary
    • font_color
    • font_color_secondary
    • navbarback
  • Section configurations:
    • onboarding_hidden
  • Section logo:
    • logo_dark
    • logo_light
    • navbar_logo
    • navbar_logo_mobile
  • Section text:
    • application_slogan1
    • application_slogan2
  • Section webmaster:
    • meta_robots
    • meta_title_home_not_logged
    • meta_description
info

This operation requires admin role.

HTTP Request

PATCH /api/v2/dynamic_preference/

Parameters

NameInTypeRequiredDescription
preference_namebodypreference_typetrueUpdate the preference_name dynamic preference with the relative value

Example Body Parameters

{
"colorback": "#fdfdfd",
"colorprimary": "#555555",
"colorsecondary": "#B20404",
"font_color": "#333333",
"font_color_secondary": "#666666",
"navbarback": "#ffffff"
}

Example Request

const inputBody = '{
"colorback": "#fdfdfd",
"colorprimary": "#555555",
"colorsecondary": "#B20404",
"font_color": "#333333",
"font_color_secondary": "#666666",
"navbarback": "#ffffff"
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};

fetch('/api/v2/dynamic_preference/',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Responses

StatusMeaningDescriptionSchema
200OKResponse status codeA dictionary of Dynamic Preference

Example responses

{
"colorback": {
"section": "colors",
"name": "colorback",
"value": "#fdfdfd",
"help": "Originally gray.",
"type": "color"
},
"colorprimary": {
"section": "colors",
"name": "colorprimary",
"value": "#555555",
"help": "Originally ottanio.",
"type": "color"
},
"colorsecondary": {
"section": "colors",
"name": "colorsecondary",
"value": "#B20404",
"help": "Originally red.",
"type": "color"
},
"font_color": {
"section": "colors",
"name": "font_color",
"value": "#333333",
"help": "Font color (primary).",
"type": "color"
},
"font_color_secondary": {
"section": "colors",
"name": "font_color_secondary",
"value": "#666666",
"help": "Font color secondary (auto-generated from font_color).",
"type": "color"
},
"navbarback": {
"section": "colors",
"name": "navbarback",
"value": "#ffffff",
"help": "First main bar. Originally ottanio.",
"type": "color"
}
}