NodeRingsDocs

Preview Coupon

Checks a code against a plan without attaching it.

POST
/v1/coupons:preview
Authorization<token>

Bearer token

In: header

X-Organization-ID<token>

Tenant or organization identifier

In: header

code?string
planId?string
billingPeriod?string
Default"BILLING_PERIOD_UNSPECIFIED"
Value in"BILLING_PERIOD_UNSPECIFIED" | "BILLING_PERIOD_HOUR" | "BILLING_PERIOD_DAY" | "BILLING_PERIOD_WEEK" | "BILLING_PERIOD_MONTH" | "BILLING_PERIOD_QUARTER" | "BILLING_PERIOD_YEAR"
quantity?integer
Formatint32

Response Body

application/json

curl -X POST "https://api.noderings.com/v1/coupons:preview" \  -H "Authorization: Bearer {your_token}" \  -H "X-Organization-ID: {your_org_id}" \  -H "Content-Type: application/json" \  -d '{  "code": "string",  "planId": "string",  "billingPeriod": "BILLING_PERIOD_UNSPECIFIED",  "quantity": 0}'
{
  "code": "string",
  "discountType": "COUPON_DISCOUNT_TYPE_UNSPECIFIED",
  "percentOff": "string",
  "amountOff": "string",
  "currency": "string",
  "termsSummary": "string",
  "originalPrice": "string",
  "discountedPrice": "string"
}