## Create Multi Store Customer Orders

**post** `/api/v2/public/orders/customerorders`

Same as the single-store customer order endpoint, but each order names its own store, so one call can cover several stores. `flush` deletes existing customer orders for every store named in the request.

### Query Parameters

- `flush: optional boolean`

  Deletes all existing customer orders for the stores in the request before inserting.

### Body Parameters

- `orders: optional array of object { order_number, customer_city, customer_country, 19 more }`

  - `order_number: string`

  - `customer_city: optional string`

  - `customer_country: optional string`

  - `customer_email: optional string`

  - `customer_name: optional string`

  - `customer_number: optional string`

  - `customer_phone: optional string`

  - `customer_street: optional string`

  - `customer_zipcode: optional string`

  - `delivery_city: optional string`

  - `delivery_country: optional string`

  - `delivery_street: optional string`

  - `delivery_zipcode: optional string`

  - `description: optional string`

  - `is_picked: optional boolean`

  - `order_comment: optional string`

  - `order_lines: optional array of object { line_number, product_number, quantity, 10 more }`

    - `line_number: number`

    - `product_number: string`

    - `quantity: number`

    - `barcode: optional string`

    - `delivery_date: optional string`

    - `description: optional string`

    - `is_picked: optional boolean`

    - `is_picked_from_warehouse: optional boolean`

    - `ordering_datetime: optional string`

    - `picked_quantity: optional number`

    - `pickup_date: optional string`

    - `price: optional number`

    - `stock_pool: optional number`

  - `order_type_code: optional string`

  - `order_type_description: optional string`

  - `reference: optional string`

  - `store_number: optional string`

  - `stores_allowed: optional array of string`

### 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/orders/customerorders \
    -X POST \
    -H "Authorization: $COLLEQTIVE_BEARER_TOKEN"
```

#### Response

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