---
title: "PUT /api/app/discount-rules/{id}"
method: PUT
path: "/api/app/discount-rules/{id}"
tags: ["DiscountRules"]
---

# PUT /api/app/discount-rules/{id}

`PUT /api/app/discount-rules/{id}`

## Request

- Base URL: `https://api.khaasfood.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.khaasfood.com/api/app/discount-rules/{id}`
- Auth: OAuth 2
  - Authorization code: `https://api.khaasfood.com/connect/authorize`
  - Token URL: `https://api.khaasfood.com/connect/token`

## Path parameters

- `id` string, uuid, required

## Request body

- KhaasFoodDiscountRulesDTOsDiscountRuleCreateUpdateInputDto
  - `name` string, required
  - `ruleType` 0 | 1 | 2 | 3 | 4
  - `ruleGroup` 0 | 1 | 2 | 3 | 4 | 5 | 6
  - `maxTotalUsageCount` integer, nullable
  - `maxUsageLimit` number, double, nullable
  - `maxUsageLimitPerCustomer` integer, nullable
  - `validFrom` string, date-time, nullable
  - `validTo` string, date-time, nullable
  - `discountType` 0 | 1 | 2
  - `discount` number, double
  - `condition` 0 | 1 | 2 | 3 | 4 | 5
  - `active` boolean
  - `isPromotional` boolean
  - `promotionalMessage` string, nullable
  - `isConditionAppliedOnlyForMobileApp` boolean
  - `noOrderFromDate` string, date-time, nullable
  - `noOrderToDate` string, date-time, nullable
  - `orderedFromDate` string, date-time, nullable
  - `orderedToDate` string, date-time, nullable
  - `requiredProductIds` string[], nullable
  - `excludedProductIds` string[], nullable
  - `eligibleCustomerTypes` KhaasFoodEnumsCustomersCustomerType[], nullable
  - `requiredBasketTotal` number, double
  - `minOrderCount` integer, nullable
  - `maxOrderCount` integer, nullable
  - `isCustomerSpecificCoupon` boolean
  - `discountRuleFilters` KhaasFoodDiscountRulesDTOsDiscountRuleFilterDto[], nullable
    - `id` string, uuid
    - `filterType` 0 | 1 | 2
    - `inList` boolean
    - `items` string[], nullable
  - `discountRuleDetails` KhaasFoodDiscountRulesDTOsDiscountRuleDetailDto[], nullable
    - `id` string, uuid
    - `conditionType` 0 | 1 | 2 | 3
    - `inList` boolean
    - `condition` 0 | 1 | 2 | 3 | 4 | 5
    - `subtotal` number, double
    - `quantity` integer
    - `coupons` string[], nullable
    - `items` string[], nullable

## Response `200`

Success

- KhaasFoodDiscountRulesDTOsDiscountRuleDto
  - `id` string, uuid
  - `name` string, nullable
  - `ruleType` 0 | 1 | 2 | 3 | 4
  - `ruleGroup` 0 | 1 | 2 | 3 | 4 | 5 | 6
  - `maxTotalUsageCount` integer, nullable
  - `maxUsageLimit` number, double, nullable
  - `maxUsageLimitPerCustomer` integer, nullable
  - `validFrom` string, date-time, nullable
  - `validTo` string, date-time, nullable
  - `discountType` 0 | 1 | 2
  - `discount` number, double
  - `condition` 0 | 1 | 2 | 3 | 4 | 5
  - `active` boolean
  - `isPromotional` boolean
  - `promotionalMessage` string, nullable
  - `isConditionAppliedOnlyForMobileApp` boolean
  - `noOrderFromDate` string, date-time, nullable
  - `noOrderToDate` string, date-time, nullable
  - `orderedFromDate` string, date-time, nullable
  - `orderedToDate` string, date-time, nullable
  - `requiredProductIds` string[], nullable
  - `excludedProductIds` string[], nullable
  - `eligibleCustomerTypes` KhaasFoodEnumsCustomersCustomerType[], nullable
  - `requiredBasketTotal` number, double
  - `minOrderCount` integer, nullable
  - `maxOrderCount` integer, nullable
  - `isCustomerSpecificCoupon` boolean
  - `discountRuleFilters` KhaasFoodDiscountRulesDTOsDiscountRuleFilterDto[], nullable
    - `id` string, uuid
    - `filterType` 0 | 1 | 2
    - `inList` boolean
    - `items` string[], nullable
  - `discountRuleDetails` KhaasFoodDiscountRulesDTOsDiscountRuleDetailDto[], nullable
    - `id` string, uuid
    - `conditionType` 0 | 1 | 2 | 3
    - `inList` boolean
    - `condition` 0 | 1 | 2 | 3 | 4 | 5
    - `subtotal` number, double
    - `quantity` integer
    - `coupons` string[], nullable
    - `items` string[], nullable

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `500`: Server Error
- `501`: Server Error

---

[API](https://skmtc.dev/khaasfood/apis/khaasfood-api.md) - [All operations](https://skmtc.dev/khaasfood/apis/khaasfood-api/llms.txt) - [OpenAPI document](https://skmtc.dev/khaasfood/apis/khaasfood-api/revisions/149b6034bea9?raw)
