# OrganizationsResource

Canonical page: https://docs.ovok.com/java-sdk/reference/organizations-resource

```java
public final class OrganizationsResource
```

Manages organizations through the slim API. Get it from [`SlimResource.organizations()`](/java-sdk/reference/slim-resource#organizations).

## Methods [#methods]

### retrieve [#retrieve]

```java
public JsonNode retrieve(String id, RequestOptions options) throws IOException, InterruptedException
```

Gets one organization (`GET /v1/slim/organization/{id}`).

**Parameters:**

- `id`: the organization ID
- `options`: per-request options, such as the timeout

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

### create [#create]

```java
public JsonNode create(Object body, RequestOptions options) throws IOException, InterruptedException
```

Creates an organization (`POST /v1/slim/organization`).

**Parameters:**

- `body`: the organization to create
- `options`: per-request options, such as the timeout

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

### update [#update]

```java
public JsonNode update(
        String id,
        Object body,
        RequestOptions options) throws IOException, InterruptedException
```

Replaces an organization (`PUT /v1/slim/organization/{id}`).

**Parameters:**

- `id`: the organization ID
- `body`: the full organization
- `options`: per-request options, such as the timeout

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

### delete [#delete]

```java
public void delete(String id, RequestOptions options) throws IOException, InterruptedException
```

Deletes an organization (`DELETE /v1/slim/organization/{id}`).

**Parameters:**

- `id`: the organization ID
- `options`: per-request options, such as the timeout

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response
