# Use of Browse endpoints

{% tabs %}
{% tab title="HTML" %}
**GET** /v1/browse/products
{% endtab %}
{% endtabs %}

### Using the Browse Endpoint

When browsing entities using the browse endpoints in the PIM, specific parameters are required to define the search. Below is an example with the product entity, which is also applicable to the browse endpoints for the other entities. You can view the method header below with its expected parameters.

{% code title="C#" %}

```csharp
public BrowseProductsResultSet? Products(int page = 1, DateTimeOffset? lastModifiedAfter = null, bool includeArchived = false, bool renderValues = false)
```

{% endcode %}

**Input Parameters**

* `Page`: Specifies the page number.
* `LastModifiedAfter`: Filters results modified after a specified date.
* `IncludeArchived`: Includes archived products in the results.
* `RenderValues`: Determines if values should be rendered.

We can now use the `browse/products` endpoint to retrieve products from a specific page. Below is an example of retrieving products from page 1.

{% code title="C#" %}

```csharp
BrowseProductsResultSet? products = apiService._client.Browse.Products(1, null, false, false);
```

{% endcode %}

The data has been retrieved successfully, but the values are nested within a complex structure. This can be seen in attributes like `CountryOfOrigin` or `Description`, where their values appear as `[]` instead of displaying the actual content.

<figure><img src="https://2141378775-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuUonpFWM7AJ0xVVXV1tr%2Fuploads%2F5Nxir603WaBUaUgKUFyb%2Fimage.png?alt=media&#x26;token=817af1ee-0199-4930-b62b-31087ee51c36" alt=""><figcaption><p>Example of a browse/products result with RenderValues set to false</p></figcaption></figure>

However, by using the `RenderValues` parameter, you can modify the output to provide rendered, human-readable data. An example of this can be seen below.

{% code title="C#" %}

```csharp
BrowseProductsResultSet? products = apiService._client.Browse.Products(1, null, false, true);
```

{% endcode %}

<figure><img src="https://2141378775-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuUonpFWM7AJ0xVVXV1tr%2Fuploads%2FY3xXwj1dDXjXPqCdsQDM%2Fimage.png?alt=media&#x26;token=9cefb2d7-80c3-4b05-a881-2435933b1a27" alt=""><figcaption><p>Example of a browse/products result with RenderValues set to true</p></figcaption></figure>

With this we can see that values such as `CountryOfOrigin` and `Description` is now rendered, which will support further handling of data without the need for formatting.

### Display rendering of values

When browsing values, you can specify which attributes to display and their render pattern, for complex attributes. These settings are available when configuring or editing a complex attribute type. You can find this option under the "Hide advanced data type settings" dropdown.

<figure><img src="https://2141378775-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuUonpFWM7AJ0xVVXV1tr%2Fuploads%2F810z8CmSpox3bN2EB6dG%2Fimage.png?alt=media&#x26;token=13030b8f-1c46-4e76-a520-8ef3d4de99cf" alt=""><figcaption><p>Edit attribute page on a complex atrribute</p></figcaption></figure>

In this example, 'Height' and 'Width' are chosen for display, while 'Length' is excluded. The pattern determines how the attributes are rendered and in this example it is set so pattern the attributes is displayed in is "Height - Width".

<figure><img src="https://2141378775-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuUonpFWM7AJ0xVVXV1tr%2Fuploads%2F3vE5deSLHdLkvZy5TdcI%2Fimage.png?alt=media&#x26;token=afd5e126-e622-426b-9a4b-f425e3ded531" alt=""><figcaption><p>Example of Display rendering and Render pattern on a complex attribute</p></figcaption></figure>

Once 'Display rendering' and 'Render pattern' are set, the complex attribute values will align with this configuration when retrieved via the browse/products endpoint. Below, we use the `browse/variants` endpoint as an example.

<figure><img src="https://2141378775-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuUonpFWM7AJ0xVVXV1tr%2Fuploads%2F6SuRrEM8ThxMp558K514%2Fimage.png?alt=media&#x26;token=365b2ef6-a1a1-48ae-8c7d-3de3cdf588c2" alt=""><figcaption><p>Example of a browse/variants result with RenderValues set to true</p></figcaption></figure>
