Locations
Defined in: src/team/client.gen.ts:327
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Locations(
_core):Locations
Defined in: src/team/client.gen.ts:328
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Locations
Methods
Section titled “Methods”create()
Section titled “create()”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.
Parameters
Section titled “Parameters”description?
Section titled “description?”string | null
Description
Description of the location
string
Description
Name of the location
options?
Section titled “options?”Returns
Section titled “Returns”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
Parameters
Section titled “Parameters”string
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{ description?: string | null; id: string; name: string; }>
list()
Section titled “list()”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.
Parameters
Section titled “Parameters”query?
Section titled “query?”cursor?
Section titled “cursor?”string | null
limit?
Section titled “limit?”number | null
string | null
options?
Section titled “options?”Returns
Section titled “Returns”PagePromise<{ items: object[]; next_cursor?: string | null; }>