# Recommendations

Mediante esta api puedes obtener las recomendaciones para cada algoritmo.&#x20;

* Version: 1.0
* Base URL: <https://go-discover.goshops.com>
* API body: `application/json`
* API response: `application/json`

## Devuelve recomendaciones para un usuario

<mark style="color:green;">`POST`</mark> `/reco/user-recommendations`

#### Headers

| Name                                        | Type   | Description                                                       |
| ------------------------------------------- | ------ | ----------------------------------------------------------------- |
| x-api-key<mark style="color:red;">\*</mark> | String | Api key para autorizar el llamado. Lo puedes obtener en el admin. |

#### Request Body

| Name                                    | Type   | Description                                    |
| --------------------------------------- | ------ | ---------------------------------------------- |
| user<mark style="color:red;">\*</mark>  | String | Id del cliente                                 |
| index<mark style="color:red;">\*</mark> | String | Id del proyecto. Lo puedes obtener en el admin |

{% tabs %}
{% tab title="200: OK Devuelve las recomendaciones para el usuario" %}

```javascript
{
    recoId: "Id de la recomendacion",
    items: [
    ] 
}
```

{% endtab %}

{% tab title="400: Bad Request Alguno de los campos requeridos ausente" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401 api key invalido o ausente" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Devuelve los items que frecuentemente se compran juntos

<mark style="color:green;">`POST`</mark> `/reco/fbt`

#### Headers

| Name                                        | Type   | Description                                                       |
| ------------------------------------------- | ------ | ----------------------------------------------------------------- |
| x-api-key<mark style="color:red;">\*</mark> | String | Api key para autorizar el llamado. Lo puedes obtener en el admin. |

#### Request Body

| Name                                    | Type   | Description                                    |
| --------------------------------------- | ------ | ---------------------------------------------- |
| index<mark style="color:red;">\*</mark> | String | Id del proyecto. Lo puedes obtener en el admin |
| item<mark style="color:red;">\*</mark>  | String |                                                |

{% tabs %}
{% tab title="200: OK Devuelve los items recomendados" %}

```javascript
{
    recoId: "Id de la recomendacion",
    items: [
    ] 
}
```

{% endtab %}

{% tab title="400: Bad Request Alguno de los campos requeridos ausente" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized api key invalido o ausente" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Devuelve los items que son trendings

<mark style="color:green;">`POST`</mark> `/rec/trendings`

#### Headers

| Name                                        | Type   | Description                                                       |
| ------------------------------------------- | ------ | ----------------------------------------------------------------- |
| x-api-key<mark style="color:red;">\*</mark> | String | Api key para autorizar el llamado. Lo puedes obtener en el admin. |

#### Request Body

| Name                                    | Type   | Description                                    |
| --------------------------------------- | ------ | ---------------------------------------------- |
| index<mark style="color:red;">\*</mark> | String | Id del proyecto. Lo puedes obtener en el admin |

{% tabs %}
{% tab title="200: OK Devuelve los items recomendados" %}

```javascript
{
    recoId: "Id de la recomendacion",
    items: [
    ] 
}
```

{% endtab %}

{% tab title="400: Bad Request Alguno de los campos requeridos ausente" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized api key inválido o ausente" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Devuelve los items similares a otro item

<mark style="color:green;">`POST`</mark> `/reco/similar`

#### Headers

| Name                                        | Type   | Description                                                       |
| ------------------------------------------- | ------ | ----------------------------------------------------------------- |
| x-api-key<mark style="color:red;">\*</mark> | String | Api key para autorizar el llamado. Lo puedes obtener en el admin. |

#### Request Body

| Name                                    | Type   | Description                                     |
| --------------------------------------- | ------ | ----------------------------------------------- |
| index<mark style="color:red;">\*</mark> | String | Id del proyecto. Lo puedes obtener en el admin. |
| item<mark style="color:red;">\*</mark>  | String | Id del item que se quiere obtener similares     |

{% tabs %}
{% tab title="200: OK Devuelve los items recomendados" %}

```javascript
{
    recoId: "Id de la recomendacion",
    items: [
    ] 
}
```

{% endtab %}

{% tab title="400: Bad Request lguno de los campos requeridos ausente" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401 api key inválido o ausente" %}

```javascript
{
    // Response
}
```

{% 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://academy.gopersonal.ai/developers/api-reference/recommendations.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.
