discountcode object

Properties of the discountcode object.

Full discount code for application is formatted as {codeprefix}-{code}. You can apply this to a customer, a subscription or a subscription charge.

{
  /* id of object, set by Upodi */
  "id": "guid",
  /* required */
  "codeprefix" : "string",
  /* required. a code */
  "code" : "string",
  "completecode": "string",
  /* active=0, expired=1, consumed=2 */
  "state" : "integer",
  /* allows null, or the end date of the valid use. */
  "expiredate": "datetime",
  /* readonly. number of times the code is consumed */
  "usecount" : "integer",
  "discountid" : "guid",
  /* 0 for endless, a positive number for the times a code can be used */
  "redemption" : "integer",
  "discount" : "discount object"
}