> 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 List Sync Runs

GET https://segat-test.webland.sk/api/v1/admin/elall/sync-runs

Reference: https://docs.segat.webland.sk/api/admin/admin-elall-audit/admin-elall-list-sync-runs-api-v-1-admin-elall-sync-runs-get

## Authentication

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

## Request

### Query parameters

- `request_id` (string, optional, nullable)
- `source_type` (string, optional, nullable)
- `success` (boolean, optional, nullable)
- `since` (datetime, optional, nullable) — Runs started at or after
- `limit` (integer, optional, default: 50)
- `offset` (integer, optional, default: 0)

### Headers

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

## Response

### 200

Successful Response

- `runs` (list of ElallSyncRunResponse, required)
- `count` (integer, required)

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### ElallSyncRunResponse

- `id` (integer, required)
- `request_id` (string, required)
- `source_type` (string, required)
- `started_at` (datetime, required)
- `success` (boolean, required)
- `items_total` (integer, required)
- `items_updated` (integer, required)
- `unknown_products` (integer, required)
- `source_ref` (string, optional, nullable)
- `note` (string, optional, nullable)
- `actor` (string, optional, nullable)
- `completed_at` (datetime, optional, nullable)
- `error_message` (string, optional, nullable)
- `change_events_count` (integer, 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
{
  "runs": [
    {
      "id": 1,
      "request_id": "string",
      "source_type": "string",
      "started_at": "2024-01-15T09:30:00Z",
      "success": true,
      "items_total": 1,
      "items_updated": 1,
      "unknown_products": 1,
      "source_ref": "string",
      "note": "string",
      "actor": "string",
      "completed_at": "2024-01-15T09:30:00Z",
      "error_message": "string",
      "change_events_count": 1
    }
  ],
  "count": 1
}
```

**SDK Code**

```python
import requests

url = "https://segat-test.webland.sk/api/v1/admin/elall/sync-runs"

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/sync-runs';
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/sync-runs"

	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/sync-runs")

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/sync-runs")
  .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/sync-runs', [
  'headers' => [
    'X-API-Key' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://segat-test.webland.sk/api/v1/admin/elall/sync-runs");
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/sync-runs")! 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()
```