Credit

Validate the coupon code for a service

post/credit/validate-coupon

Request

  • Base URL
    https://core.hivelocity.net/api/v2
  • URL
    https://core.hivelocity.net/api/v2/credit/validate-coupon
  • Auth
    API key in header X-API-KEY

Headers

X-Fieldsstring mask

An optional fields mask

Request body

codestring required

Coupon code

Response

Success

clientIdinteger

The unique client account ID.

couponCodestring required

The coupon code to validate.

errorstring

Error message if coupon is invalid.

isValidboolean

Whether the coupon is valid.

Example response

{
  "coupon": {
    "clientIds": [],
    "customerEligibility": "all",
    "customerEligibilityRules": [],
    "excludedProductIds": [],
    "expireType": "first_billing_period",
    "extraData": {
      "retentionDurationUnit": "months"
    },
    "hasEndDate": true,
    "maxUseSameCartUseType": "first_item",
    "productIds": [],
    "serviceEligibility": "none",
    "type": "%",
    "usageTypeLimit": []
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.