Update coupon by ID

PUT {{baseUrl}}/coupons/:id

Service urls:
http://yourdomain.com/api/rest_admin/coupons/{id}
OR
http://yourdomain.com/index.php?route=rest/coupon_admin/coupon&id={id}

Request Body

{"name"=>"<string>", "code"=>"<string>", "type"=>"P", "discount"=>0, "total"=>0, "logged"=>0, "shipping"=>0, "coupon_product"=>["<integer>", "<integer>"], "coupon_category"=>["<integer>", "<integer>"], "date_start"=>"<string>", "date_end"=>"<string>", "uses_total"=>1, "uses_customer"=>1, "status"=>1}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;success&quot;:&quot;\u003cinteger\u003e&quot;,&quot;error&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;data&quot;:&quot;\u003cobject\u003e&quot;}