> For the complete documentation index, see [llms.txt](https://docs.violetlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.violetlabs.com/es/aplicaciones/p/precoro.md).

# Precoro

## **Conectar Precoro en Violet**

Para conectar Precoro en Violet, necesitarás generar un token de API. Abre el [Claves de acceso API](https://app.precoro.com/manage/user/apitokens) página y haz clic en **Generar clave API.** Copia la clave y continúa con las instrucciones a continuación.

1. En [Violet](https://app.violetlabs.com/) (o [VioletGov](https://app.violetgov.com/)), navega a **Integraciones** y haz clic  <img src="/files/c9a1ccb6a5ec424f079229735ae4ac79c45a8d83" alt="" data-size="line">.&#x20;
2. Seleccione <img src="/files/b44d634de8e8250fd0f17a2d1c02372b8c64368e" alt="" data-size="line">**Precoro**

\[Opcional] Asigne permisos a los usuarios o grupos de usuarios que pueden ver los datos o editar las credenciales:

<figure><img src="/files/9bde6063db1d7fdbbb7d044eb39991cc0055d692" alt="" width="375"><figcaption></figcaption></figure>

3. Proporcione su clave API y haga clic **Conectar**.
4. Una vez conectado, configura tu integración (opcional), luego haz clic **Crear.** ¡Listo!

## Creando un Webhook para Violet en Precoro

Opcionalmente, puedes configurar un webhook en Precoro que permitirá a Violet obtener datos de manera basada en eventos. Esto también ayuda a minimizar el impacto de los límites de la API que Precoro impone sobre el número de solicitudes que procesará.&#x20;

El webhook notificará a Violet cuando algo en Precoro haya sido creado o actualizado, permitiendo a Violet obtener esa nueva información en \[casi] tiempo real.

Para agregar un webhook, sigue las instrucciones a continuación:

1. Navega a [app.precoro.us](https://app.precoro.us/manage/webhook_notification_configurations)​
2. Haga clic en **Nuevo Webhook**
3. En la **Endpoint de tu webhook** ingresa `https://`**`<tu_dominio_violet>`**`/api/violet-entity-fetch/webhook?applicationId=b0a5e080-662a-47b5-a1a2-3466a1d02317`, con tu URL de Violet como  **\<tu\_dominio\_violet>**. \
   \
   Por ejemplo, si tu dominio de Violet es **acme.violetlabs.com**, debes ingresar `https://acme.violetlabs.com/api/violet-entity-fetch/webhook?applicationId=b0a5e080-662a-47b5-a1a2-3466a1d02317`.
4. Bajo **Selecciona qué eventos rastrear con el webhook**, selecciona el `Crear` y `Actualizar` casillas para ***Orden de compra***, ***Solicitud de compra***, y ***Factura***.
5. Haga clic en **Guardar**.
6. Por último, asegúrate de que el webhook esté cambiado a `Activado`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.violetlabs.com/es/aplicaciones/p/precoro.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
