## Creates or updates discount prices for products.

`ProductCreateDiscountPricesResponse Products.CreateDiscountPrices(ProductCreateDiscountPricesParams?parameters, CancellationTokencancellationToken = default)`

**post** `/api/v2/public/products/discountprices`

Creates or updates discount prices for products.

### Parameters

- `ProductCreateDiscountPricesParams parameters`

  - `IReadOnlyList<Discount>? discounts`

    Body param: The list of discount price entries.

    - `required Boolean IsDelete`

      When true, removes the existing discount entry.

    - `string? DiscountDescription`

      Human-readable description of the discount.

    - `string? DiscountGroup`

      Optional discount group identifier.

    - `string? DiscountID`

      Unique discount identifier.

    - `Long? DiscountType`

      Numeric discount type.

    - `Long? LineNumber`

      Line number on the discount.

    - `Float? Price`

      Discounted price value.

    - `string? ProductNumber`

      The product number this discount applies to.

    - `DateTimeOffset? ValidFrom`

      Start of the discount's validity period.

    - `DateTimeOffset? ValidTo`

      End of the discount's validity period.

  - `Boolean isExpireDiscounts`

    Header param: When true, expires related active discount rows not refreshed in this import.

  - `Boolean isFlush`

    Header param: When true, removes existing discount prices before inserting.

### Returns

- `class ProductCreateDiscountPricesResponse:`

  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
ProductCreateDiscountPricesParams parameters = new();

var response = await client.Products.CreateDiscountPrices(parameters);

Console.WriteLine(response);
```

#### Response

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