Update Attribute Option
curl --request PATCH \
--url https://api.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId}/options/{optionId} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"color": "<string>",
"isArchived": true,
"order": 123
}
'import requests
url = "https://api.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId}/options/{optionId}"
payload = {
"name": "<string>",
"color": "<string>",
"isArchived": True,
"order": 123
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', color: '<string>', isArchived: true, order: 123})
};
fetch('https://api.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId}/options/{optionId}', 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.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId}/options/{optionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'color' => '<string>',
'isArchived' => true,
'order' => 123
]),
CURLOPT_HTTPHEADER => [
"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.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId}/options/{optionId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"color\": \"<string>\",\n \"isArchived\": true,\n \"order\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId}/options/{optionId}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"color\": \"<string>\",\n \"isArchived\": true,\n \"order\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId}/options/{optionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"color\": \"<string>\",\n \"isArchived\": true,\n \"order\": 123\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Attribute option updated successfully"
}
{
"status": false,
"message": "No token provided"
}
Attribute Options
Update Attribute Option
This endpoint updates a select/multiselect attribute option.
PATCH
/
api
/
v1
/
attributes
/
{target}
/
{targetId}
/
{attributeId}
/
options
/
{optionId}
Update Attribute Option
curl --request PATCH \
--url https://api.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId}/options/{optionId} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"color": "<string>",
"isArchived": true,
"order": 123
}
'import requests
url = "https://api.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId}/options/{optionId}"
payload = {
"name": "<string>",
"color": "<string>",
"isArchived": True,
"order": 123
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', color: '<string>', isArchived: true, order: 123})
};
fetch('https://api.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId}/options/{optionId}', 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.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId}/options/{optionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'color' => '<string>',
'isArchived' => true,
'order' => 123
]),
CURLOPT_HTTPHEADER => [
"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.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId}/options/{optionId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"color\": \"<string>\",\n \"isArchived\": true,\n \"order\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId}/options/{optionId}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"color\": \"<string>\",\n \"isArchived\": true,\n \"order\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId}/options/{optionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"color\": \"<string>\",\n \"isArchived\": true,\n \"order\": 123\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Attribute option updated successfully"
}
{
"status": false,
"message": "No token provided"
}
Description
This API endpoint allows the update of a select/multiselect attribute option. Select/multiselect attribute options are used to define various choices available for a select/multiselect attribute associated with a collection or list.Path
string
required
Specifies the target type, which can be either “collection” or “list.”
string
required
A unique identifier for the target, either a collection ID or a list ID, depending on the target type.
string
required
The ID of the select/multiselect attribute to which the option belongs.
string
required
The ID of the select/multiselect attribute option to be updated.
Request Body
string
The name of the select/multiselect option.
string
Hex color code representing the color associated with the option.
boolean
Indicates whether the option is archived (true/false).
integer
The order or ranking of the option.
Response
boolean
Indicates the success or failure of the select/multiselect option update. In this case,
true signifies a successful operation.
string
Provides a human-readable message accompanying the response. In this instance,
it confirms the successful update of the attribute select/multiselect option with the message
“Attribute option updated successfully.”
{
"status": true,
"message": "Attribute option updated successfully"
}
{
"status": false,
"message": "No token provided"
}