# OrganizationsApi

All URIs are relative to *http://localhost*

| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**createOrganization**](OrganizationsApi.md#createorganization) | **POST** /fna/api/v2/organizations |  |
| [**deleteOrganization**](OrganizationsApi.md#deleteorganization) | **DELETE** /fna/api/v2/organizations/{uuid} |  |
| [**getOrganization**](OrganizationsApi.md#getorganization) | **GET** /fna/api/v2/organizations/{uuid} |  |
| [**listOrganizationUsers**](OrganizationsApi.md#listorganizationusers) | **GET** /fna/api/v2/organizations/{uuid}/users |  |
| [**listOrganizations**](OrganizationsApi.md#listorganizations) | **GET** /fna/api/v2/organizations |  |



## createOrganization

> OrganizationsCreateOrganizationResponse createOrganization(organizationsCreateOrganizationPayload)



### Example

```ts
import {
  Configuration,
  OrganizationsApi,
} from '@equisoft/equisoft-plan-sdk-typescript';
import type { CreateOrganizationRequest } from '@equisoft/equisoft-plan-sdk-typescript';

async function example() {
  console.log("🚀 Testing @equisoft/equisoft-plan-sdk-typescript SDK...");
  const config = new Configuration({ 
    // To configure OAuth2 access token for authorization: OAuth2 implicit
    accessToken: "YOUR ACCESS TOKEN",
  });
  const api = new OrganizationsApi(config);

  const body = {
    // OrganizationsCreateOrganizationPayload | Organization creation payload
    organizationsCreateOrganizationPayload: ...,
  } satisfies CreateOrganizationRequest;

  try {
    const data = await api.createOrganization(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **organizationsCreateOrganizationPayload** | [OrganizationsCreateOrganizationPayload](OrganizationsCreateOrganizationPayload.md) | Organization creation payload | |

### Return type

[**OrganizationsCreateOrganizationResponse**](OrganizationsCreateOrganizationResponse.md)

### Authorization

[OAuth2 implicit](../README.md#OAuth2-implicit)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Success |  -  |
| **400** | Bad request |  -  |
| **401** | Access denied |  -  |
| **500** | Server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## deleteOrganization

> deleteOrganization(uuid)



### Example

```ts
import {
  Configuration,
  OrganizationsApi,
} from '@equisoft/equisoft-plan-sdk-typescript';
import type { DeleteOrganizationRequest } from '@equisoft/equisoft-plan-sdk-typescript';

async function example() {
  console.log("🚀 Testing @equisoft/equisoft-plan-sdk-typescript SDK...");
  const config = new Configuration({ 
    // To configure OAuth2 access token for authorization: OAuth2 implicit
    accessToken: "YOUR ACCESS TOKEN",
  });
  const api = new OrganizationsApi(config);

  const body = {
    // string
    uuid: uuid_example,
  } satisfies DeleteOrganizationRequest;

  try {
    const data = await api.deleteOrganization(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **uuid** | `string` |  | [Defaults to `undefined`] |

### Return type

`void` (Empty response body)

### Authorization

[OAuth2 implicit](../README.md#OAuth2-implicit)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **202** | Organization deletion accepted; processing will continue asynchronously |  -  |
| **401** | Access denied |  -  |
| **403** | Forbidden - user does not have permission to delete this organization |  -  |
| **404** | Organization not found |  -  |
| **500** | Server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## getOrganization

> OrganizationsOrganization getOrganization(uuid)



### Example

```ts
import {
  Configuration,
  OrganizationsApi,
} from '@equisoft/equisoft-plan-sdk-typescript';
import type { GetOrganizationRequest } from '@equisoft/equisoft-plan-sdk-typescript';

async function example() {
  console.log("🚀 Testing @equisoft/equisoft-plan-sdk-typescript SDK...");
  const config = new Configuration({ 
    // To configure OAuth2 access token for authorization: OAuth2 implicit
    accessToken: "YOUR ACCESS TOKEN",
  });
  const api = new OrganizationsApi(config);

  const body = {
    // string
    uuid: uuid_example,
  } satisfies GetOrganizationRequest;

  try {
    const data = await api.getOrganization(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **uuid** | `string` |  | [Defaults to `undefined`] |

### Return type

[**OrganizationsOrganization**](OrganizationsOrganization.md)

### Authorization

[OAuth2 implicit](../README.md#OAuth2-implicit)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Success |  -  |
| **401** | Access denied |  -  |
| **404** | Not found |  -  |
| **500** | Server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## listOrganizationUsers

> UsersListUsersResponse listOrganizationUsers(uuid)



### Example

```ts
import {
  Configuration,
  OrganizationsApi,
} from '@equisoft/equisoft-plan-sdk-typescript';
import type { ListOrganizationUsersRequest } from '@equisoft/equisoft-plan-sdk-typescript';

async function example() {
  console.log("🚀 Testing @equisoft/equisoft-plan-sdk-typescript SDK...");
  const config = new Configuration({ 
    // To configure OAuth2 access token for authorization: OAuth2 implicit
    accessToken: "YOUR ACCESS TOKEN",
  });
  const api = new OrganizationsApi(config);

  const body = {
    // string
    uuid: uuid_example,
  } satisfies ListOrganizationUsersRequest;

  try {
    const data = await api.listOrganizationUsers(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **uuid** | `string` |  | [Defaults to `undefined`] |

### Return type

[**UsersListUsersResponse**](UsersListUsersResponse.md)

### Authorization

[OAuth2 implicit](../README.md#OAuth2-implicit)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Success |  -  |
| **401** | Access denied |  -  |
| **500** | Server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## listOrganizations

> OrganizationsListOrganizationsResponse listOrganizations(organizationUuid)



### Example

```ts
import {
  Configuration,
  OrganizationsApi,
} from '@equisoft/equisoft-plan-sdk-typescript';
import type { ListOrganizationsRequest } from '@equisoft/equisoft-plan-sdk-typescript';

async function example() {
  console.log("🚀 Testing @equisoft/equisoft-plan-sdk-typescript SDK...");
  const config = new Configuration({ 
    // To configure OAuth2 access token for authorization: OAuth2 implicit
    accessToken: "YOUR ACCESS TOKEN",
  });
  const api = new OrganizationsApi(config);

  const body = {
    // string
    organizationUuid: organizationUuid_example,
  } satisfies ListOrganizationsRequest;

  try {
    const data = await api.listOrganizations(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **organizationUuid** | `string` |  | [Defaults to `undefined`] |

### Return type

[**OrganizationsListOrganizationsResponse**](OrganizationsListOrganizationsResponse.md)

### Authorization

[OAuth2 implicit](../README.md#OAuth2-implicit)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Success |  -  |
| **401** | Access denied |  -  |
| **500** | Server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

