# `Polarex.Organizations`
[🔗](https://github.com/giusdp/polarex/blob/main/lib/polarex/operations/organizations.ex#L1)

Provides API endpoints related to organizations

# `customer_portal_organizations_get`

```elixir
@spec customer_portal_organizations_get(slug :: String.t(), opts :: keyword()) ::
  {:ok, Polarex.CustomerOrganizationData.t()}
  | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
```

Get Organization

Get a customer portal's organization by slug.

# `organizations_create`

```elixir
@spec organizations_create(body :: Polarex.OrganizationCreate.t(), opts :: keyword()) ::
  {:ok, Polarex.Organization.t()} | {:error, Polarex.HTTPValidationError.t()}
```

Create Organization

Create an organization.

**Scopes**: `organizations:write`

## Request Body

**Content Types**: `application/json`

# `organizations_get`

```elixir
@spec organizations_get(id :: String.t(), opts :: keyword()) ::
  {:ok, Polarex.Organization.t()}
  | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
```

Get Organization

Get an organization by ID.

# `organizations_list`

```elixir
@spec organizations_list(opts :: keyword()) ::
  {:ok, Polarex.ListResourceOrganization.t()}
  | {:error, Polarex.HTTPValidationError.t()}
```

List Organizations

List organizations.

**Scopes**: `organizations:read` `organizations:write`

## Options

  * `slug`: Filter by slug.
  * `page`: Page number, defaults to 1.
  * `limit`: Size of a page, defaults to 10. Maximum is 100.
  * `sorting`: Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.

# `organizations_update`

```elixir
@spec organizations_update(
  id :: String.t(),
  body :: Polarex.OrganizationUpdate.t(),
  opts :: keyword()
) ::
  {:ok, Polarex.Organization.t()}
  | {:error,
     Polarex.HTTPValidationError.t()
     | Polarex.NotPermitted.t()
     | Polarex.ResourceNotFound.t()}
```

Update Organization

Update an organization.

## Request Body

**Content Types**: `application/json`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
