Search.../
  1. Home
  2. Getting Started
  3. Overview
Generate a test token to explore our APIs

Update a Coupon

Update a coupon (coupon type can't be changed).

Authorization

This endpoint requires an authorization header - pass the access token from the OAuth installation flow.

Permissions

This endpoint requires the Manage Coupons permission scope.

PATCH

https://www.wixapis.com/stores/v2/coupons/{id}

Path Params

NAME
TYPE
DESCRIPTION
id
Required

string

Body Params

NAME
TYPE
DESCRIPTION
fieldMask

object

field mask of fields to update. Valid field masks are

specification

object

code,name,startTime,expirationTime,usageLimit,behavior,scopes,minimumSubtotal,active the coupon meta data to change. changing the type is not allowed

Response Object

Returns an empty object.

Status/Error Codes

The response will include an HTTP status code.

Was this helpful?

Request

curl

Copy Code
1curl 'https://www.wixapis.com/stores/v2/coupons/6df8d9ea-9e31-49af-b272-5e22861cce92' \
2 -X PATCH \
3 --data-binary '{
4 "specification": {
5 "active": false
6 },
7 "fieldMask": {
8 "paths": [
9 "active"
10 ]
11 }
12 }' \
13 -H 'Content-Type: application/json' \
14 -H 'Authorization: <AUTH>'

Response

json

1
2{}