Update Coupon
Update Coupon on the NodeRings client API (PATCH /v1/coupons/{id}).
Authorization<token>
Bearer token
In: header
X-Organization-ID<token>
Tenant or organization identifier
In: header
Path Parameters
idstring
name?string
description?string
addAmountsOff?
Adds amounts for currencies the coupon does not list yet. Existing amounts are read-only.
validUntil?string
Format
date-timenoExpiry?boolean
maxRedemptions?integer
Format
int32acknowledgeHighRisk?boolean
Response Body
application/json
curl -X PATCH "https://api.noderings.com/v1/coupons/{id}" \ -H "Authorization: Bearer {your_token}" \ -H "X-Organization-ID: {your_org_id}" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "description": "string", "addAmountsOff": null, "validUntil": "string", "noExpiry": false, "maxRedemptions": 0, "acknowledgeHighRisk": false}'{
"id": "string",
"name": "string",
"description": "string",
"discountType": "COUPON_DISCOUNT_TYPE_UNSPECIFIED",
"percentOff": "string",
"amountsOff": {
"property1": "string",
"property2": "string"
},
"maxDiscountAmounts": {
"property1": "string",
"property2": "string"
},
"appliesTo": [
"string"
],
"usageMetricCodes": [
"string"
],
"assetCategories": [
"string"
],
"assetTypes": [
"string"
],
"planIds": [
"string"
],
"duration": "COUPON_DURATION_UNSPECIFIED",
"durationInPeriods": 0,
"durationDays": 0,
"validFrom": "2019-08-24T14:15:22Z",
"validUntil": "2019-08-24T14:15:22Z",
"maxRedemptions": 0,
"timesRedeemed": 0,
"oncePerCustomer": true,
"firstTimeCustomerOnly": true,
"highRisk": true,
"status": "STATUS_UNSPECIFIED",
"timestamps": {
"createTime": "2019-08-24T14:15:22Z",
"updateTime": "2019-08-24T14:15:22Z"
},
"fundedBy": "COUPON_FUNDING_UNSPECIFIED",
"creditValidDays": 0
}