DELETE - /api/v1/courses/:course_id/products/:product_id/coupons/:id - Deleting
DELETE /api/v1/courses/:course_id/products/:product_id/coupons/:id
Parameters
| Name |
Description |
|
id
|
coupon id
|
|
is_primary
|
primary coupon?
|
|
code
|
:text
|
|
currency
|
:string(255)
|
|
discount_amount
|
:integer
|
|
discount_in_months
|
:integer
|
|
discount_percent
|
:float
|
|
duration_kind
|
forever, once, or repeating
|
|
expiration_date
|
:date
|
|
is_published
|
:boolean
|
|
name
|
:text
|
|
number_available
|
:integer
|
|
number_of_uses
|
:integer
|
|
product_id
|
id
|
|
course_id
|
course id
|
Request
Headers
Route
DELETE /api/v1/courses/38/products/34/coupons/42
Body
{"code":"FOO","discount_percent":0.2,"duration_kind":"forever","expiration_date":"2019-11-30"}
cURL
curl "http://localhost:3000/api/v1/courses/38/products/34/coupons/42" -d '{"code":"FOO","discount_percent":0.2,"duration_kind":"forever","expiration_date":"2019-11-30"}' -X DELETE \
-H "Accept: application/json" \
-H "X-Api-Token: 12yKNyuiNaoHNM4KezKLYPfqfXstLUNxtA" \
-H "X-Api-Email: user-109@example.com" \
-H "Content-Type: application/json" \
-H "Host: school.worksonmy.computer"
Response
Status
204 No Content