## 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"
}
```
