ServiceStack Home (Live)

<back to all web services

Renew

The following routes are available for this service:
All Verbs/renew
All Verbs/Renew

export enum SkuType
{
    Product = 'Product',
    PerDev = 'PerDev',
    PerCore = 'PerCore',
    Site = 'Site',
    Support = 'Support',
    Training = 'Training',
    Register = 'Register',
    Payment = 'Payment',
}

export enum LicenseType
{
    Free = 'Free',
    FreeIndividual = 'FreeIndividual',
    FreeOpenSource = 'FreeOpenSource',
    Indie = 'Indie',
    Business = 'Business',
    Enterprise = 'Enterprise',
    TextIndie = 'TextIndie',
    TextBusiness = 'TextBusiness',
    OrmLiteIndie = 'OrmLiteIndie',
    OrmLiteBusiness = 'OrmLiteBusiness',
    RedisIndie = 'RedisIndie',
    RedisBusiness = 'RedisBusiness',
    AwsIndie = 'AwsIndie',
    AwsBusiness = 'AwsBusiness',
    Trial = 'Trial',
    Site = 'Site',
    TextSite = 'TextSite',
    RedisSite = 'RedisSite',
    OrmLiteSite = 'OrmLiteSite',
}

export class LicenseKey
{
    public ref: string;
    public name: string;
    public type: LicenseType;
    public meta: number;
    public hash: string;
    public halg: string;
    public expiry: string;

    public constructor(init?: Partial<LicenseKey>) { (Object as any).assign(this, init); }
}

export class Subscription
{
    public id: number;
    public customerId: number;
    public email: string;
    public skuId: number;
    public skuName: string;
    public skuType: SkuType;
    public code: string;
    public quantity: number;
    public supportQuantity: number;
    public total: number;
    public isPlan: boolean;
    public isRenewal: boolean;
    public subscriptionDurationDays: number;
    public renewalDate?: string;
    public licenseRef: string;
    public licenseName: string;
    public licenseAddress: string;
    public licenseType: LicenseType;
    public expiryDate: string;
    public licenseKey: LicenseKey;
    public licenseKeyText: string;
    public createdDate: string;
    public modifiedDate: string;
    public cancelledDate?: string;
    public stripeSubscriptionId: string;
    public emailId?: number;
    public emailRenewalId?: number;
    public emailExpiredId?: number;
    public renewalSubscriptionId?: number;
    public externalRef: string;
    public notes: string;
    public error: string;

    public constructor(init?: Partial<Subscription>) { (Object as any).assign(this, init); }
}

export class RenewResponse
{
    public subscriptions: Subscription[];
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<RenewResponse>) { (Object as any).assign(this, init); }
}

export class Renew implements IGet
{
    public licenseRef: string;
    public licenseKey: string;
    public error: string;

    public constructor(init?: Partial<Renew>) { (Object as any).assign(this, init); }
}

TypeScript Renew DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /renew HTTP/1.1 
Host: account.servicestack.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	licenseRef: String,
	licenseKey: String,
	error: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	subscriptions: 
	[
		{
			id: 0,
			customerId: 0,
			email: String,
			skuId: 0,
			skuName: String,
			skuType: Product,
			code: String,
			quantity: 0,
			supportQuantity: 0,
			total: 0,
			isPlan: False,
			isRenewal: False,
			subscriptionDurationDays: 0,
			renewalDate: 0001-01-01,
			licenseRef: String,
			licenseName: String,
			licenseAddress: String,
			licenseType: Free,
			expiryDate: 0001-01-01,
			licenseKey: 
			{
				ref: String,
				name: String,
				type: Free,
				meta: 0,
				hash: String,
				halg: String,
				expiry: 0001-01-01
			},
			licenseKeyText: String,
			createdDate: 0001-01-01,
			modifiedDate: 0001-01-01,
			cancelledDate: 0001-01-01,
			stripeSubscriptionId: String,
			emailId: 0,
			emailRenewalId: 0,
			emailExpiredId: 0,
			renewalSubscriptionId: 0,
			externalRef: String,
			notes: String,
			error: String
		}
	],
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}