NodeRingsDocs

Revoke Coupon

Ends the discount for every customer from their next invoice.

POST
/v1/coupons/{id}:revoke
Authorization<token>

Bearer token

In: header

X-Organization-ID<token>

Tenant or organization identifier

In: header

Path Parameters

idstring
confirm?boolean

Must be true; revoking ends the discount for every customer.

Response Body

application/json

curl -X POST "https://api.noderings.com/v1/coupons/{id}:revoke" \  -H "Authorization: Bearer {your_token}" \  -H "X-Organization-ID: {your_org_id}" \  -H "Content-Type: application/json" \  -d '{  "confirm": false}'
{
  "coupon": {
    "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
  },
  "revokedApplications": 0
}