ServiceStack Home (Live)

<back to all web services

GetQuote

The following routes are available for this service:
All Verbs/quote/{Id}/{Quantity}
All Verbs/quote/{Id}/{Quantity}/{Coupon}
GET/GetQuote
GET/GetQuote/{Id}

export class QuoteResponse
{
    public skuId: number;
    public code: string;
    public customerId?: number;
    public modifyingExistingSubscription: boolean;
    public changingSubscriptions: boolean;
    public switchingLicensingModels: boolean;
    public replacesExistingQuantity: boolean;
    public existingSubscriptionQuantity?: number;
    public newSubscriptionQuantity?: number;
    public unusedAmount: string;
    public manualProrating: boolean;
    public unusedDays: number;
    public quantity: number;
    public minQuantity: number;
    public maxQuantity?: number;
    public subtotal: string;
    public discountDescription: string;
    public discountReceived: string;
    public discount: string;
    public total: string;
    public expiryDate: string;
    public renewalDate: string;
    public isReferrer: boolean;
    public responseStatus: ResponseStatus;

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

export class GetQuote implements IGet
{
    public id: number;
    public quantity: number;
    public coupon: string;
    public renewalRef: string;
    public upgradeRef: string;

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

TypeScript GetQuote 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 /quote/{Id}/{Quantity} HTTP/1.1 
Host: account.servicestack.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	id: 0,
	quantity: 0,
	coupon: String,
	renewalRef: String,
	upgradeRef: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	skuId: 0,
	code: String,
	customerId: 0,
	modifyingExistingSubscription: False,
	changingSubscriptions: False,
	switchingLicensingModels: False,
	replacesExistingQuantity: False,
	existingSubscriptionQuantity: 0,
	newSubscriptionQuantity: 0,
	unusedAmount: String,
	manualProrating: False,
	unusedDays: 0,
	quantity: 0,
	minQuantity: 0,
	maxQuantity: 0,
	subtotal: String,
	discountDescription: String,
	discountReceived: String,
	discount: String,
	total: String,
	expiryDate: String,
	renewalDate: String,
	isReferrer: False,
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}