Skip to content

Locations

Defined in: src/team/client.gen.ts:327

new Locations(_core): Locations

Defined in: src/team/client.gen.ts:328

BrexCore

Locations

create(body, options?): Promise<{ description?: string | null; id: string; name: string; }>

Defined in: src/team/client.gen.ts:338

Create location

This endpoint creates a new location.

POST /v2/locations — requires OAuth scope: locations Supports an optional Idempotency-Key via options.idempotencyKey.

string | null

Description

Description of the location

string

Description

Name of the location

RequestOptions

Promise<{ description?: string | null; id: string; name: string; }>


get(id, options?): Promise<{ description?: string | null; id: string; name: string; }>

Defined in: src/team/client.gen.ts:356

Get location

This endpoint gets a location by ID.

GET /v2/locations/{id} — requires OAuth scope: locations, locations.readonly

string

RequestOptions

Promise<{ description?: string | null; id: string; name: string; }>


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

Defined in: src/team/client.gen.ts:375

List locations

This endpoint lists all locations.

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

string | null

number | null

string | null

RequestOptions

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