v1

latestOpenAPI 3.0.12026-07-24310590875.6 KB
custom-fields

Create a custom field

Create a new custom field.

See Transactions in the Guides section for more information, sample requests, and responses.

post/v3/spend/custom-fields

Headers

apiTokenstring nullable

Access token for Spend & Expense API authentication

Example:{{api_token}}

Request body

namestring required

Custom field name

descriptionstring

Custom field description

multiSelectboolean

Set as true if the custom field can have multiple selected values

allowCustomValuesboolean required

Set as true if the custom field can have custom values

minimumAmountForRequirementnumber

Minimum transaction amount where the custom field is required

requiredboolean required

Set as true if the custom field is required for all budgets. The default value is false.

globalboolean required

Set as true if the custom field applies to all budgets. The default value is false.

valuesstring[]

List of custom field values

selectedBudgetIdsstring[]

List of budgets where the custom field is available. Set the budget ID or UUID values.

requiredBudgetIdsstring[]

List of budgets where the custom field is required. Set the budget ID or UUID values.

Example request

{
  "name": "Team offsite",
  "allowCustomValues": false,
  "global": true,
  "values": [
    "Travel",
    "Food"
  ]
}

Response

Create a custom field response

idstring

BILL-generated ID of the custom field

uuidstring

BILL-generated UUID of the custom field

namestring

Custom field name

descriptionstring

Custom field description

type'CUSTOM_SELECTOR' | 'NOTE'

Custom field type. n* CUSTOM_SELECTOR: Select one value from the list (or multiple values when multiSelect is true)

  • NOTE: Write a per-transaction custom note.

Note: Currently, BILL does not support creating additional custom fields with type set as NOTE.

multiSelectboolean

Set as true if the custom field can have multiple selected values

allowCustomValuesboolean

Set as true if the custom field can have custom values

minimumAmountForRequirementnumber

Minimum transaction amount where the custom field is required

requiredboolean

Set as true if the custom field is required for all budgets. The default value is false.

globalboolean

Set as true if the custom field applies to all budgets. The default value is false.

retiredboolean

Set as true if the custom field is retired

createdTimestring date-time

Created date and time

selectedBudgetIdsstring[]

List of BILL-generated ID values of budgets where the custom field is available

selectedBudgetUuidsstring[]

List of BILL-generated UUID values of budgets where the custom field is available

requiredBudgetIdsstring[]

List of BILL-generated ID values of budgets where the custom field is required

requiredBudgetUuidsstring[]

List of BILL-generated UUID values of budgets where the custom field is required