FieldValues
Defined in: src/fields/client.gen.ts:99
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new FieldValues(
_core):FieldValues
Defined in: src/fields/client.gen.ts:100
Parameters
Section titled “Parameters”Returns
Section titled “Returns”FieldValues
Methods
Section titled “Methods”create()
Section titled “create()”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.
Parameters
Section titled “Parameters”fieldId
Section titled “fieldId”string
object[]
Description
The list of field values to be created
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{ items: object[]; }>
delete()
Section titled “delete()”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
Parameters
Section titled “Parameters”fieldId
Section titled “fieldId”string
({ brex_id: string; } | { remote_id: string; } | { value_id: string; })[]
options?
Section titled “options?”Returns
Section titled “Returns”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
Parameters
Section titled “Parameters”fieldId
Section titled “fieldId”string
brexId
Section titled “brexId”string
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{ brex_id: string; field_id: string; is_disabled: boolean; remote_id?: string | null; updated_at: string; value: string; value_id?: string | null; }>
list()
Section titled “list()”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.
Parameters
Section titled “Parameters”fieldId
Section titled “fieldId”string
query?
Section titled “query?”brex_id[]?
Section titled “brex_id[]?”string[] | null
Description
Field value Brex identifier(s) to filter by
Example
efo_foobarcursor?
Section titled “cursor?”string | null
Description
The cursor to use for pagination. This is the next_cursor value returned from the previous response.
limit?
Section titled “limit?”number | null
Description
Controls the maximum number of field values returned in the response. It can’t be greater than 1000.
remote_id[]?
Section titled “remote_id[]?”string[] | null
Description
Field value remote identifier(s) to filter by
Example
foo_barvalue?
Section titled “value?”string | null
Description
Field value’s value to filter by
Example
Foobarvalue_id[]?
Section titled “value_id[]?”string[] | null
Description
Field value identifier(s) to filter by
Example
FooBaroptions?
Section titled “options?”Returns
Section titled “Returns”PagePromise<{ items: object[]; next_cursor?: string | null; }>
update()
Section titled “update()”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
Parameters
Section titled “Parameters”fieldId
Section titled “fieldId”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; })[]
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{ items: object[]; }>