DELETE - /api/v1/courses/:course_id/coupons/:id - Deleting
DELETE /api/v1/courses/:course_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
|
|
course_id
|
course id
|
Request
Headers
Route
DELETE /api/v1/courses/27/coupons/29
Body
{"code":"FOO","discount_percent":0.2,"duration_kind":"forever","expiration_date":"2019-11-30"}
cURL
curl "http://localhost:3000/api/v1/courses/27/coupons/29" -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: 27tZEtYhymcnLU2B8F2M5RLxbjMDCknMvg" \
-H "X-Api-Email: user-87@example.com" \
-H "Content-Type: application/json" \
-H "Host: school.worksonmy.computer"
Response
Status
204 No Content