Skip to main content

Dropdown Values APIs

These APIs let you fetch, create/update, and delete dropdown values for fields. Useful for managing options in choice-based fields.


1. Get Dropdown Values​

Fetch all dropdown values for a given field name.

Endpoint:

GET /v1/dropdown/values?field_name={field_name}

Headers:

KeyValueRequiredDescription
AuthorizationBearer <JWT_TOKEN>✅Provide a valid JWT token for authentication

Query Parameters:

ParameterTypeRequiredDescription
field_namestring✅Name of the field (e.g. currency)

Response (200 OK):

{
"status": true,
"data": [
{ "id": "uuid-1", "value": "USD", "color": "#ffcc00" },
{ "id": "uuid-2", "value": "INR", "color": "#00ccff" }
]
}

Example (cURL):

curl --location 'https://prodnode.unizooks.com/v1/dropdown/values?field_name=currency' \
--header 'Authorization: Bearer <JWT_TOKEN>'

2. Create / Update Dropdown Value​

Create a new dropdown value, or update an existing one by providing its id.

Endpoint:

POST /v1/dropdown/values?field_name={field_name}

Headers:

KeyValueRequiredDescription
Content-Typeapplication/json✅Request body format
AuthorizationBearer <JWT_TOKEN>✅Provide a valid JWT token for authentication

Query Parameters:

ParameterTypeRequiredDescription
field_namestring✅Name of the field (e.g. choice_77)

Request Body:

FieldTypeRequiredDescription
idstring❌UUID of dropdown value (send if updating)
valuestring❌Dropdown value text (required if creating)
colorstring❌HEX color code associated with the option

Example (cURL):

curl --location 'http://127.0.0.1:4022/v1/dropdown/values?field_name=choice_77' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <JWT_TOKEN>' \
--data '{
"id": "4e785e7c-7cef-11f0-a8af-bc2411f4d589",
"color": "#cdcdce"
}'

Response (200 OK):

{
"status": true,
"message": "Dropdown value created/updated successfully"
}

3. Delete Dropdown Value​

Delete a dropdown value by its id.

Endpoint:

DELETE /v1/dropdown/dropdown-value/{id}

Headers:

KeyValueRequiredDescription
AuthorizationBearer <JWT_TOKEN>✅Provide a valid JWT token for authentication

Path Parameters:

ParameterTypeRequiredDescription
idstring✅UUID of the dropdown value to be deleted

Example (cURL):

curl --location --request DELETE 'https://nodedata.unizooks.com/v1/dropdown/dropdown-value/67556d63-7c3d-11f0-a8af-bc2411f4d589' \
--header 'Authorization: Bearer <JWT_TOKEN>'

Response (200 OK):

{
"status": true,
"message": "Dropdown value deleted successfully"
}

✅ Use these APIs to manage dropdown options dynamically for choice-based fields.