# Stores

## Retrieves a paginated list of stores.

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

Retrieves a paginated list of stores.

### Query Parameters

- `is_warehouse: optional boolean`

- `page_size: optional string`

- `page_start: optional string`

- `search_text: optional string`

- `secondary_key: optional string`

### Returns

- `page_size: number`

  Maximum number of items returned per page.

- `page_start: number`

  Current page number (1-based).

- `total_count: number`

  Total number of records matching the query across all pages.

- `list: optional array of object { id, is_active, is_active_data_exchange, 38 more }`

  Collection of items for the current page.

  - `id: number`

    Internal store identifier.

  - `is_active: boolean`

    Whether the store is active.

  - `is_active_data_exchange: boolean`

    Whether data exchange is active for this store.

  - `is_warehouse: boolean`

    Whether the store is a warehouse.

  - `area_description: optional string`

    Description of the area.

  - `area_id: optional string`

    Area identifier the store belongs to.

  - `area_manager_user_id: optional number`

  - `city: optional string`

    City the store is located in.

  - `cost_center: optional string`

  - `country_code: optional string`

    ISO country code.

  - `country_name: optional string`

    Country name.

  - `esl_server_path: optional string`

  - `free_fields: optional array of object { label, sort_order, value }`

    - `label: optional string`

    - `sort_order: optional number`

    - `value: optional string`

  - `ip_range_begin: optional string`

  - `ip_range_end: optional string`

  - `local_server_path: optional string`

  - `opening_hours: optional string`

  - `ordering_schema: optional array of object { day, delivery_offset, ordering_offset, 3 more }`

    - `day: number`

    - `delivery_offset: number`

    - `ordering_offset: number`

    - `time: string`

    - `category_code: optional string`

    - `week_numbers: optional string`

  - `phone_number: optional string`

  - `price_line_id: optional number`

    Price line applied to the store.

  - `printers: optional array of object { is_bluetooth, printer_ip, printer_name, printer_type }`

    - `is_bluetooth: boolean`

    - `printer_ip: optional string`

    - `printer_name: optional string`

    - `printer_type: optional number`

  - `secondary_key: optional string`

  - `store_gln: optional string`

  - `store_name: optional string`

    Display name of the store.

  - `store_next_delivery_datetime: optional string`

  - `store_next_ordering_datetime: optional string`

  - `store_number: optional string`

    Unique store number.

  - `store_stock_pool_1: optional string`

  - `store_stock_pool_10: optional string`

  - `store_stock_pool_2: optional string`

  - `store_stock_pool_3: optional string`

  - `store_stock_pool_4: optional string`

  - `store_stock_pool_5: optional string`

  - `store_stock_pool_6: optional string`

  - `store_stock_pool_7: optional string`

  - `store_stock_pool_8: optional string`

  - `store_stock_pool_9: optional string`

  - `store_type_code: optional string`

  - `store_type_description: optional string`

  - `tertiary_key: optional string`

  - `warehouse_id: optional string`

- `list_body: optional map[unknown]`

  Additional body-level metadata for the list.

- `list_filters: optional map[array of string]`

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

- `next_page: optional number`

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

- `previous_page: optional number`

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

- `project_last_modified_date: optional string`

  Last modified date/time of the project.

- `scroll_id: optional string`

  Opaque scroll identifier for deep-pagination scenarios.

- `server_time: optional string`

  Server UTC date/time when the response was generated.

- `sort_column: optional string`

  Column name the results are sorted by.

- `sort_order: optional string`

  Sort direction (asc or desc).

- `task_last_modified_date: optional string`

  Last modified date/time of the task.

### Example

```http
curl https://api.colleqtive.net/api/v2/public/stores \
    -H "Authorization: $COLLEQTIVE_BEARER_TOKEN"
```

#### 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.

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

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

### Query Parameters

- `flush: optional boolean`

  When true, removes existing stores before inserting.

### Body Parameters

- `stores: optional array of object { is_active, is_active_data_exchange, is_warehouse, 39 more }`

  The list of stores to create or update.

  - `is_active: boolean`

    Whether the store is active.

  - `is_active_data_exchange: boolean`

    Whether data exchange is active for this store.

  - `is_warehouse: boolean`

    Whether the store is a warehouse.

  - `store_name: string`

    Display name of the store.

  - `store_number: string`

    Unique store number identifier.

  - `address: optional string`

    Street address of the store.

  - `area_description: optional string`

    Description of the area.

  - `area_id: optional string`

    Area identifier the store belongs to.

  - `area_manager_user_id: optional number`

    User identifier of the area manager assigned to the store.

  - `city: optional string`

    City of the store.

  - `contact_details: optional string`

    Free-form contact details for the store.

  - `cost_center: optional string`

    Cost center associated with the store.

  - `country_code: optional string`

    ISO country code.

  - `country_name: optional string`

    Country name.

  - `esl_server_path: optional string`

    Path to the ESL server.

  - `free_fields: optional array of object { sort_order, key, value }`

    Custom free-field key/value pairs.

    - `sort_order: number`

      Sort order for display purposes.

    - `key: optional string`

      Free-field key.

    - `value: optional string`

      Free-field value.

  - `invent_location: optional string`

    Inventory location associated with the store.

  - `ip_range_begin: optional string`

    Start of the store's IP range.

  - `ip_range_end: optional string`

    End of the store's IP range.

  - `legal_entity: optional string`

    Legal entity associated with the store.

  - `local_server_path: optional string`

    Path to the local server.

  - `opening_hours: optional array of object { sort_order, key, value }`

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

    - `sort_order: number`

      Sort order for display purposes.

    - `key: optional string`

      Free-field key.

    - `value: optional string`

      Free-field value.

  - `ordering_schema: optional array of object { day, delivery_offset, ordering_offset, 3 more }`

    Ordering and delivery calendar entries for the store.

    - `day: number`

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

    - `delivery_offset: number`

      Delivery offset in days.

    - `ordering_offset: number`

      Ordering offset in days.

    - `time: string`

      Time of day for the calendar entry.

    - `category_code: optional string`

      Optional category code this calendar entry applies to.

    - `week_numbers: optional string`

      Comma-separated week numbers when this entry applies.

  - `phone_number: optional string`

    Contact phone number of the store.

  - `postal_code: optional string`

    Postal code of the store.

  - `price_line_id: optional number`

    Identifier of the price line applied to the store.

  - `store_gln: optional string`

    Global Location Number (GLN) of the store.

  - `store_next_delivery_datetime: optional string`

    Next scheduled delivery datetime for the store.

  - `store_next_ordering_datetime: optional string`

    Next scheduled ordering datetime for the store.

  - `store_printers: optional array of object { is_bluetooth, printer_type, printer_ip, 3 more }`

    Printers configured at the store.

    - `is_bluetooth: boolean`

      Whether the printer connects via Bluetooth.

    - `printer_type: number`

      Numeric printer type identifier.

    - `printer_ip: optional string`

      IP address of the printer.

    - `printer_name: optional string`

      Display name of the printer.

    - `printer_serial: optional string`

      Serial number of the printer.

    - `vendor: optional string`

      Vendor / manufacturer of the printer.

  - `store_stock_pool_1: optional string`

    Name of stock pool 1.

  - `store_stock_pool_10: optional string`

    Name of stock pool 10.

  - `store_stock_pool_2: optional string`

    Name of stock pool 2.

  - `store_stock_pool_3: optional string`

    Name of stock pool 3.

  - `store_stock_pool_4: optional string`

    Name of stock pool 4.

  - `store_stock_pool_5: optional string`

    Name of stock pool 5.

  - `store_stock_pool_6: optional string`

    Name of stock pool 6.

  - `store_stock_pool_7: optional string`

    Name of stock pool 7.

  - `store_stock_pool_8: optional string`

    Name of stock pool 8.

  - `store_stock_pool_9: optional string`

    Name of stock pool 9.

  - `store_type_code: optional string`

    Code identifying the store type.

  - `store_type_description: optional string`

    Description of the store type.

### Returns

- `success: boolean`

  Indicates whether the operation completed successfully.

- `data: optional string`

  Optional data payload returned by the operation.

- `message: optional string`

  Human-readable message describing the result.

### Example

```http
curl https://api.colleqtive.net/api/v2/public/stores \
    -X POST \
    -H "Authorization: $COLLEQTIVE_BEARER_TOKEN"
```

#### Response

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

## Domain Types

### Store List Stores Response

- `StoreListStoresResponse object { page_size, page_start, total_count, 11 more }`

  Generic paginated response wrapper.

  - `page_size: number`

    Maximum number of items returned per page.

  - `page_start: number`

    Current page number (1-based).

  - `total_count: number`

    Total number of records matching the query across all pages.

  - `list: optional array of object { id, is_active, is_active_data_exchange, 38 more }`

    Collection of items for the current page.

    - `id: number`

      Internal store identifier.

    - `is_active: boolean`

      Whether the store is active.

    - `is_active_data_exchange: boolean`

      Whether data exchange is active for this store.

    - `is_warehouse: boolean`

      Whether the store is a warehouse.

    - `area_description: optional string`

      Description of the area.

    - `area_id: optional string`

      Area identifier the store belongs to.

    - `area_manager_user_id: optional number`

    - `city: optional string`

      City the store is located in.

    - `cost_center: optional string`

    - `country_code: optional string`

      ISO country code.

    - `country_name: optional string`

      Country name.

    - `esl_server_path: optional string`

    - `free_fields: optional array of object { label, sort_order, value }`

      - `label: optional string`

      - `sort_order: optional number`

      - `value: optional string`

    - `ip_range_begin: optional string`

    - `ip_range_end: optional string`

    - `local_server_path: optional string`

    - `opening_hours: optional string`

    - `ordering_schema: optional array of object { day, delivery_offset, ordering_offset, 3 more }`

      - `day: number`

      - `delivery_offset: number`

      - `ordering_offset: number`

      - `time: string`

      - `category_code: optional string`

      - `week_numbers: optional string`

    - `phone_number: optional string`

    - `price_line_id: optional number`

      Price line applied to the store.

    - `printers: optional array of object { is_bluetooth, printer_ip, printer_name, printer_type }`

      - `is_bluetooth: boolean`

      - `printer_ip: optional string`

      - `printer_name: optional string`

      - `printer_type: optional number`

    - `secondary_key: optional string`

    - `store_gln: optional string`

    - `store_name: optional string`

      Display name of the store.

    - `store_next_delivery_datetime: optional string`

    - `store_next_ordering_datetime: optional string`

    - `store_number: optional string`

      Unique store number.

    - `store_stock_pool_1: optional string`

    - `store_stock_pool_10: optional string`

    - `store_stock_pool_2: optional string`

    - `store_stock_pool_3: optional string`

    - `store_stock_pool_4: optional string`

    - `store_stock_pool_5: optional string`

    - `store_stock_pool_6: optional string`

    - `store_stock_pool_7: optional string`

    - `store_stock_pool_8: optional string`

    - `store_stock_pool_9: optional string`

    - `store_type_code: optional string`

    - `store_type_description: optional string`

    - `tertiary_key: optional string`

    - `warehouse_id: optional string`

  - `list_body: optional map[unknown]`

    Additional body-level metadata for the list.

  - `list_filters: optional map[array of string]`

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

  - `next_page: optional number`

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

  - `previous_page: optional number`

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

  - `project_last_modified_date: optional string`

    Last modified date/time of the project.

  - `scroll_id: optional string`

    Opaque scroll identifier for deep-pagination scenarios.

  - `server_time: optional string`

    Server UTC date/time when the response was generated.

  - `sort_column: optional string`

    Column name the results are sorted by.

  - `sort_order: optional string`

    Sort direction (asc or desc).

  - `task_last_modified_date: optional string`

    Last modified date/time of the task.

### Store Create Stores Response

- `StoreCreateStoresResponse object { success, data, message }`

  Standard success response returned by mutation endpoints.

  - `success: boolean`

    Indicates whether the operation completed successfully.

  - `data: optional string`

    Optional data payload returned by the operation.

  - `message: optional string`

    Human-readable message describing the result.
