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