> For the complete documentation index, see [llms.txt](https://docs.struct.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.struct.com/pim3/tutorials/example-projects/working-with-the-api.md).

# Working with the API

### About the demo project

Use this demo project to get familiar with the Web API. This project shows examples of getting product-, variant and category data as well as how to create and update these.

Furthermore, examples are shown on how to search products and work with global lists through the API.

For full documentation of the API, view the [API reference](https://techdoc.struct.com/api-reference/)

### Getting started

The project is a complete Visual Studio solution, using the Struct.PIM.Api.Client, available in Nuget, to fetch data from a Struct PIM instance.

All you need to do, is unzip the downloaded project and set up the Url for your Struct PIM instance as well as an API key for that instance and you are good to go.

{% file src="/files/WO6TgadVGKy7o1mEX3kL" %}
Download demo project here
{% endfile %}

### Autogenerate C# classes

We provide a T4Template which, using the API, can autogenerate C# classes for you matching the models in Struct PIM, yielding strongly typed models for you to use with the API.

{% file src="/files/xTU8Lj35bLKmzvQhoCCX" %}
Download T4Template here
{% endfile %}

### TLS

Depending on the environment you are connecting to you may need to specify TLS.

For the application using the Struct.PIM.Api.Client, specify below:

```csharp
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
```


---

# 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.struct.com/pim3/tutorials/example-projects/working-with-the-api.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.
