> For the complete documentation index, see [llms.txt](https://api.govtech.esempla.systems/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.govtech.esempla.systems/sso/api-admin.md).

# API Admin

## Activarea Provaiderilor unui proect

<mark style="color:green;">`POST`</mark> `https://sso.esempla.systems/api/v1/assignProvider`

#### Headers

| Name      | Type   | Description                   |
| --------- | ------ | ----------------------------- |
| partnerid | string | Identificatorul Provaiderului |

#### Request Body

| Name         | Type   | Description                             |
| ------------ | ------ | --------------------------------------- |
| project\_id  | string | id -ul proectului                       |
| provider\_id | string | id -ul provaiderului care va fi activat |

{% tabs %}
{% tab title="200 Exemplu rezultatului corect" %}

```javascript
provaiderul a fost activat
{
    "status": true
}


eroarea apare cin project_id sau provider_id sunt indicate incorect
{
    "status": false,
    "errors": "Incorrect project_id or provider_id"
}
```

{% endtab %}

{% tab title="403 Eroarea apare cin  provaiderul este deja activat, sau indicat incorect" %}

```
{
    "name": "Forbidden",
    "message": "",
    "code": 0,
    "status": 403
}
```

{% endtab %}

{% tab title="404 Problema cu metoda, este setata incorect" %}

```
{
    "name": "Not Found",
    "message": "Page not found.",
    "code": 0,
    "status": 404,
    "previous": {
        "name": "Invalid Route",
        "message": "Unable to resolve the request \"v1/assignProvide\".",
        "code": 0
    }
}
```

{% endtab %}
{% endtabs %}

## Crearea Organizatiei

<mark style="color:green;">`POST`</mark> `https://sso.esempla.systems/api/v1/createOrganization`

#### Headers

| Name      | Type   | Description                   |
| --------- | ------ | ----------------------------- |
| partnerid | string | Identificatorul Provaiderului |

#### Request Body

| Name        | Type   | Description                                |
| ----------- | ------ | ------------------------------------------ |
| name        | string | denumirea Organizatiei                     |
| idno        | string |                                            |
| status\_id  | string | indicam cifra " 1 ", indica statutul activ |
| description | string | descrierea Organizatiei                    |

{% tabs %}
{% tab title="200 Exemplul rezultatului corect" %}

```
Organizaria a fost creata
{
    "status": true,
    "organization_id": 3,
    "secret_name": "Gm0ofdKWtRCA-3QjEgtECwNATp495zbB",
    "organization": "test123"
}


status_id a fost indicat incorect
{
    "status": false,
    "errors": {
        "status_id": [
            "Status ID is invalid."
        ]
    }
}
```

{% endtab %}

{% tab title="403 Eroarea apare cind provaiderul este indicat incorect" %}

```
{
    "name": "Forbidden",
    "message": "",
    "code": 0,
    "status": 403
}
```

{% endtab %}

{% tab title="404 Problema cu metodata, a fost indicata incorect" %}

```
{
    "name": "Not Found",
    "message": "Page not found.",
    "code": 0,
    "status": 404,
    "previous": {
        "name": "Invalid Route",
        "message": "Unable to resolve the request \"v1/createOrganizatio\".",
        "code": 0
    }
}
```

{% endtab %}
{% endtabs %}

## Crearea Proectului

<mark style="color:green;">`POST`</mark> `https://sso.esempla.systems/api/v1/createProject`

#### Headers

| Name      | Type   | Description                   |
| --------- | ------ | ----------------------------- |
| partnerid | string | Identificatorul Provaiderului |

#### Request Body

| Name             | Type   | Description                                          |
| ---------------- | ------ | ---------------------------------------------------- |
| name             | string | denumirea Proectului                                 |
| organization\_id | string | id -ul organizatiei care va apartinea acestui proect |
| status\_id       | string | indicam cifra " 1 ",  statutul va fi activ           |
| description      | string | descrierea provaiderului                             |

{% tabs %}
{% tab title="200 Exemplul rezultatului corect" %}

```
Proectul a fost creat
{
    "status": true,
    "project_id": 3,
    "project": "test123",
    "secret_token": "tA7wpJUu8Wk6vsVLPD0jhfDNjeqRE-zC"
}


status_id a fost indicat incorect
{
    "status": false,
    "errors": {
        "status_id": [
            "Status ID is invalid."
        ]
    }
}


organization_id a fost indicat incorect
{
    "status": false,
    "errors": {
        "organization_id": [
            "Organization ID is invalid."
        ]
    }
}
```

{% endtab %}

{% tab title="403 Provaiderul a fost indicat incorect" %}

```
{
    "name": "Forbidden",
    "message": "",
    "code": 0,
    "status": 403
}
```

{% endtab %}

{% tab title="404 Problema cu metodata, afost indicata incorect" %}

```
{
    "name": "Not Found",
    "message": "Page not found.",
    "code": 0,
    "status": 404,
    "previous": {
        "name": "Invalid Route",
        "message": "Unable to resolve the request \"v1/createProjec\".",
        "code": 0
    }
}
```

{% endtab %}
{% endtabs %}
