Skip to content

Update a custom field option

Request

Partially updates a custom field option.

Accounting integration fields (Xero, MYOB, QuickBooks, NetSuite, Business Central): only enabled can be changed. The text field cannot be modified.

Non-accounting-integration fields (MANUAL, PUBLIC_API): only text can be changed. The enabled field cannot be modified — delete and recreate options instead.

Security
BearerAuth
Path
client_idintegerrequired

The ID of the business.

Example:123
custom_field_idstring, (uuid)required

The ID of the custom field.

Example:3fa85f64-5717-4562-b3fc-2c963f66afa6
option_idstring, (uuid)required

The ID of the custom field option.

Example:3fa85f64-5717-4562-b3fc-2c963f66afa6
Bodyapplication/jsonrequired
textstring

The new display text. Only permitted for options belonging to non-accounting-integration custom fields.

Example:"Project Beta"
enabledboolean

Enable or disable this option. Only permitted for options belonging to accounting integration custom fields (Xero, MYOB, QuickBooks, NetSuite, Business Central).

Example:false
PATCH
/v1/businesses/{client_id}/custom-fields/{custom_field_id}/options/{option_id}
curl -i -X PATCH \
  https://public.letsweel.com/v1/businesses/123/custom-fields/3fa85f64-5717-4562-b3fc-2c963f66afa6/options/3fa85f64-5717-4562-b3fc-2c963f66afa6 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "text": "Project Beta",
    "enabled": false
  }'

Responses

OK

Bodyapplication/json
idstring, (uuid)

The unique identifier for this option.

Example:"3fa85f64-5717-4562-b3fc-2c963f66afa6"
textstring

The display text of this option.

Example:"Project Alpha"
enabledboolean

Whether this option is available for selection.

Example:true
createdstring, (date-time)

The date and time when this option was created.

Example:"2024-01-15T09:00:00Z"
updatedstring, (date-time)

The date and time when this option was last updated.

Example:"2024-01-15T09:00:00Z"
Response
{ "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "text": "Project Alpha", "enabled": true, "created": "2024-01-15T09:00:00Z", "updated": "2024-01-15T09:00:00Z" }