# 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="<https://3609403033-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZJAMIKVcqchSDbt4A7DE%2Fuploads%2FrX1cSbGkyU52ylutvykp%2Fstructpimapiv3demo.zip?alt=media&token=151c91bf-fd4f-4ee9-a555-defd3c72cbea>" %}
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="<https://3609403033-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZJAMIKVcqchSDbt4A7DE%2Fuploads%2FqO7TuWrxNw8aEw5BBT57%2Fstructpimmodelgenerator_26062023.zip?alt=media&token=579be0a7-c8f5-48d0-8c02-49405e1e6787>" %}
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
```
