## Create Customer Orders

`CustomerOrderCreateCustomerOrdersResponse CustomerOrders.CreateCustomerOrders(CustomerOrderCreateCustomerOrdersParamsparameters, CancellationTokencancellationToken = default)`

**post** `/api/v2/public/stores/{store_number}/orders/customerorders`

Creates customer orders and their lines for one store. Every `product_number` must already exist in the catalogue; an unknown one rejects the whole request. Setting `flush` to true first deletes all existing customer orders and lines for the stores in the request, so only use it when you are sending the complete set.

### Parameters

- `CustomerOrderCreateCustomerOrdersParams parameters`

  - `required string storeNumber`

    Path param: The store the orders are for.

  - `Boolean flush`

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

  - `IReadOnlyList<Order>? orders`

    Body param

    - `required string OrderNumber`

    - `string? CustomerCity`

    - `string? CustomerCountry`

    - `string? CustomerEmail`

    - `string? CustomerName`

    - `string? CustomerNumber`

    - `string? CustomerPhone`

    - `string? CustomerStreet`

    - `string? CustomerZipcode`

    - `string? DeliveryCity`

    - `string? DeliveryCountry`

    - `string? DeliveryStreet`

    - `string? DeliveryZipcode`

    - `string? Description`

    - `string? FileName`

    - `Boolean? IsActive`

    - `Boolean IsPicked`

    - `Boolean? IsRejected`

    - `string? OrderComment`

    - `IReadOnlyList<OrderLine>? OrderLines`

      - `required Long LineNumber`

      - `required string ProductNumber`

      - `required Double Quantity`

      - `string? Barcode`

      - `DateTimeOffset DeliveryDate`

      - `string? Description`

      - `string? FullFillmentStatus`

      - `Boolean IsPicked`

      - `Boolean IsPickedFromWarehouse`

      - `DateTimeOffset OrderingDatetime`

      - `Double PickedQuantity`

      - `IReadOnlyList<string>? PickingStockPoolArray`

      - `DateTimeOffset? PickupDate`

      - `string? PreferredLocationCode`

      - `Double Price`

      - `string? Reference`

      - `Int StockPool`

    - `string? OrderType`

    - `string? OrderTypeCode`

    - `string? OrderTypeDescription`

    - `string? Reference`

    - `string? SalesOrderID`

    - `Int? StatusID`

### Returns

- `class CustomerOrderCreateCustomerOrdersResponse:`

  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
CustomerOrderCreateCustomerOrdersParams parameters = new()
{
    StoreNumber = "store_number"
};

var response = await client.CustomerOrders.CreateCustomerOrders(parameters);

Console.WriteLine(response);
```

#### Response

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