> For the complete documentation index, see [llms.txt](https://kb.bevica.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.bevica.com/documentation/guides/item-market-valuations/liv-ex_lwin.md).

# Liv-ex LWIN

Link items to Liv-ex LWIN identifiers for price retrieval.

Bevica lets you store Liv-ex LWIN codes against your items. This can then be used as the basis for integration with other LWIN related services. Additionally, using search capabilities provided by Liv-ex APIs you can search for LWIN codes based on your item's description.

Liv-ex is the global marketplace for the wine trade with 530+ trusted merchant members and over £80m of live opportunities across 16,000 different products.

{% hint style="info" %}
Liv-ex LWINs are managed by the Bevica Market Values extension. Please contact your system administrator or your TVT contact if you would like further information or would like to install Bevica Market Values.
{% endhint %}

### Prerequisites

* Licenced by Liv-ex to access online data via API.
* Bevica Essentials extension installed.
* Bevica Market Valuation extension installed.
* Ability to manage Items.

### [Liv-ex.com](http://www.liv-ex.com)

* Information on what an **LWIN** is, how it works, and for a full download click here: <http://www.liv-ex.com/wwd/lwin/>
* Liv-ex provide full technical developers documentation, which can be found here: <http://www.liv-ex.com/solutions/solutions-developers/>
* LWIN Search data is provided by the **LWIN Search v1** API. Details here: [LWIN Search v1.pdf](https://bluehost-sites.s3-eu-west-1.amazonaws.com/LWIN_Search_v1.pdf)

### Setup

Some initial setup is required to establish the details to access the Liv-ex API services.

Search **Item Market Values Setup**, and then choose the related link. Populate the following fields.

| Field                     | Note                                                                                                                              |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| Liv-ex End Point (Search) | The API endpoint for LWIN searches: <https://api.liv-ex.com/lwin/search/v1/lwinSearch>                                            |
| Liv-ex End Point (Prices) | See Liv-ex Market Prices                                                                                                          |
| Liv-ex Key                | Enter your key provided by Liv-ex                                                                                                 |
| Liv-ex Secret             | Enter your secret provided by Liv-ex                                                                                              |
| Price Type                | See Liv-ex Market Prices                                                                                                          |
| Search Description        | Select which description (Description or Marketing Description) you want to use when searching for an LWIN on the Liv-ex API call |

### LWIN

LWINs are Liv-ex's unique reference ID for fine wines. The LWIN structure identifies the product itself using a 7 digit ID (LWIN7). Different vintages and formats are identified using the LWIN7 plus additional digits.

| Product                                                    | LWIN                        |
| ---------------------------------------------------------- | --------------------------- |
| Sassicaia, Tenuta San Guido, Bolgheri                      | 1102037 (LWIN7)             |
| Sassicaia, Tenuta San Guido, Bolgheri, 2015                | 11020372015 (LWIN11)        |
| Sassicaia, Tenuta San Guido, Bolgheri 2015 (75cl format)   | 1102037201500750 (LWIN16)   |
| Sassicaia, Tenuta San Guido, Bolgheri 2015 (6x75cl format) | 110203720150600750 (LWIN18) |

Bevica stores the LWIN7 against the item record, automatically calculating the LWIN18.

### To apply an LWIN to an Item

There are two ways you can apply the LWIN7 to an item:

1. **Manually**

   Navigate to the Item card and manually populate the LWIN7 field on the card. This field can also be populated in bulk using a **Configuration Package**.
2. **Using the Liv-ex API**

   From the Item Card/List ribbons, navigate to Related, Item, Liv-ex, **LWIN Search**. This will search the Liv-ex LWIN database for items with a similar name and display one or more results. Select the correct product and Bevica will populate the LWIN7 field for you. Bevica has no control over the results returned by Liv-ex, it relies on Liv-ex matching the Bevica description to their records.

Once the LWIN7 has been populated on the Item, Bevica automatically calculates the item's **LWIN18** value. This relies on the following fields being populated on the item card: **Vintage, Base Unit of Measure, Sales Unit of Measure, Unit Volume.**

Both the LWIN7 and LWIN18 fields are available on the Item Card & List (hidden by default). Alternatively, on the page, click the **Assist Edit** on the LWIN7 field, or on the page ribbon navigate to Related, Item, Liv-ex and select **Item LWIN Codes.** There should be two records here, one LWIN7 and the second LWIN18.

{% hint style="warning" %}
**Note**

If you see this message when trying to integrate with Liv-ex: '**The request was blocked by the runtime to prevent accidental use of production services**' Click here: ['Blocked by runtime' error](/documentation/guides/reference/troubleshooting/blocked_by_runtime_error.md)
{% endhint %}


---

# 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://kb.bevica.com/documentation/guides/item-market-valuations/liv-ex_lwin.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.
