---
title: FieldValues
editUrl: false
head: []
template: doc
prev: false
next: false
sidebar:
  hidden: false
  attrs: {}
pagefind: true
draft: false
---

Defined in: [src/fields/client.gen.ts:99](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/fields/client.gen.ts#L99)

## Constructors

### Constructor

> **new FieldValues**(`_core`): `FieldValues`

Defined in: [src/fields/client.gen.ts:100](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/fields/client.gen.ts#L100)

#### Parameters

##### \_core

[`BrexCore`](/brex/api/index/classes/brexcore/)

#### Returns

`FieldValues`

## Methods

### create()

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

Defined in: [src/fields/client.gen.ts:110](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/fields/client.gen.ts#L110)

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

##### fieldId

`string`

##### body

###### items

`object`[]

**Description**

The list of field values to be created

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<\{ `items`: `object`[]; \}\>

***

### delete()

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

Defined in: [src/fields/client.gen.ts:135](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/fields/client.gen.ts#L135)

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

##### fieldId

`string`

##### body

###### items

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

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<`Record`\<`string`, `never`\>\>

***

### get()

> **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](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/fields/client.gen.ts#L156)

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

##### fieldId

`string`

##### brexId

`string`

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### 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()

> **list**(`fieldId`, `query?`, `options?`): [`PagePromise`](/brex/api/index/classes/pagepromise/)\<\{ `items`: `object`[]; `next_cursor?`: `string` \| `null`; \}\>

Defined in: [src/fields/client.gen.ts:178](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/fields/client.gen.ts#L178)

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

##### fieldId

`string`

##### query?

###### brex_id[]?

`string`[] \| `null`

**Description**

Field value Brex identifier(s) to filter by

**Example**

```ts
efo_foobar
```

###### cursor?

`string` \| `null`

**Description**

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

###### limit?

`number` \| `null`

**Description**

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

###### remote_id[]?

`string`[] \| `null`

**Description**

Field value remote identifier(s) to filter by

**Example**

```ts
foo_bar
```

###### value?

`string` \| `null`

**Description**

Field value's value to filter by

**Example**

```ts
Foobar
```

###### value_id[]?

`string`[] \| `null`

**Description**

Field value identifier(s) to filter by

**Example**

```ts
FooBar
```

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

[`PagePromise`](/brex/api/index/classes/pagepromise/)\<\{ `items`: `object`[]; `next_cursor?`: `string` \| `null`; \}\>

***

### update()

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

Defined in: [src/fields/client.gen.ts:197](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/fields/client.gen.ts#L197)

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

##### fieldId

`string`

##### body

###### 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`; \})[]

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<\{ `items`: `object`[]; \}\>