Skip to content

FieldsPaths

Defined in: src/fields/types.gen.ts:2

/v1/fields: object

Defined in: src/fields/types.gen.ts:3

optional delete?: undefined

get: object

List custom fields

List custom fields under the same account

parameters: object

optional cookie?: undefined

optional header?: undefined

optional path?: undefined

optional query?: object

optional cursor?: string | null

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

optional field_id[]?: string[] | null

The Brex identifiers of the field to filter by

extended_field_foobar

optional limit?: number | null

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

optional requestBody?: undefined

responses: object

200: object

List custom fields response

content: object

get.responses.200.content.application/json
Section titled “get.responses.200.content.application/json”

application/json: object

get.responses.200.content.application/json.items
Section titled “get.responses.200.content.application/json.items”

items: object[]

get.responses.200.content.application/json.next_cursor?
Section titled “get.responses.200.content.application/json.next_cursor?”

optional next_cursor?: string | null

headers: object

[name: string]: unknown

400: object

Bad request

optional content?: undefined

headers: object

[name: string]: unknown

401: object

Unauthorized

optional content?: undefined

headers: object

[name: string]: unknown

403: object

Forbidden

optional content?: undefined

headers: object

[name: string]: unknown

500: object

Internal server error

optional content?: undefined

headers: object

[name: string]: unknown

optional head?: undefined

optional options?: undefined

parameters: object

optional cookie?: undefined

optional header?: undefined

optional path?: undefined

optional query?: undefined

optional patch?: undefined

post: object

Create a custom field

Create a custom field

parameters: object

optional cookie?: undefined

header: object

Idempotency-Key: string

Idempotency key for this request.

optional path?: undefined

optional query?: undefined

requestBody: object

content: object

application/json: object

post.requestBody.content.application/json.group
Section titled “post.requestBody.content.application/json.group”

group: "TRAVEL" | "ACCOUNTING" | "USER" | "ERP"

post.requestBody.content.application/json.integration_id?
Section titled “post.requestBody.content.application/json.integration_id?”

optional integration_id?: string | null

The ID of the Accounting Integration to associate this field with. This property is required when group is ERP: it must reference an existing Accounting Integration, and requests that omit it or send null for an ERP field are rejected. For all other groups (ACCOUNTING, USER, TRAVEL) integration_id is not applicable and should be left null.

int_123
post.requestBody.content.application/json.is_disabled?
Section titled “post.requestBody.content.application/json.is_disabled?”

optional is_disabled?: boolean | null

Indicates whether the field is disabled. A disabled field is not selectable: it is no longer offered as an option in the Brex dropdown and cannot be applied to new transactions. Records that already reference the field are unaffected.

post.requestBody.content.application/json.name
Section titled “post.requestBody.content.application/json.name”

name: string

The name of the field

post.requestBody.content.application/json.remote_id?
Section titled “post.requestBody.content.application/json.remote_id?”

optional remote_id?: string | null

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

foo_bar

responses: object

200: object

Create custom field response

content: object

post.responses.200.content.application/json
Section titled “post.responses.200.content.application/json”

application/json: object

post.responses.200.content.application/json.brex_id
Section titled “post.responses.200.content.application/json.brex_id”

brex_id: string

The internal Brex ID of the field

extended_field_foobar
post.responses.200.content.application/json.group?
Section titled “post.responses.200.content.application/json.group?”

optional group?: "TRAVEL" | "ACCOUNTING" | "USER" | "ERP" | null

post.responses.200.content.application/json.is_disabled
Section titled “post.responses.200.content.application/json.is_disabled”

is_disabled: boolean

Indicates whether the field is disabled. A disabled field is not selectable: it is no longer offered as an option in the Brex dropdown and cannot be applied to new transactions. Records that already reference the field are unaffected.

post.responses.200.content.application/json.name
Section titled “post.responses.200.content.application/json.name”

name: string | null

The name of the field

post.responses.200.content.application/json.remote_id?
Section titled “post.responses.200.content.application/json.remote_id?”

optional remote_id?: string | null

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

foo_bar
post.responses.200.content.application/json.updated_at
Section titled “post.responses.200.content.application/json.updated_at”

updated_at: string

Format: date-time

The last updated timestamp of the field

headers: object

[name: string]: unknown

400: object

Bad request

optional content?: undefined

headers: object

[name: string]: unknown

401: object

Unauthorized

optional content?: undefined

headers: object

[name: string]: unknown

403: object

Forbidden

optional content?: undefined

headers: object

[name: string]: unknown

404: object

Not found

optional content?: undefined

headers: object

[name: string]: unknown

500: object

Internal server error

optional content?: undefined

headers: object

[name: string]: unknown

optional put?: undefined

optional trace?: undefined


/v1/fields/{field_id}/values: object

Defined in: src/fields/types.gen.ts:27

delete: object

Delete custom field values

Delete custom field values (up to 1000 values at once) for a specific field

parameters: object

optional cookie?: undefined

optional header?: undefined

path: object

field_id: string

The Field Brex identifier

extended_field_foobar

optional query?: undefined

requestBody: object

content: object

delete.requestBody.content.application/json
Section titled “delete.requestBody.content.application/json”

application/json: object

delete.requestBody.content.application/json.items
Section titled “delete.requestBody.content.application/json.items”

items: ({ brex_id: string; } | { remote_id: string; } | { value_id: string; })[]

responses: object

200: object

Delete custom field value list response

content: object

delete.responses.200.content.application/json
Section titled “delete.responses.200.content.application/json”

application/json: Record<string, never>

headers: object

[name: string]: unknown

400: object

Bad request

optional content?: undefined

headers: object

[name: string]: unknown

401: object

Unauthorized

optional content?: undefined

headers: object

[name: string]: unknown

403: object

Forbidden

optional content?: undefined

headers: object

[name: string]: unknown

404: object

Not found

optional content?: undefined

headers: object

[name: string]: unknown

500: object

Internal server error

optional content?: undefined

headers: object

[name: string]: unknown

get: object

List custom field values

List values under the same custom field

parameters: object

optional cookie?: undefined

optional header?: undefined

path: object

field_id: string

The Field Brex identifier

extended_field_foobar

optional query?: object

optional brex_id[]?: string[] | null

Field value Brex identifier(s) to filter by

efo_foobar

optional cursor?: string | null

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

optional limit?: number | null

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

optional remote_id[]?: string[] | null

Field value remote identifier(s) to filter by

foo_bar

optional value?: string | null

Field value’s value to filter by

Foobar

optional value_id[]?: string[] | null

Field value identifier(s) to filter by

FooBar

optional requestBody?: undefined

responses: object

200: object

List custom field values response

content: object

get.responses.200.content.application/json
Section titled “get.responses.200.content.application/json”

application/json: object

get.responses.200.content.application/json.items
Section titled “get.responses.200.content.application/json.items”

items: object[]

get.responses.200.content.application/json.next_cursor?
Section titled “get.responses.200.content.application/json.next_cursor?”

optional next_cursor?: string | null

headers: object

[name: string]: unknown

400: object

Bad request

optional content?: undefined

headers: object

[name: string]: unknown

401: object

Unauthorized

optional content?: undefined

headers: object

[name: string]: unknown

403: object

Forbidden

optional content?: undefined

headers: object

[name: string]: unknown

500: object

Internal server error

optional content?: undefined

headers: object

[name: string]: unknown

optional head?: undefined

optional options?: undefined

parameters: object

optional cookie?: undefined

optional header?: undefined

optional path?: undefined

optional query?: undefined

optional patch?: undefined

post: object

Create custom field values

Create custom field values (up to 1000 values at once) for a specific field

parameters: object

optional cookie?: undefined

header: object

Idempotency-Key: string

Idempotency key for this request.

path: object

field_id: string

The Field Brex identifier

extended_field_foobar

optional query?: undefined

requestBody: object

content: object

application/json: object

post.requestBody.content.application/json.items
Section titled “post.requestBody.content.application/json.items”

items: object[]

The list of field values to be created

responses: object

200: object

Create custom field values response

content: object

post.responses.200.content.application/json
Section titled “post.responses.200.content.application/json”

application/json: object

post.responses.200.content.application/json.items
Section titled “post.responses.200.content.application/json.items”

items: object[]

The list of created field values

headers: object

[name: string]: unknown

400: object

Bad request

optional content?: undefined

headers: object

[name: string]: unknown

401: object

Unauthorized

optional content?: undefined

headers: object

[name: string]: unknown

403: object

Forbidden

optional content?: undefined

headers: object

[name: string]: unknown

404: object

Not found

optional content?: undefined

headers: object

[name: string]: unknown

500: object

Internal server error

optional content?: undefined

headers: object

[name: string]: unknown

put: object

Update custom field values

Update custom field values (up to 1000 values at once) for a specific field

parameters: object

optional cookie?: undefined

optional header?: undefined

path: object

field_id: string

The Field Brex identifier

extended_field_foobar

optional query?: undefined

requestBody: object

content: object

application/json: object

put.requestBody.content.application/json.items
Section titled “put.requestBody.content.application/json.items”

items: ({ brex_id: string; data: { is_disabled?: boolean | null; value?: string | null; }; } | { data: { is_disabled?: boolean | null; value?: string | null; }; remote_id: string; } | { data: { is_disabled?: boolean | null; value?: string | null; }; value_id: string; })[]

responses: object

200: object

Update custom field value list response

content: object

put.responses.200.content.application/json
Section titled “put.responses.200.content.application/json”

application/json: object

put.responses.200.content.application/json.items
Section titled “put.responses.200.content.application/json.items”

items: object[]

The list of updated field values

headers: object

[name: string]: unknown

400: object

Bad request

optional content?: undefined

headers: object

[name: string]: unknown

401: object

Unauthorized

optional content?: undefined

headers: object

[name: string]: unknown

403: object

Forbidden

optional content?: undefined

headers: object

[name: string]: unknown

404: object

Not found

optional content?: undefined

headers: object

[name: string]: unknown

500: object

Internal server error

optional content?: undefined

headers: object

[name: string]: unknown

optional trace?: undefined


/v1/fields/{field_id}/values/{brex_id}: object

Defined in: src/fields/types.gen.ts:59

optional delete?: undefined

get: object

Get a field value

Get a field value by field ID and field value ID

parameters: object

optional cookie?: undefined

optional header?: undefined

path: object

brex_id: string

The field value ID (brex_id) to retrieve.

efo_foobar

field_id: string

The Field Brex identifier

extended_field_foobar

optional query?: undefined

optional requestBody?: undefined

responses: object

200: object

Get a field value response

content: object

get.responses.200.content.application/json
Section titled “get.responses.200.content.application/json”

application/json: object

get.responses.200.content.application/json.brex_id
Section titled “get.responses.200.content.application/json.brex_id”

brex_id: string

The internal Brex ID of the field value

efo_foobar
get.responses.200.content.application/json.field_id
Section titled “get.responses.200.content.application/json.field_id”

field_id: string

The ID of the parent field this value belongs to

extended_field_foobar
get.responses.200.content.application/json.is_disabled
Section titled “get.responses.200.content.application/json.is_disabled”

is_disabled: boolean

Indicates whether the field value is disabled. A disabled value is not selectable: it no longer appears as a selectable option in the dropdown and cannot be chosen on new transactions. Records that already use the value are unaffected.

get.responses.200.content.application/json.remote_id?
Section titled “get.responses.200.content.application/json.remote_id?”

optional remote_id?: string | null

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

foo_bar
get.responses.200.content.application/json.updated_at
Section titled “get.responses.200.content.application/json.updated_at”

updated_at: string

Format: date-time

The last updated timestamp of the field value

get.responses.200.content.application/json.value
Section titled “get.responses.200.content.application/json.value”

value: string

The display name of the field value

get.responses.200.content.application/json.value_id?
Section titled “get.responses.200.content.application/json.value_id?”

optional value_id?: string | null

The value ID or code of the field value; Usually it is a unique identifier for the custom field value in the remote system

foo_bar

headers: object

[name: string]: unknown

400: object

Bad request

optional content?: undefined

headers: object

[name: string]: unknown

401: object

Unauthorized

optional content?: undefined

headers: object

[name: string]: unknown

403: object

Forbidden

optional content?: undefined

headers: object

[name: string]: unknown

404: object

Not found

optional content?: undefined

headers: object

[name: string]: unknown

500: object

Internal server error

optional content?: undefined

headers: object

[name: string]: unknown

optional head?: undefined

optional options?: undefined

parameters: object

optional cookie?: undefined

optional header?: undefined

optional path?: undefined

optional query?: undefined

optional patch?: undefined

optional post?: undefined

optional put?: undefined

optional trace?: undefined


/v1/fields/{id}: object

Defined in: src/fields/types.gen.ts:79

delete: object

Delete a custom field

Delete a custom field by Brex ID

parameters: object

optional cookie?: undefined

optional header?: undefined

path: object

id: string

The Brex identifier of the field to delete

extended_field_foobar

optional query?: undefined

optional requestBody?: undefined

responses: object

200: object

Delete custom field response

optional content?: undefined

headers: object

[name: string]: unknown

400: object

Bad request

optional content?: undefined

headers: object

[name: string]: unknown

401: object

Unauthorized

optional content?: undefined

headers: object

[name: string]: unknown

403: object

Forbidden

optional content?: undefined

headers: object

[name: string]: unknown

404: object

Not found

optional content?: undefined

headers: object

[name: string]: unknown

500: object

Internal server error

optional content?: undefined

headers: object

[name: string]: unknown

get: object

Get custom field

Get a custom field by Brex ID

parameters: object

optional cookie?: undefined

optional header?: undefined

path: object

id: string

The Brex identifier of the field to retrieve

extended_field_foobar

optional query?: undefined

optional requestBody?: undefined

responses: object

200: object

Get custom field response

content: object

get.responses.200.content.application/json
Section titled “get.responses.200.content.application/json”

application/json: object

get.responses.200.content.application/json.brex_id
Section titled “get.responses.200.content.application/json.brex_id”

brex_id: string

The internal Brex ID of the field

extended_field_foobar
get.responses.200.content.application/json.group?
Section titled “get.responses.200.content.application/json.group?”

optional group?: "TRAVEL" | "ACCOUNTING" | "USER" | "ERP" | null

get.responses.200.content.application/json.is_disabled
Section titled “get.responses.200.content.application/json.is_disabled”

is_disabled: boolean

Indicates whether the field is disabled. A disabled field is not selectable: it is no longer offered as an option in the Brex dropdown and cannot be applied to new transactions. Records that already reference the field are unaffected.

get.responses.200.content.application/json.name
Section titled “get.responses.200.content.application/json.name”

name: string | null

The name of the field

get.responses.200.content.application/json.remote_id?
Section titled “get.responses.200.content.application/json.remote_id?”

optional remote_id?: string | null

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

foo_bar
get.responses.200.content.application/json.updated_at
Section titled “get.responses.200.content.application/json.updated_at”

updated_at: string

Format: date-time

The last updated timestamp of the field

headers: object

[name: string]: unknown

400: object

Bad request

optional content?: undefined

headers: object

[name: string]: unknown

401: object

Unauthorized

optional content?: undefined

headers: object

[name: string]: unknown

403: object

Forbidden

optional content?: undefined

headers: object

[name: string]: unknown

404: object

Not found

optional content?: undefined

headers: object

[name: string]: unknown

500: object

Internal server error

optional content?: undefined

headers: object

[name: string]: unknown

optional head?: undefined

optional options?: undefined

parameters: object

optional cookie?: undefined

optional header?: undefined

optional path?: undefined

optional query?: undefined

optional patch?: undefined

optional post?: undefined

put: object

Update a custom field

Update a field by ID

parameters: object

optional cookie?: undefined

optional header?: undefined

path: object

id: string

The Brex identifier of the field to update

extended_field_foobar

optional query?: undefined

requestBody: object

content: object

application/json: object

put.requestBody.content.application/json.is_disabled?
Section titled “put.requestBody.content.application/json.is_disabled?”

optional is_disabled?: boolean | null

Indicates whether the field is disabled. A disabled field is not selectable: it is no longer offered as an option in the Brex dropdown and cannot be applied to new transactions. Records that already reference the field are unaffected.

put.requestBody.content.application/json.name?
Section titled “put.requestBody.content.application/json.name?”

optional name?: string | null

The name of the field

responses: object

200: object

Update custom field response

content: object

put.responses.200.content.application/json
Section titled “put.responses.200.content.application/json”

application/json: object

put.responses.200.content.application/json.brex_id
Section titled “put.responses.200.content.application/json.brex_id”

brex_id: string

The internal Brex ID of the field

extended_field_foobar
put.responses.200.content.application/json.group?
Section titled “put.responses.200.content.application/json.group?”

optional group?: "TRAVEL" | "ACCOUNTING" | "USER" | "ERP" | null

put.responses.200.content.application/json.is_disabled
Section titled “put.responses.200.content.application/json.is_disabled”

is_disabled: boolean

Indicates whether the field is disabled. A disabled field is not selectable: it is no longer offered as an option in the Brex dropdown and cannot be applied to new transactions. Records that already reference the field are unaffected.

put.responses.200.content.application/json.name
Section titled “put.responses.200.content.application/json.name”

name: string | null

The name of the field

put.responses.200.content.application/json.remote_id?
Section titled “put.responses.200.content.application/json.remote_id?”

optional remote_id?: string | null

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

foo_bar
put.responses.200.content.application/json.updated_at
Section titled “put.responses.200.content.application/json.updated_at”

updated_at: string

Format: date-time

The last updated timestamp of the field

headers: object

[name: string]: unknown

400: object

Bad request

optional content?: undefined

headers: object

[name: string]: unknown

401: object

Unauthorized

optional content?: undefined

headers: object

[name: string]: unknown

403: object

Forbidden

optional content?: undefined

headers: object

[name: string]: unknown

404: object

Not found

optional content?: undefined

headers: object

[name: string]: unknown

500: object

Internal server error

optional content?: undefined

headers: object

[name: string]: unknown

optional trace?: undefined