> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.segat.webland.sk/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.segat.webland.sk/_mcp/server.

# Admin Elall Product History

GET https://segat-test.webland.sk/api/v1/admin/elall/products/{item_id}/history

Reference: https://docs.segat.webland.sk/api/admin/admin-elall-audit/admin-elall-product-history-api-v-1-admin-elall-products-item-id-history-get

## Authentication

- `X-API-Key` header (required) — Hodnota premennej prostredia ADMIN_API_KEY na strane Segat Sync.

## Request

### Path parameters

- `item_id` (string, required)

### Query parameters

- `since` (datetime, optional, nullable) — ISO 8601 — events applied at or after
- `field_group` (string, optional, nullable) — Filter: inventory, price, status, catalog
- `limit` (integer, optional, default: 50)

### Headers

- `X-API-Key` (string, required)

## Response

### 200

Successful Response

- `item_id` (string, required)
- `events` (list of ElallChangeEventResponse, required)
- `count` (integer, required)

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### ElallChangeEventResponse

- `id` (integer, required)
- `elall_sync_run_id` (integer, required)
- `item_id` (string, required)
- `field_group` (string, required)
- `field_name` (string, required)
- `source_type` (string, required)
- `applied_at` (datetime, required)
- `old_value` (string, optional, nullable)
- `new_value` (string, optional, nullable)
- `source_ref` (string, optional, nullable)
- `note` (string, optional, nullable)

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `input` (any, optional)
- `ctx` (ValidationErrorCtx, optional)

### ValidationErrorLocItems

- string
- integer

### ValidationErrorCtx

## Examples

**Response**

```json
{
  "item_id": "string",
  "events": [
    {
      "id": 1,
      "elall_sync_run_id": 1,
      "item_id": "string",
      "field_group": "string",
      "field_name": "string",
      "source_type": "string",
      "applied_at": "2024-01-15T09:30:00Z",
      "old_value": "string",
      "new_value": "string",
      "source_ref": "string",
      "note": "string"
    }
  ],
  "count": 1
}
```

**SDK Code**

```python
import requests

url = "https://segat-test.webland.sk/api/v1/admin/elall/products/item_id/history"

headers = {"X-API-Key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://segat-test.webland.sk/api/v1/admin/elall/products/item_id/history';
const options = {method: 'GET', headers: {'X-API-Key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://segat-test.webland.sk/api/v1/admin/elall/products/item_id/history"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-API-Key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://segat-test.webland.sk/api/v1/admin/elall/products/item_id/history")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://segat-test.webland.sk/api/v1/admin/elall/products/item_id/history")
  .header("X-API-Key", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://segat-test.webland.sk/api/v1/admin/elall/products/item_id/history', [
  'headers' => [
    'X-API-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://segat-test.webland.sk/api/v1/admin/elall/products/item_id/history");
var request = new RestRequest(Method.GET);
request.AddHeader("X-API-Key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["X-API-Key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://segat-test.webland.sk/api/v1/admin/elall/products/item_id/history")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```