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

# Poll objednávok pre Elall

GET https://segat-test.webland.sk/api/v1/elall/orders

Vráti objednávky určené na spracovanie v Elall z tabuliek `elall_orders` (testovací rozsah integrácie, legacy import `orders` sa nečíta). Predvolene len `pending_elall`. Položky obsahujú **ean** a **stock_code**.

Reference: https://docs.elall.webland.sk/api/orders/list

## Authentication

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

## Request

### Query parameters

- `since` (string, optional, nullable) — Vráti objednávky s created_at >= since (ISO 8601, napr. 2025-03-10T00:00:00Z).
- `elall_status` (enum, optional) — Filter: pending_elall (default), acknowledged, all.
  - Allowed values: `pending_elall`, `acknowledged`, `all`

### Headers

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

## Response

### 200

Successful Response

- `orders` (list of Order, required)
- `count` (integer, required)

## Errors

### 400 Bad Request Error

Neplatný formát parametra since

- `any`

### 401 Unauthorized Error

Neplatný alebo chýbajúci X-API-Key

- `any`

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### Order

- `order_id` (integer, required)
- `order_number` (string, required)
- `created_at` (datetime, required)
- `status` (string, required)
- `customer` (OrderCustomer, required)
- `items` (list of OrderItem, required)
- `subtotal` (double, required)
- `vat_total` (double, required)
- `total` (double, required)
- `currency` (string, optional, default: EUR)
- `elall_sync_status` (string, optional, nullable)
- `elall_reference` (string, optional, nullable)

### ValidationError

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

### OrderCustomer

- `name` (string, required)
- `email` (string, required)
- `phone` (string, optional, nullable)
- `ico` (string, optional, nullable)
- `dic` (string, optional, nullable)
- `address` (string, optional, nullable)
- `city` (string, optional, nullable)
- `zip_code` (string, optional, nullable)

### OrderItem

Položka objednávky pre Elall — identifikátor produktu: ean + stock_code.

- `name` (string, required)
- `quantity` (integer, required)
- `unit_price` (double, required)
- `total` (double, required)
- `ean` (string, optional, nullable) — EAN položky (z elall_order_items / objednávky e-shopu pri importe).
- `stock_code` (string, optional, nullable) — Skladové číslo z Elall (uložené v elall_order_items, zladené s product_catalog).

### ValidationErrorLocItems

### ValidationErrorCtx

## Examples

**Response**

```json
{
  "orders": [
    {
      "order_id": 1,
      "order_number": "string",
      "created_at": "2024-01-15T09:30:00Z",
      "status": "string",
      "customer": {
        "name": "string",
        "email": "string",
        "phone": "string",
        "ico": "string",
        "dic": "string",
        "address": "string",
        "city": "string",
        "zip_code": "string"
      },
      "items": [
        {
          "name": "string",
          "quantity": 1,
          "unit_price": 1.1,
          "total": 1.1,
          "ean": "string",
          "stock_code": "string"
        }
      ],
      "subtotal": 1.1,
      "vat_total": 1.1,
      "total": 1.1,
      "currency": "EUR",
      "elall_sync_status": "string",
      "elall_reference": "string"
    }
  ],
  "count": 1
}
```

**SDK Code**

```python
import requests

url = "https://segat-test.webland.sk/api/v1/elall/orders"

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

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

print(response.json())
```

```javascript
const url = 'https://segat-test.webland.sk/api/v1/elall/orders';
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/elall/orders"

	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/elall/orders")

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

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

```csharp
using RestSharp;

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