# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.govtech.esempla.systems/sso/api-admin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
