Create a discount code
POST
https://api.radom.com/discount_code/createAuthorization
Send your API key in the Authorization header. Scheme: radomToken.
Request body
codestringrequiredCode used for customer to get a discount.
productsstring[]requiredProduct identifiers that the discount code applies to.
modelDiscountCodeModelrequired
modelTypeDiscountCodeModelTyperequiredAllowed
fixedpercentageamountOffnumber<float>requiredDiscount amount applied to the price.
startsAtstring<date-time>nullableOptional discount code start date
expiresAtstring<date-time>nullableOptional discount code end date
Responses
200Discount code created successfully
idstring<uuid>requiredUnique identifier for the discount code.
codestringrequiredCode used for customer to get a discount.
productsstring[]requiredProduct identifiers that the discount code applies to.
modelDiscountCodeModelrequired
modelTypeDiscountCodeModelTyperequiredAllowed
fixedpercentageamountOffnumber<float>requiredDiscount amount applied to the price.
startsAtstring<date-time>nullableOptional discount code start date
expiresAtstring<date-time>nullableOptional discount code end date
createdAtstring<date-time>requiredTime at which discount code was created.
updatedAtstring<date-time>requiredTime at which discount code was last updated.
isArchivedbooleanrequiredIf the discount code is archived
400Bad Request
errorstringrequired401Unauthorized
errorstringrequired500Internal server error
errorstringrequired