> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# IOrganizationGeoCollectionsService

- Package: [@gooddata/sdk-backend-spi](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/index.md)
- Kind: interface
- Stability: alpha
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-backend-spi/src/organization/geoCollections/index.ts

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Service for managing organization-level custom geo collections.

**Signature:**

```typescript
export interface IOrganizationGeoCollectionsService 
```

## Remarks

Importing geo data into a collection follows a three-step workflow: 1. Upload a file via [IOrganizationGeoCollectionsService.uploadGeoCollectionFile()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationgeocollectionsservice/index.md#iorganizationgeocollectionsserviceuploadgeocollectionfile) 2. Convert it via [IOrganizationGeoCollectionsService.convertGeoCollectionFile()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationgeocollectionsservice/index.md#iorganizationgeocollectionsserviceconvertgeocollectionfile) 3. Import it via [IOrganizationGeoCollectionsService.importGeoCollectionFile()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationgeocollectionsservice/index.md#iorganizationgeocollectionsserviceimportgeocollectionfile)

## Methods

| Method | Description |
| --- | --- |
| [convertGeoCollectionFile(location)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationgeocollectionsservice/index.md#iorganizationgeocollectionsserviceconvertgeocollectionfile) | **_(ALPHA)_** Convert a staged geo file into an importable format. |
| [createGeoCollection(definition)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationgeocollectionsservice/index.md#iorganizationgeocollectionsservicecreategeocollection) | **_(ALPHA)_** Create a new custom geo collection. |
| [deleteGeoCollection(id)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationgeocollectionsservice/index.md#iorganizationgeocollectionsservicedeletegeocollection) | **_(ALPHA)_** Delete a custom geo collection. |
| [getAll()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationgeocollectionsservice/index.md#iorganizationgeocollectionsservicegetall) | **_(ALPHA)_** Get all custom geo collections. |
| [getGeoCollection(id)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationgeocollectionsservice/index.md#iorganizationgeocollectionsservicegetgeocollection) | **_(ALPHA)_** Get a single custom geo collection by its identifier. |
| [importGeoCollectionFile(collectionId, location)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationgeocollectionsservice/index.md#iorganizationgeocollectionsserviceimportgeocollectionfile) | **_(ALPHA)_** Import a staged and converted file into a geo collection. |
| [updateGeoCollection(geoCollection)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationgeocollectionsservice/index.md#iorganizationgeocollectionsserviceupdategeocollection) | **_(ALPHA)_** Update an existing custom geo collection. |
| [uploadGeoCollectionFile(file)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationgeocollectionsservice/index.md#iorganizationgeocollectionsserviceuploadgeocollectionfile) | **_(ALPHA)_** Upload a file to staging for subsequent import into a geo collection. |

## Method details

### IOrganizationGeoCollectionsService.convertGeoCollectionFile()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Convert a staged geo file into an importable format.

**Signature:**

```typescript
convertGeoCollectionFile(location: string): Promise<IGeoCollectionFileUploadResult>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| location | string | staging location from a previous upload |

**Returns:**

Promise&lt;[IGeoCollectionFileUploadResult](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.igeocollectionfileuploadresult/index.md)&gt;

Promise resolved with the converted file location reference.

### IOrganizationGeoCollectionsService.createGeoCollection()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Create a new custom geo collection.

**Signature:**

```typescript
createGeoCollection(definition: IGeoCollectionDefinition): Promise<IGeoCollection>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| definition | [IGeoCollectionDefinition](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.igeocollectiondefinition/index.md) | definition of the geo collection to create |

**Returns:**

Promise&lt;[IGeoCollection](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.igeocollection/index.md)&gt;

Promise resolved with created geo collection including its generated id.

### IOrganizationGeoCollectionsService.deleteGeoCollection()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Delete a custom geo collection.

**Signature:**

```typescript
deleteGeoCollection(id: string): Promise<void>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| id | string | identifier of the geo collection to delete |

**Returns:**

Promise&lt;void&gt;

### IOrganizationGeoCollectionsService.getAll()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Get all custom geo collections.

**Signature:**

```typescript
getAll(): Promise<IGeoCollection[]>;
```
**Returns:**

Promise&lt;[IGeoCollection](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.igeocollection/index.md)[]&gt;

Promise resolved with array of geo collections.

### IOrganizationGeoCollectionsService.getGeoCollection()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Get a single custom geo collection by its identifier.

**Signature:**

```typescript
getGeoCollection(id: string): Promise<IGeoCollection | undefined>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| id | string | identifier of the geo collection |

**Returns:**

Promise&lt;[IGeoCollection](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.igeocollection/index.md) &#124; undefined&gt;

Promise resolved with the geo collection, or undefined if not found.

### IOrganizationGeoCollectionsService.importGeoCollectionFile()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Import a staged and converted file into a geo collection.

**Signature:**

```typescript
importGeoCollectionFile(collectionId: string, location: string): Promise<void>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| collectionId | string | identifier of the target geo collection |
| location | string | location of the converted file to import |

**Returns:**

Promise&lt;void&gt;

### IOrganizationGeoCollectionsService.updateGeoCollection()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Update an existing custom geo collection.

**Signature:**

```typescript
updateGeoCollection(geoCollection: IGeoCollection): Promise<IGeoCollection>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| geoCollection | [IGeoCollection](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.igeocollection/index.md) | geo collection with updated properties |

**Returns:**

Promise&lt;[IGeoCollection](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.igeocollection/index.md)&gt;

Promise resolved with updated geo collection.

### IOrganizationGeoCollectionsService.uploadGeoCollectionFile()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Upload a file to staging for subsequent import into a geo collection.

**Signature:**

```typescript
uploadGeoCollectionFile(file: File): Promise<IGeoCollectionFileUploadResult>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| file | File | geo data file to upload |

**Returns:**

Promise&lt;[IGeoCollectionFileUploadResult](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.igeocollectionfileuploadresult/index.md)&gt;

Promise resolved with the staging location reference.
