> For the complete documentation index, see [llms.txt](https://dev-cucei-itrans.gitbook.io/siiau-api-client/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev-cucei-itrans.gitbook.io/siiau-api-client/requests/carreras-de-centro.md).

# Carreras de Centro

Obtiene las carreras de un centro universitario

## <mark style="color:red;">Parámetros</mark>

<table><thead><tr><th>Parámetro</th><th width="214.33333333333331">Tipo</th><th>Descripción</th></tr></thead><tbody><tr><td><strong>siglas</strong></td><td><code>string</code></td><td>Siglas del centro universitario</td></tr></tbody></table>

## <mark style="color:red;">Uso</mark>

### <mark style="color:orange;">Básico</mark>

{% tabs %}
{% tab title="Helper" %}

```php
$carreras = siiau()->carrera()->todasDeCentro(
    siglas: 'CUCEI'
);
```

{% endtab %}

{% tab title="Facade" %}

<pre class="language-php"><code class="lang-php">use Siiau\ApiClient\Facades\Siiau;

<strong>$carreras = siiau()->carrera()->todasDeCentro(
</strong>    siglas: 'CUCEI'
);
</code></pre>

{% endtab %}

{% tab title="Injection" %}

```php
use Siiau\ApiClient\SiiauConnector;

public function foo(SiiauConnector $siiau): void
{
    $carreras = $siiau->carrera()->todasDeCentro(
        siglas: 'CUCEI'
    );
}
```

{% endtab %}
{% endtabs %}

### <mark style="color:orange;">Avanzado</mark>

{% tabs %}
{% tab title="Por sync request" %}

```php
use Siiau\ApiClient\Requests\GetCarrerasCentroRequest;

$response = siiau()->send(new GetCarrerasCentroRequest(
    siglas: 'CUCEI',
));
```

{% endtab %}

{% tab title="Por async request" %}

```php
use Siiau\ApiClient\Requests\GetCarrerasCentroRequest;

$promise = siiau()->sendAsync(new GetCarrerasCentroRequest(
    siglas: 'CUCEI',
));

$promise
    ->then(static function (Response $response) {
        // Handle Response
    })
    ->otherwise(static function (RequestException $exception) {
        // Handle Exception
    });
```

{% endtab %}
{% endtabs %}

***

## <mark style="color:red;">API</mark>

## POST /api/carreras-centro

> Obtiene información sobre las carreras universitarias que ofrece un centro específico.

```json
{"openapi":"3.0.0","info":{"title":"Documentación de APIs de consulta al WebServer de SIIAU","version":"1.0.0"},"tags":[{"name":"General","description":"API Endpoints para manejo de datos del Centro Universitario y sus materias"}],"servers":[{"url":"https://ws.itrans.cucei.udg.mx","description":"API Server"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","description":"Ingrese un Token con el formato: (Bearer \\<token\\>). Ejemplo: Bearer qwerty123456","name":"Authorization","in":"header"}}},"paths":{"/api/carreras-centro":{"post":{"tags":["General"],"summary":"Obtiene información sobre las carreras universitarias que ofrece un centro específico.","operationId":"2096d3c68d7081e7d8c6e90b28bda9e7","parameters":[{"name":"sigla","in":"query","description":"Siglas del Centro Universitario","required":true}],"responses":{"200":{"description":"Json múltiple por cada carrera del centro especificado","content":{"application/json":{"schema":{"properties":{"descripcion":{"type":"string"},"clave":{"type":"string"}},"type":"object"}}}},"404":{"description":"Error: Not Found","content":{"application/json":{"schema":{"properties":{"error":{"description":"Descripción del error","type":"string","nullable":"false"}},"type":"object"}}}},"500":{"description":"Error: response status is 500","content":{"application/json":{"schema":{"properties":{"error":{"description":"Descripción del error","type":"string","nullable":"false"}},"type":"object"}}}}}}}}}
```
