Skip to content

FieldValues

Defined in: src/fields/client.gen.ts:99

new FieldValues(_core): FieldValues

Defined in: src/fields/client.gen.ts:100

BrexCore

FieldValues

create(fieldId, body, options?): Promise<{ items: object[]; }>

Defined in: src/fields/client.gen.ts:110

Create custom field values

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

POST /v1/fields/{field_id}/values — requires OAuth scope: field_values.write Sends an Idempotency-Key header: options.idempotencyKey, or an auto-generated UUID.

string

object[]

Description

The list of field values to be created

RequestOptions

Promise<{ items: object[]; }>


delete(fieldId, body, options?): Promise<Record<string, never>>

Defined in: src/fields/client.gen.ts:135

Delete custom field values

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

DELETE /v1/fields/{field_id}/values — requires OAuth scope: fields.write

string

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

RequestOptions

Promise<Record<string, never>>


get(fieldId, brexId, options?): Promise<{ brex_id: string; field_id: string; is_disabled: boolean; remote_id?: string | null; updated_at: string; value: string; value_id?: string | null; }>

Defined in: src/fields/client.gen.ts:156

Get a field value

Get a field value by field ID and field value ID

GET /v1/fields/{field_id}/values/{brex_id} — requires OAuth scope: field_values.read, field_values.write

string

string

RequestOptions

Promise<{ brex_id: string; field_id: string; is_disabled: boolean; remote_id?: string | null; updated_at: string; value: string; value_id?: string | null; }>


list(fieldId, query?, options?): PagePromise<{ items: object[]; next_cursor?: string | null; }>

Defined in: src/fields/client.gen.ts:178

List custom field values

List values under the same custom field

GET /v1/fields/{field_id}/values — requires OAuth scope: field_values.read, field_values.write Await for a single page, or for await to iterate items across all pages.

string

string[] | null

Description

Field value Brex identifier(s) to filter by

Example

efo_foobar

string | null

Description

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

number | null

Description

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

string[] | null

Description

Field value remote identifier(s) to filter by

Example

foo_bar

string | null

Description

Field value’s value to filter by

Example

Foobar

string[] | null

Description

Field value identifier(s) to filter by

Example

FooBar

RequestOptions

PagePromise<{ items: object[]; next_cursor?: string | null; }>


update(fieldId, body, options?): Promise<{ items: object[]; }>

Defined in: src/fields/client.gen.ts:197

Update custom field values

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

PUT /v1/fields/{field_id}/values — requires OAuth scope: field_values.write

string

({ 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; })[]

RequestOptions

Promise<{ items: object[]; }>