Skip to content

Fields API (1.0.0-beta)

The Fields API allows you to manage fields and field values information. The Fields API is currently in Beta and is available for use. Customers do not need to explicitly opt-in to Beta. However, the API is subject to changes as per the expectations set regarding Beta APIs in the API Launch Stages documentation: https://developer.brex.com/docs/api-launch-stages/.

Download OpenAPI description
Languages
Servers
Production
https://api.brex.com
Staging (Note: This is not a sandbox. It will not work with customer tokens.)
https://api-staging.brex.com

View and manage fields data.

Operations

Request

List custom fields under the same account

Security
OAuth2(Required scopes:
fields.read
fields.write
)
Query
field_id[]Array of strings or null

The Brex identifiers of the field to filter by

Example: field_id[]=extended_field_foobar
cursorstring or null

The cursor to use for pagination. This is the next_cursor value returned from the previous response.

limitinteger or null(int32)

Controls the maximum number of field values returned in the response. It can't be greater than 1000.

curl -i -X GET \
  https://api.brex.com/v1/fields \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

List custom fields response

Bodyapplication/json
next_cursorstring or null
itemsArray of objects(Field)required
items[].​brex_idstringrequired

The internal Brex ID of the field

Example: "extended_field_foobar"
items[].​namestring or nullrequired

The name of the field

items[].​remote_idstring or null

Remote/external ID of custom field from external system (e.g. ERP or HRIS system)

Example: "foo_bar"
items[].​updated_atstring(date-time)required

The last updated timestamp of the field

items[].​is_disabledbooleanrequired

Indicates if the field is disabled

items[].​groupstring or null

The category of the field, indicating its purpose or context. For example, it could belong to accounting-related fields or user-related fields.

Enum"ACCOUNTING""USER""ERP"
Response
application/json
{ "next_cursor": "string", "items": [ {} ] }

Request

Create a custom field

Security
OAuth2(Required scopes:
fields.write
)
Headers
Idempotency-Keystringrequired

Idempotency key for this request.

Bodyapplication/jsonrequired
namestringrequired

The name of the field

groupstringrequired

The category of the field, indicating its purpose or context. For example, it could belong to accounting-related fields or user-related fields.

Enum"ACCOUNTING""USER""ERP"
remote_idstring or null

Remote/external ID of custom field from external system (e.g. ERP or HRIS system)

Example: "foo_bar"
integration_idstring or null

Integration ID to associate this field with a specific integration

Example: "int_123"
is_disabledboolean or null

Indicates if the field is disabled

curl -i -X POST \
  https://api.brex.com/v1/fields \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: string' \
  -d '{
    "name": "string",
    "group": "ACCOUNTING",
    "remote_id": "foo_bar",
    "integration_id": "int_123",
    "is_disabled": true
  }'

Responses

Create custom field response

Bodyapplication/json
brex_idstringrequired

The internal Brex ID of the field

Example: "extended_field_foobar"
namestring or nullrequired

The name of the field

remote_idstring or null

Remote/external ID of custom field from external system (e.g. ERP or HRIS system)

Example: "foo_bar"
updated_atstring(date-time)required

The last updated timestamp of the field

is_disabledbooleanrequired

Indicates if the field is disabled

groupstring or null

The category of the field, indicating its purpose or context. For example, it could belong to accounting-related fields or user-related fields.

Enum"ACCOUNTING""USER""ERP"
Response
application/json
{ "brex_id": "extended_field_foobar", "name": "string", "remote_id": "foo_bar", "updated_at": "2019-08-24T14:15:22Z", "is_disabled": true, "group": "ACCOUNTING" }

Request

Get a custom field by Brex ID

Security
OAuth2(Required scopes:
fields.read
fields.write
)
Path
idstringrequired

The Brex identifier of the field to retrieve

Example: extended_field_foobar
curl -i -X GET \
  https://api.brex.com/v1/fields/extended_field_foobar \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Get custom field response

Bodyapplication/json
brex_idstringrequired

The internal Brex ID of the field

Example: "extended_field_foobar"
namestring or nullrequired

The name of the field

remote_idstring or null

Remote/external ID of custom field from external system (e.g. ERP or HRIS system)

Example: "foo_bar"
updated_atstring(date-time)required

The last updated timestamp of the field

is_disabledbooleanrequired

Indicates if the field is disabled

groupstring or null

The category of the field, indicating its purpose or context. For example, it could belong to accounting-related fields or user-related fields.

Enum"ACCOUNTING""USER""ERP"
Response
application/json
{ "brex_id": "extended_field_foobar", "name": "string", "remote_id": "foo_bar", "updated_at": "2019-08-24T14:15:22Z", "is_disabled": true, "group": "ACCOUNTING" }

Request

Update a field by ID

Security
OAuth2(Required scopes:
fields.write
)
Path
idstringrequired

The Brex identifier of the field to update

Example: extended_field_foobar
Bodyapplication/jsonrequired
namestring or null

The name of the field

is_disabledboolean or null

Indicates if the field is disabled

curl -i -X PUT \
  https://api.brex.com/v1/fields/extended_field_foobar \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "is_disabled": true
  }'

Responses

Update custom field response

Bodyapplication/json
brex_idstringrequired

The internal Brex ID of the field

Example: "extended_field_foobar"
namestring or nullrequired

The name of the field

remote_idstring or null

Remote/external ID of custom field from external system (e.g. ERP or HRIS system)

Example: "foo_bar"
updated_atstring(date-time)required

The last updated timestamp of the field

is_disabledbooleanrequired

Indicates if the field is disabled

groupstring or null

The category of the field, indicating its purpose or context. For example, it could belong to accounting-related fields or user-related fields.

Enum"ACCOUNTING""USER""ERP"
Response
application/json
{ "brex_id": "extended_field_foobar", "name": "string", "remote_id": "foo_bar", "updated_at": "2019-08-24T14:15:22Z", "is_disabled": true, "group": "ACCOUNTING" }

Request

Delete a custom field by Brex ID

Security
OAuth2(Required scopes:
fields.write
)
Path
idstringrequired

The Brex identifier of the field to delete

Example: extended_field_foobar
curl -i -X DELETE \
  https://api.brex.com/v1/fields/extended_field_foobar \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Delete custom field response

Operations