---
displayed_sidebar: homepage
---

import TypeList from "@site/src/components/TypeList"

# AdminPostDiscountsDiscountDynamicCodesReq

The details of the dynamic discount to create.

## Properties

<TypeList types={[{"name":"code","type":"`string`","description":"A unique code that will be used to redeem the Discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"usage_limit","type":"`number`","description":"Maximum number of times the discount code can be used","optional":false,"defaultValue":"1","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"An optional set of key-value pairs to hold additional information.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="AdminPostDiscountsDiscountDynamicCodesReq"/>
