Introduction
Struct PIM ships with a standard REST API, usable for all integration purposes. Use this to integrate your applications with StructPIM. Use webhooks in combination with API integrations to achieve near-real-time integrations and data consequence manipulation
Authorization
In order to use the API, you need to set up an API key. This is done in the Settings -> API configuration node in StructPIM.
Once you have generated an API key, you need to provide it in the Authorization header of every request you make to the API in order to get access. If you have not got access to the endpoint you are requesting with the provided API key, you will get a 403, Forbidden response code
Swagger support
The Struct PIM REST Api supports Swagger for documentation. We recommend installing the Swashbuckle Nuget package, if you are running your own installation of Struct PIM, as this will give you complete and comprehensive API documentation with a web interface in which you can directly try out the API endpoints.
If you are running Struct PIM as a Service (SaaS), Swagger is installed on your applications' API by default. You can access it by going to api.[UrlToSaasPIM]/swagger.
C# API client
We provide a C# API client, available in the official Nuget feed (Struct.PIM.Api.Client). We recommend using this, if you are working in C#, as it gets you going a lot faster compared to wrapping the API yourself. The client is compiled for .NET standard 2.0, making it available to most .NET projects.
Demo project
If you are implementing your integration using .NET and C#, we recommend having a look at our Demo project, which shows examples on how to get data through the Api and how to insert data using the Api (Go to demo project).
Autogenerate models
If you are using C#, a t4template can be used to autogenerate C# classes matching the model setup of your products, variants, categories and global lists in your PIM setup, making integration through the API even easier (Go to T4Template download).
Performance
The API is build for updating and reading large amounts of data in short time. All areas has extended support for batching data together to make the updating as smooth as possible.
We do not recommend using the API as a direct source for presentation if performance is the main focus.
You should always transfer the data needed for presentation, from the API, to a fast read and search friendly cache layer.
This ensures optimal performance at all times.