subscription object

Properties of the subscription object

{
  /* id of object, set by upodi */
  "id": "guid",
  "customerid": "guid",
  /* Required. */
  "productplanid": "guid",
  /* Select a specific payment method from the customer to overrule payments for this subscription */
  "paymentmethodid": "guid",
  "paymentmethod": "paymentmethod object",
  "businessunitid": "guid",
  "businessunit": "businessunit object",
  /* Required. number of the subscription, can be custom */
  "subscriptionnumber": "string",
  /* a reference being transfered to invoices upon billing, useful for a purchase order number or similar */
  "subscriptionreference": "string",
  /* allow null, if set switches to plan on renewal */ 
  "switchtoplanid": "guid",
  "switchtoplan": "productplan object",
  /* if true, the subscription auto renews */
  "autorenew": "boolean",
  /* set by upodi. 0=active, 1=renewing, 2=grace, 3=expired, 4=cancelled, 5=draft, 6=pendingending, 7=ended, 8=hold */
  "statecode": "integer",
  /* set by upodi. 1024=deleted, 7=inactive, 1=active, 0=draft */
  "status": "integer", 
  /* custom key, example a remote id */
  "refkey": "string", 
  /* only returned on single-object GET calls */
  "discount": "object",
  "startdate": "datetime",
  "enddate": "datetime",
  /* set by upodi. true if there is no enddate */
  "isevergreen": "boolean",
  /* read-only. tell the life time of the subscription */
  "lifetime": "integer", 
  /* internal of the term set by the initialtermperiod, example 1 for "one month" */
  "initialterminterval": "integer",
  /* days=100, months=300, quarters=400, years=500 */
  "initialtermperiod": "integer",
  /* read-only. initial period in string. */
  "initialterm": "string",
	/* internal of the term set by the renewaltermperiod, example 6 for "6 months" */
  "renewalterminterval": "integer",
  /* days=100, months=300, quarters=400, years=500 */
  "renewaltermperiod": "integer",
  /* read-only. renewal period in string. */
  "renewalterm": "string",
  /* custom key, example a remote id */
  "refkey": "string",
  /* set by upodi */
  "lastrenewaldate": "datetime",
  /* set by upodi */
  "cancellationdate": "datetime",
  /* set by upodi */
  "activationdate": "datetime",
  "customer": "customer object",
  "productplan": "productplan object",
  "subscriptioncharges": "subscriptioncharge[] array",
  /* set by upodi */
  "createdby": "guid",
  /* set by upodi */
  "modifiedby": "guid",
  /* set by upodi */
  "createddate": "datetime",
  /* set by upodi */
  "modifieddate": "datetime",
  "discount" : "discountsource object"
}