Create Stylesheet Variable
POST {{protocol}}://{{instance_zuid}}.{{instances_api_url}}/{{instances_api_version}}/web/stylesheets/variables
name | description |
---|---|
referenceName | [string] Required. The name of your variable that will be referenced by your stylesheets. Must follow conventional LESS/SASS/SCSS variable naming convention |
name | [string] Required. Friendly name for your variable |
value | [string] Required. The value of your variable represented as a string |
type | [string] Required. The variable type you wish to create. Variable must be one of: text , color , dropdown , font_picker |
category | [number] Required. Should correspond with category ID. |
sort | [number] Optional. Defaults to number of variables + 1. |
description | [string] Optional. Defaults to null string |
options | [object] Optional. Object should contain key:value pairs corresponding to dropdown options. Defaults to null . The key is what is used as the value output using Parsley, while the value is used in the UI. |
Request Body
{"referenceName"=>"another_variable_name", "name"=>"New Variable", "value"=>"myValue", "type"=>"text", "sort"=>1, "description"=>"description goes here", "category"=>1, "options"=>nil}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: Created
{"_meta":{"timestamp":"2023-03-16T00:09:32.343689217+08:00","totalResults":1,"start":0,"offset":0,"limit":1},"data":{"ZUID":"13-dc9a9fdbaa-1234"}}