> 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/apps/p/precoro.md).

# Precoro

## **Connect Precoro in Violet**

To connect Precoro in Violet, you will need to generate an API token. Open the [API Access Keys](https://app.precoro.com/manage/user/apitokens) page and click **Generate API Key.** Copy the key and continue on to the instructions below.

1. In [Violet](https://app.violetlabs.com/) (or [VioletGov](https://app.violetgov.com/)), navigate to **Integrations** and click  <img src="/files/IS4aq5Ad1Nr6RFUu4LLg" alt="" data-size="line">.&#x20;
2. Select <img src="/files/i0WosWnKTLQlxsCAxAXU" alt="" data-size="line">**Precoro**

\[Optional] Assign permissions to which users or user groups can view the data or edit the credentials:

<figure><img src="/files/867CgQMVgSvcA43QHXeZ" alt="" width="375"><figcaption></figcaption></figure>

3. Provide your API Key and click **Connect**.
4. Once connected, configure your integration (optional), then click **Create.** You're done!

## Creating a Webhook for Violet in Precoro

Optionally, you can configure a webhook in Precoro that will allow Violet to fetch data on an event-driven basis. This also helps minimize the impact of API limits that Precoro places on the number of requests that it will process.&#x20;

The webhook will notify Violet when something in Precoro has been created or updated, allowing Violet to fetch that new information in \[near] real-time.

To add a webhook, follow the instructions below:

1. Navigate to [app.precoro.us](https://app.precoro.us/manage/webhook_notification_configurations)​
2. Click **New Webhook**
3. In the **Endpoint of your webhook** field, enter `https://`**`<your_violet_domain>`**`/api/violet-entity-fetch/webhook?applicationId=b0a5e080-662a-47b5-a1a2-3466a1d02317`, with your Violet URL as  **\<your\_violet\_domain>**. \
   \
   For example, if your Violet domain is **acme.violetlabs.com**, you should enter `https://acme.violetlabs.com/api/violet-entity-fetch/webhook?applicationId=b0a5e080-662a-47b5-a1a2-3466a1d02317`.
4. Under **Select what events to track with webhook**, select the `Create` and `Update` checkboxes for ***Purchase Order***, ***Purchase Requisition***, and ***Invoice***.
5. Click **Save**.
6. Last, ensure the webhook is switched to `Activated`.


---

# 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/apps/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.
