> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dokstamp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Organizações

> Faça a gestão de unidades organizacionais (faculdades, departamentos, campi) dentro de uma instituição.

# Organizações

Organizações são subunidades de uma instituição — faculdades, departamentos, escolas ou campi. Os cursos podem ser opcionalmente associados a uma organização para melhor classificação.

***

## O objeto organização

```json theme={null}
{
  "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "School of Engineering",
  "code": "ENG",
  "institution": {
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Federal University of Technology"
  },
  "created_at": "2024-01-15T10:00:00.000000Z"
}
```

| Campo         | Tipo   | Descrição                                |
| ------------- | ------ | ---------------------------------------- |
| `uuid`        | string | Identificador único                      |
| `name`        | string | Nome da organização                      |
| `code`        | string | Código abreviado para referência interna |
| `institution` | object | A instituição pai                        |

***

## Listar organizações

```http theme={null}
GET /organizations
```

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.dokstamp.com/organizations \
    -H "Authorization: Bearer {TOKEN}" \
    -H "Accept: application/json" \
    -H "X-Tenant: {TENANT}"
  ```
</CodeGroup>

***

## Criar uma organização

```http theme={null}
POST /organizations
```

| Parâmetro          | Tipo   | Obrigatório | Descrição                      |
| ------------------ | ------ | ----------- | ------------------------------ |
| `name`             | string | Sim         | Nome da organização            |
| `institution_uuid` | string | Sim         | UUID da instituição pai        |
| `code`             | string | Não         | Código de referência abreviado |

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.dokstamp.com/organizations \
    -H "Authorization: Bearer {TOKEN}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "X-Tenant: {TENANT}" \
    -d '{
      "name": "School of Engineering",
      "code": "ENG",
      "institution_uuid": "550e8400-e29b-41d4-a716-446655440000"
    }'
  ```
</CodeGroup>

***

## Obter, atualizar, eliminar

```http theme={null}
GET    /organizations/{uuid}
PATCH  /organizations/{uuid}
PUT    /organizations/{uuid}
DELETE /organizations/{uuid}
DELETE /organizations/batch/destroy
```

Todos seguem as mesmas convenções dos restantes recursos. Consulte [Instituições](/pt/api-reference/institutions) para exemplos detalhados.
