Update a Coupon

Updates a coupon by the given id.

put
Path parameters
idstringRequired

The id of the coupon.

Header parameters
Brand-URLstringRequired

The brand URL of the request. This is used to identify the brand.

Example: YOUR_BRAND_URL
Auth-KeystringRequired

Auth-Key is required to authenticate the request. If missing, the server will return 401 Unauthorized.

Example: YOUR_AUTH_KEY
Body

This class is used to provide a data transfer object for the coupon which is used for command requests.

typestring · enumRequired

The type of the coupon.

Possible values:
namestring · min: 1Required

The name of the coupon.

codestring · min: 1Required

The code of the coupon.

percentOffnumber · double · max: 100 · nullableOptional

The percentage of the coupon.

maxRedemptionsinteger · int32 · max: 2147483647 · nullableOptional

A positive integer specifying the number of times the coupon can be redeemed before it’s no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use.

startDatestring · date-timeRequired

The start date and end date of the coupon.

endDatestring · date-timeRequired

The end date of the coupon.

autoApplyToPricebooleanOptional

Is the coupon auto apply to price. If true, the coupon will be applied to the price automatically. By default, the value is false.

descriptionstring · nullableOptional

The description of the coupon.

tagsstring · nullableOptional

The tags of the coupon.

statusstring · enumOptional

Provides the status of the coupon.

Possible values:
testModeboolean · nullableOptional

The test mode of the coupon. By default, the value is false.

Responses
chevron-right
200

The request was successful.

application/json

This provides interfaces for API responses with data.

successbooleanRead-onlyRequired

This is the flag to indicate whether the API call is successful or not.

statusCodeinteger · int32Read-onlyRequired

This is the HTTP status code. This is used to determine the status code to be returned to the client.

messagestring · min: 1Read-onlyRequired

This is the message to be displayed to the user.

put
/api/v1/coupons/{id}

Last updated