Update Coupon

PUT https://api.salla.dev/admin/v2/coupons/:coupon_id

This endpoint allows you to update details regarding a coupon via its ID.

Request Body

{"code"=>"<string>", "type"=>"p", "amount"=>"<number>", "status"=>"<string>", "start_date"=>"<string>", "expiry_date"=>"<string>", "applied_in"=>"web", "usage_limit"=>"<number>", "usage_limit_per_user"=>"<number>", "minimum_amount"=>"<number>", "maximum_amount"=>"<number>", "free_shipping"=>true, "exclude_sale_products"=>true, "show_maximum_amount"=>true, "marketing_show_maximum_amount"=>true, "marketing_active"=>true, "marketing_name"=>"<string>", "marketing_type"=>"f", "marketing_amount"=>"<number>", "marketing_hide_total_sales"=>true, "marketing_maximum_amount"=>"<number>", "marketing_info"=>"<string>", "beneficiary_domain"=>"<string>", "products_include"=>["<string>", "<string>"], "products_exclude"=>["<string>", "<string>"], "list_include_categories"=>["<string>", "<string>"], "list_exclude_categories"=>["<string>", "<string>"], "list_exclude_brands"=>["<string>", "<string>"], "list_include_groups"=>["<string>", "<string>"], "list_exclude_groups"=>["<string>", "<string>"], "list_exclude_shipping"=>["<string>", "<string>"], "payment_methods"=>["apple_pay", "knet"]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;status&quot;:&quot;\u003cnumber\u003e&quot;,&quot;success&quot;:true,&quot;data&quot;:{&quot;id&quot;:&quot;\u003cnumber\u003e&quot;,&quot;code&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;f&quot;,&quot;status&quot;:&quot;active&quot;,&quot;amount&quot;:{&quot;amount&quot;:&quot;\u003cnumber\u003e&quot;,&quot;currency&quot;:&quot;\u003cstring\u003e&quot;},&quot;minimum_amount&quot;:{&quot;amount&quot;:&quot;\u003cnumber\u003e&quot;,&quot;currency&quot;:&quot;\u003cstring\u003e&quot;},&quot;maximum_amount&quot;:{&quot;amount&quot;:&quot;\u003cnumber\u003e&quot;,&quot;currency&quot;:&quot;\u003cstring\u003e&quot;},&quot;show_maximum_amount&quot;:false,&quot;start_date&quot;:&quot;\u003cstring\u003e&quot;,&quot;expiry_date&quot;:&quot;\u003cstring\u003e&quot;,&quot;free_shipping&quot;:true,&quot;usage_limit&quot;:&quot;\u003cnumber\u003e&quot;,&quot;usage_limit_per_user&quot;:&quot;\u003cnumber\u003e&quot;,&quot;include_product_ids&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;exclude_product_ids&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;is_sale_products_exclude&quot;:true,&quot;include_category_ids&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;exclude_category_ids&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;include_customer_group_ids&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;exclude_customer_group_ids&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;exclude_brands_ids&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;exclude_shipping_ids&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;include_customer_ids&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;include_payment_methods&quot;:[&quot;all&quot;,&quot;tabby_installment&quot;],&quot;applied_in&quot;:&quot;all&quot;,&quot;is_group&quot;:true,&quot;group_name&quot;:&quot;\u003cstring\u003e&quot;,&quot;group_coupons_count&quot;:&quot;\u003cnumber\u003e&quot;,&quot;group_coupon_suffix&quot;:&quot;\u003cstring\u003e&quot;,&quot;group_coupons&quot;:[{&quot;code&quot;:&quot;\u003cstring\u003e&quot;},{&quot;code&quot;:&quot;\u003cstring\u003e&quot;}],&quot;beneficiary_domain&quot;:&quot;\u003cstring\u003e&quot;,&quot;statistics&quot;:{&quot;num_of_usage&quot;:&quot;\u003cnumber\u003e&quot;,&quot;num_of_customers&quot;:&quot;\u003cnumber\u003e&quot;,&quot;coupon_sales&quot;:{&quot;amount&quot;:&quot;\u003cnumber\u003e&quot;,&quot;currency&quot;:&quot;\u003cstring\u003e&quot;}},&quot;created_at&quot;:{&quot;date&quot;:&quot;\u003cstring\u003e&quot;,&quot;timezone_type&quot;:&quot;\u003cnumber\u003e&quot;,&quot;timezone&quot;:&quot;\u003cstring\u003e&quot;},&quot;updated_at&quot;:{&quot;date&quot;:&quot;\u003cstring\u003e&quot;,&quot;timezone_type&quot;:&quot;\u003cnumber\u003e&quot;,&quot;timezone&quot;:&quot;\u003cstring\u003e&quot;},&quot;marketing_active&quot;:true,&quot;marketing_name&quot;:&quot;\u003cstring\u003e&quot;,&quot;marketing_email&quot;:&quot;\u003cstring\u003e&quot;,&quot;marketing_type&quot;:&quot;F&quot;,&quot;marketing_amount&quot;:{&quot;amount&quot;:&quot;\u003cnumber\u003e&quot;,&quot;currency&quot;:&quot;\u003cstring\u003e&quot;},&quot;marketing_hide_total_sales_&quot;:false,&quot;marketing_show_maximum_amount&quot;:true,&quot;marketing_maximum_amount&quot;:0,&quot;marketing_info&quot;:&quot;\u003cstring\u003e&quot;,&quot;marketing_visits_count&quot;:&quot;\u003cnumber\u003e&quot;,&quot;marketing_url&quot;:&quot;\u003cstring\u003e&quot;,&quot;marketing_statistics_url&quot;:&quot;\u003cstring\u003e&quot;}}