Skip to content

Get an option for a field

Request

Retrieve an option for a field based by value

Supported field types: MultiOption, Option

Path
fieldIdstringrequired

The API name for the field

Example:my_field
valuestringrequired

The system generated value for the field option

Example:option_1
const fieldId = 'my_field';
const value = 'option_1';
const resp = await fetch(
  `https://api-sandbox.lawvu.com/v2/fields/${fieldId}/options/${value}`,
  {method: 'GET'}
);

const data = await resp.text();
console.log(data);

Responses

OK

Bodyapplication/json
labelstring or nullrequired

The user defined label of the field option

Example:"Option A"
valuestring or nullread-only

The system generated value for the field option

Example:"option_1"
propertiesobject or null

Additional properties based on the type of field option. See examples for more details.

Response
{ "label": "Option 1", "value": "option_1", "properties": null }