# Stores

## Retrieves a paginated list of stores.

`StoreListStoresResponse Stores.ListStores(StoreListStoresParams?parameters, CancellationTokencancellationToken = default)`

**get** `/api/v2/public/stores`

Retrieves a paginated list of stores.

### Parameters

- `StoreListStoresParams parameters`

  - `Boolean isWarehouse`

  - `string pageSize`

  - `string pageStart`

  - `string searchText`

  - `string secondaryKey`

### Returns

- `class StoreListStoresResponse:`

  Generic paginated response wrapper.

  - `required Int PageSize`

    Maximum number of items returned per page.

  - `required Int PageStart`

    Current page number (1-based).

  - `required Long TotalCount`

    Total number of records matching the query across all pages.

  - `IReadOnlyList<List>? List`

    Collection of items for the current page.

    - `required Long ID`

      Internal store identifier.

    - `required Boolean IsActive`

      Whether the store is active.

    - `required Boolean IsActiveDataExchange`

      Whether data exchange is active for this store.

    - `required Boolean IsWarehouse`

      Whether the store is a warehouse.

    - `string? AreaDescription`

      Description of the area.

    - `string? AreaID`

      Area identifier the store belongs to.

    - `Long? AreaManagerUserID`

    - `string? City`

      City the store is located in.

    - `string? CostCenter`

    - `string? CountryCode`

      ISO country code.

    - `string? CountryName`

      Country name.

    - `string? EslServerPath`

    - `IReadOnlyList<FreeField>? FreeFields`

      - `string? Label`

      - `Int? SortOrder`

      - `string? Value`

    - `string? IPRangeBegin`

    - `string? IPRangeEnd`

    - `string? LocalServerPath`

    - `string? OpeningHours`

    - `IReadOnlyList<OrderingSchema>? OrderingSchema`

      - `required Int Day`

      - `required Int DeliveryOffset`

      - `required Int OrderingOffset`

      - `required string Time`

      - `string? CategoryCode`

      - `string? WeekNumbers`

    - `string? PhoneNumber`

    - `Int? PriceLineID`

      Price line applied to the store.

    - `IReadOnlyList<Printer>? Printers`

      - `required Boolean IsBluetooth`

      - `string? PrinterIP`

      - `string? PrinterName`

      - `Int? PrinterType`

    - `string? SecondaryKey`

    - `string? StoreGln`

    - `string? StoreName`

      Display name of the store.

    - `DateTimeOffset? StoreNextDeliveryDatetime`

    - `DateTimeOffset? StoreNextOrderingDatetime`

    - `string? StoreNumber`

      Unique store number.

    - `string? StoreStockPool1`

    - `string? StoreStockPool10`

    - `string? StoreStockPool2`

    - `string? StoreStockPool3`

    - `string? StoreStockPool4`

    - `string? StoreStockPool5`

    - `string? StoreStockPool6`

    - `string? StoreStockPool7`

    - `string? StoreStockPool8`

    - `string? StoreStockPool9`

    - `string? StoreTypeCode`

    - `string? StoreTypeDescription`

    - `string? TertiaryKey`

    - `string? WarehouseID`

  - `IReadOnlyDictionary<string, JsonElement>? ListBody`

    Additional body-level metadata for the list.

  - `IReadOnlyDictionary<string, IReadOnlyList<string>>? ListFilters`

    Active filter criteria applied to the result set, keyed by field name.

  - `Int? NextPage`

    Next page number, or null when on the last page.

  - `Long? PreviousPage`

    Previous page number, or null when on the first page.

  - `string? ProjectLastModifiedDate`

    Last modified date/time of the project.

  - `string? ScrollID`

    Opaque scroll identifier for deep-pagination scenarios.

  - `string? ServerTime`

    Server UTC date/time when the response was generated.

  - `string? SortColumn`

    Column name the results are sorted by.

  - `string? SortOrder`

    Sort direction (asc or desc).

  - `string? TaskLastModifiedDate`

    Last modified date/time of the task.

### Example

```csharp
StoreListStoresParams parameters = new();

var response = await client.Stores.ListStores(parameters);

Console.WriteLine(response);
```

#### Response

```json
{
  "page_size": 0,
  "page_start": 0,
  "total_count": 0,
  "list": [
    {
      "id": 0,
      "is_active": true,
      "is_active_data_exchange": true,
      "is_warehouse": true,
      "area_description": "area_description",
      "area_id": "area_id",
      "area_manager_user_id": 0,
      "city": "city",
      "cost_center": "cost_center",
      "country_code": "country_code",
      "country_name": "country_name",
      "esl_server_path": "esl_server_path",
      "free_fields": [
        {
          "label": "label",
          "sort_order": 0,
          "value": "value"
        }
      ],
      "ip_range_begin": "ip_range_begin",
      "ip_range_end": "ip_range_end",
      "local_server_path": "local_server_path",
      "opening_hours": "opening_hours",
      "ordering_schema": [
        {
          "day": 0,
          "delivery_offset": 0,
          "ordering_offset": 0,
          "time": "time",
          "category_code": "category_code",
          "week_numbers": "week_numbers"
        }
      ],
      "phone_number": "phone_number",
      "price_line_id": 0,
      "printers": [
        {
          "is_bluetooth": true,
          "printer_ip": "printer_ip",
          "printer_name": "printer_name",
          "printer_type": 0
        }
      ],
      "secondary_key": "secondary_key",
      "store_gln": "store_gln",
      "store_name": "store_name",
      "store_next_delivery_datetime": "2019-12-27T18:11:19.117Z",
      "store_next_ordering_datetime": "2019-12-27T18:11:19.117Z",
      "store_number": "store_number",
      "store_stock_pool_1": "store_stock_pool_1",
      "store_stock_pool_10": "store_stock_pool_10",
      "store_stock_pool_2": "store_stock_pool_2",
      "store_stock_pool_3": "store_stock_pool_3",
      "store_stock_pool_4": "store_stock_pool_4",
      "store_stock_pool_5": "store_stock_pool_5",
      "store_stock_pool_6": "store_stock_pool_6",
      "store_stock_pool_7": "store_stock_pool_7",
      "store_stock_pool_8": "store_stock_pool_8",
      "store_stock_pool_9": "store_stock_pool_9",
      "store_type_code": "store_type_code",
      "store_type_description": "store_type_description",
      "tertiary_key": "tertiary_key",
      "warehouse_id": "warehouse_id"
    }
  ],
  "list_body": {
    "foo": "bar"
  },
  "list_filters": {
    "foo": [
      "string"
    ]
  },
  "next_page": 0,
  "previous_page": 0,
  "project_last_modified_date": "project_last_modified_date",
  "scroll_id": "scroll_id",
  "server_time": "server_time",
  "sort_column": "sort_column",
  "sort_order": "sort_order",
  "task_last_modified_date": "task_last_modified_date"
}
```

## Creates or updates stores.

`StoreCreateStoresResponse Stores.CreateStores(StoreCreateStoresParams?parameters, CancellationTokencancellationToken = default)`

**post** `/api/v2/public/stores`

Creates or updates stores in bulk. When `flush` is true, removes existing stores before inserting.

### Parameters

- `StoreCreateStoresParams parameters`

  - `Boolean flush`

    Query param: When true, removes existing stores before inserting.

  - `IReadOnlyList<Store>? stores`

    Body param: The list of stores to create or update.

    - `required Boolean IsActive`

      Whether the store is active.

    - `required Boolean IsActiveDataExchange`

      Whether data exchange is active for this store.

    - `required Boolean IsWarehouse`

      Whether the store is a warehouse.

    - `required string StoreName`

      Display name of the store.

    - `required string StoreNumber`

      Unique store number identifier.

    - `string? Address`

      Street address of the store.

    - `string? AreaDescription`

      Description of the area.

    - `string? AreaID`

      Area identifier the store belongs to.

    - `Long? AreaManagerUserID`

      User identifier of the area manager assigned to the store.

    - `string? City`

      City of the store.

    - `string? ContactDetails`

      Free-form contact details for the store.

    - `string? CostCenter`

      Cost center associated with the store.

    - `string? CountryCode`

      ISO country code.

    - `string? CountryName`

      Country name.

    - `string? EslServerPath`

      Path to the ESL server.

    - `IReadOnlyList<FreeField>? FreeFields`

      Custom free-field key/value pairs.

      - `required Int SortOrder`

        Sort order for display purposes.

      - `string? Key`

        Free-field key.

      - `string? Value`

        Free-field value.

    - `string? InventLocation`

      Inventory location associated with the store.

    - `string? IPRangeBegin`

      Start of the store's IP range.

    - `string? IPRangeEnd`

      End of the store's IP range.

    - `string? LegalEntity`

      Legal entity associated with the store.

    - `string? LocalServerPath`

      Path to the local server.

    - `IReadOnlyList<OpeningHour>? OpeningHours`

      Opening hours for the store, as key/value pairs (e.g. day → 09:00-18:00).

      - `required Int SortOrder`

        Sort order for display purposes.

      - `string? Key`

        Free-field key.

      - `string? Value`

        Free-field value.

    - `IReadOnlyList<OrderingSchema>? OrderingSchema`

      Ordering and delivery calendar entries for the store.

      - `required Int Day`

        Day of the week (1=Monday, 7=Sunday).

      - `required Int DeliveryOffset`

        Delivery offset in days.

      - `required Int OrderingOffset`

        Ordering offset in days.

      - `required DateTimeOffset Time`

        Time of day for the calendar entry.

      - `string? CategoryCode`

        Optional category code this calendar entry applies to.

      - `string? WeekNumbers`

        Comma-separated week numbers when this entry applies.

    - `string? PhoneNumber`

      Contact phone number of the store.

    - `string? PostalCode`

      Postal code of the store.

    - `Int? PriceLineID`

      Identifier of the price line applied to the store.

    - `string? StoreGln`

      Global Location Number (GLN) of the store.

    - `DateTimeOffset? StoreNextDeliveryDatetime`

      Next scheduled delivery datetime for the store.

    - `DateTimeOffset? StoreNextOrderingDatetime`

      Next scheduled ordering datetime for the store.

    - `IReadOnlyList<StorePrinter>? StorePrinters`

      Printers configured at the store.

      - `required Boolean IsBluetooth`

        Whether the printer connects via Bluetooth.

      - `required Int PrinterType`

        Numeric printer type identifier.

      - `string? PrinterIP`

        IP address of the printer.

      - `string? PrinterName`

        Display name of the printer.

      - `string? PrinterSerial`

        Serial number of the printer.

      - `string? Vendor`

        Vendor / manufacturer of the printer.

    - `string? StoreStockPool1`

      Name of stock pool 1.

    - `string? StoreStockPool10`

      Name of stock pool 10.

    - `string? StoreStockPool2`

      Name of stock pool 2.

    - `string? StoreStockPool3`

      Name of stock pool 3.

    - `string? StoreStockPool4`

      Name of stock pool 4.

    - `string? StoreStockPool5`

      Name of stock pool 5.

    - `string? StoreStockPool6`

      Name of stock pool 6.

    - `string? StoreStockPool7`

      Name of stock pool 7.

    - `string? StoreStockPool8`

      Name of stock pool 8.

    - `string? StoreStockPool9`

      Name of stock pool 9.

    - `string? StoreTypeCode`

      Code identifying the store type.

    - `string? StoreTypeDescription`

      Description of the store type.

### Returns

- `class StoreCreateStoresResponse:`

  Standard success response returned by mutation endpoints.

  - `required Boolean Success`

    Indicates whether the operation completed successfully.

  - `string? Data`

    Optional data payload returned by the operation.

  - `string? Message`

    Human-readable message describing the result.

### Example

```csharp
StoreCreateStoresParams parameters = new();

var response = await client.Stores.CreateStores(parameters);

Console.WriteLine(response);
```

#### Response

```json
{
  "success": true,
  "data": "data",
  "message": "message"
}
```
