# Especificaciones de la API

### **Puntos Finales (Endpoints)** <a href="#puntos-finales-endpoints" id="puntos-finales-endpoints"></a>

A continuación se detallan los puntos finales (endpoints) de la API, los métodos HTTP soportados, los tipos de datos esperados y los formatos de las respuestas.

### /notify-scrapper

* **URL del Endpoint**: `${URL_ENDPOINT}/notity-scrapper`
* **Método**: `POST`
* **Descripción**: Ejecuta la recolecion de la data.
* **Parámetros de Entrada**: `ExecutionMessage`
* **Ejemplo de ExecutionDto**:

```bash
{
  "id": "execution-id",
  "data": {
    "fromDate": "2024-01-01",
    "toDate": "2024-01-02",
    "campaignSlug": "campaign-slug-example",
    "replaceStatic": true,
    "executeBy": "EXECUTION_BY_ENUM",
    "reportType": "REPORT_TYPE_ENUM",
    "dataSource": "DATA_SOURCE_ENUM"
  },
  "retryAttempts": 3,
  "status": "EXECUTION_STATUS_ENUM",
  "hasMaxRetries": false
}
```

* **Ejemplo de Solicitud**:

```jsx
POST /notify-scrapper HTTP/1.1
Host: ${URL_ENDPOINT}
Content-Type: application/json
```

### Definicion de Tipos <a href="#definicion-de-tipos" id="definicion-de-tipos"></a>

#### ExecutionMessage <a href="#executionmessage" id="executionmessage"></a>

```python
class ExecutionMessage(BaseModel):
    id: str
    data: DataCollectStart
    retryAttempts: int
    status: ExecutionStatusEnum
    hasMaxRetries: bool
```

#### DataCollectStart <a href="#datacollectstart" id="datacollectstart"></a>

```python
class DataCollectStart(BaseModel):
    fromDate: str
    toDate: str
    campaignSlug: str
    replaceStatic: bool
    executeBy: str
    reportType: str
    dataSource: str
```

#### ExecutionStatusEnum <a href="#executionstatusenum" id="executionstatusenum"></a>

```python
class ExecutionStatusEnum(Enum):
    QUEUED = "QUEUED"
    PROCESSING = "PROCESSING"
    RETRYING = "RETRYING"
    SUCCESS = "SUCCESS"
    FAILED = "FAILED"
    CANCELLED = "CANCELLED"
    TIMEOUT = "TIMEOUT"
```

<br>


---

# 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://docs-affiliates.inlaze.com/reportes/data-collector/especificaciones-de-la-api.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.
