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

Defined in: [src/payments/client.gen.ts:151](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/payments/client.gen.ts#L151)

## Constructors

### Constructor

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

Defined in: [src/payments/client.gen.ts:152](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/payments/client.gen.ts#L152)

#### Parameters

##### \_core

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

#### Returns

`Vendors`

## Methods

### create()

> **create**(`body`, `options?`): `Promise`\<\{ `company_name?`: `string` \| `null`; `email?`: `string` \| `null`; `id`: `string`; `payment_accounts?`: `object`[] \| `null`; `phone?`: `string` \| `null`; \}\>

Defined in: [src/payments/client.gen.ts:162](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/payments/client.gen.ts#L162)

Create vendor

This endpoint creates a new vendor.

`POST /v1/vendors` — requires OAuth scope: `vendors`
Sends an `Idempotency-Key` header: `options.idempotencyKey`, or an auto-generated UUID.

#### Parameters

##### body

###### company_name

`string`

**Description**

Name for vendor. The name must be unique.

###### email?

`string` \| `null`

Format: email

**Description**

Email for vendor.

###### payment_accounts?

`object`[] \| `null`

**Description**

Payment accounts associated with the vendor.

###### phone?

`string` \| `null`

**Description**

Phone number for vendor.

##### options?

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

#### Returns

`Promise`\<\{ `company_name?`: `string` \| `null`; `email?`: `string` \| `null`; `id`: `string`; `payment_accounts?`: `object`[] \| `null`; `phone?`: `string` \| `null`; \}\>

***

### delete()

> **delete**(`id`, `options?`): `Promise`\<`void`\>

Defined in: [src/payments/client.gen.ts:180](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/payments/client.gen.ts#L180)

Delete vendor.

This endpoint deletes a vendor by ID.

`DELETE /v1/vendors/{id}` — requires OAuth scope: `vendors`

#### Parameters

##### id

`string`

##### options?

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

#### Returns

`Promise`\<`void`\>

***

### get()

> **get**(`id`, `options?`): `Promise`\<\{ `company_name?`: `string` \| `null`; `email?`: `string` \| `null`; `id`: `string`; `payment_accounts?`: `object`[] \| `null`; `phone?`: `string` \| `null`; \}\>

Defined in: [src/payments/client.gen.ts:196](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/payments/client.gen.ts#L196)

Get vendor

This endpoint gets a vendor by ID.

`GET /v1/vendors/{id}` — requires OAuth scope: `vendors.readonly`

#### Parameters

##### id

`string`

##### options?

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

#### Returns

`Promise`\<\{ `company_name?`: `string` \| `null`; `email?`: `string` \| `null`; `id`: `string`; `payment_accounts?`: `object`[] \| `null`; `phone?`: `string` \| `null`; \}\>

***

### list()

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

Defined in: [src/payments/client.gen.ts:216](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/payments/client.gen.ts#L216)

Lists vendors

This endpoint lists all existing vendors for an account.
Takes an optional parameter to match by vendor name.

`GET /v1/vendors` — requires OAuth scope: `vendors.readonly`
Await for a single page, or `for await` to iterate items across all pages.

#### Parameters

##### query?

###### cursor?

`string` \| `null`

###### limit?

`number` \| `null`

###### name?

`string` \| `null`

##### options?

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

#### Returns

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

***

### update()

> **update**(`id`, `body`, `options?`): `Promise`\<\{ `company_name?`: `string` \| `null`; `email?`: `string` \| `null`; `id`: `string`; `payment_accounts?`: `object`[] \| `null`; `phone?`: `string` \| `null`; \}\>

Defined in: [src/payments/client.gen.ts:233](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/payments/client.gen.ts#L233)

Update vendor

Updates an existing vendor by ID.

`PUT /v1/vendors/{id}` — requires OAuth scope: `vendors`
Supports an optional `Idempotency-Key` via `options.idempotencyKey`.

#### Parameters

##### id

`string`

##### body

###### beneficiary_name?

`string` \| `null`

**Description**

Name for the Beneficiary

###### company_name?

`string` \| `null`

**Description**

Name for vendor

###### email?

`string` \| `null`

Format: email

**Description**

Email for vendor

###### payment_accounts?

`object`[] \| `null`

**Description**

To update payment instruments, we require the entire payload for each payment instrument that is being updated.

###### phone?

`string` \| `null`

**Description**

Phone number for vendor

##### options?

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

#### Returns

`Promise`\<\{ `company_name?`: `string` \| `null`; `email?`: `string` \| `null`; `id`: `string`; `payment_accounts?`: `object`[] \| `null`; `phone?`: `string` \| `null`; \}\>