curl --request POST 'https://api.mayar.id/hl/v1/coupon/create' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here' \
--header 'Content-Type: application/json' \
--data-raw '{
"expiredAt": "2030-01-01T09:06:14.933Z",
"name": "Diskon Murmer",
"discount": {
"discountType": "monetary",
"eligibleCustomerType": "all",
"minimumPurchase": 500000,
"value": 100000,
"totalCoupons": 100
},
"coupon": {
"code": "haribaik",
"type": "reusable"
},
"products": []
}
'
{
"statusCode": 200,
"messages": "Success",
"data": {
"id": "c9aa143a-53f9-44e7-a9c6-83229ad7199b",
"createdAt": 1755665561029,
"expiredAt": 1893488774933,
"discountType": "monetary",
"discountProductType": "all",
"eligibleCustomerType": "all",
"name": "Diskon Murmer",
"minimumPurchase": 500000,
"isLifeTime": null,
"totalCoupons": 100,
"value": 100000,
"coupons": [
{
"code": "haribaik",
"type": "reusable",
"expiredAt": "2030-01-01T09:06:14.933Z",
"isActive": true
}
],
"productDiscount": []
}
}
Discount & Coupon
Create Discount with Coupon
Endpoint used to create discount coupons
Was this page helpful?
