Skip to content

Create a custom field

Request

Creates a new custom field for the given business. The created_by value will be set to PUBLIC_API.

Security
BearerAuth
Path
client_idintegerrequired

The ID of the business.

Example:123
Bodyapplication/jsonrequired
namestringrequired

The display name for the custom field. Must be unique within the business.

Example:"Project Code"
field_typestringrequired

The type of the custom field.

Enum:"LIST""FREE_TEXT"
Example:"LIST"
budget_settingstring

Controls which budgets this custom field is assigned to.

Default:"ALL_CURRENT_AND_NEW"
Enum:"NONE""SOME""ALL_CURRENT_AND_NEW"
Example:"NONE"
POST
/v1/businesses/{client_id}/custom-fields
curl -i -X POST \
  https://public.letsweel.com/v1/businesses/123/custom-fields \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Project Code",
    "field_type": "LIST",
    "budget_setting": "NONE"
  }'

Responses

Created

Bodyapplication/json
idstring, (uuid)

The unique identifier for this custom field.

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

The display name of the custom field.

Example:"Project Code"
field_typestring

The type of the custom field.

Enum:"LIST""FREE_TEXT"
Example:"LIST"
budget_settingstring

Controls which budgets this custom field is assigned to.

Enum:"NONE""SOME""ALL_CURRENT_AND_NEW"
Example:"NONE"
is_manager_onlyboolean

Whether this custom field is visible only to managers. Cannot be changed after creation.

Example:false
created_bystring

The source that created this custom field.

Enum:"MANUAL""PUBLIC_API""XERO""MYOB""QUICKBOOKS""NETSUITE""BUSINESS_CENTRAL"
Example:"PUBLIC_API"
createdstring, (date-time)

The date and time when this custom field was created.

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

The date and time when this custom field was last updated.

Example:"2024-01-15T09:00:00Z"
Response
{ "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "Project Code", "field_type": "LIST", "budget_setting": "NONE", "is_manager_only": false, "created_by": "PUBLIC_API", "created": "2024-01-15T09:00:00Z", "updated": "2024-01-15T09:00:00Z" }