ServiceStack Home (Live)

<back to all web services

Buy

The following routes are available for this service:
All Verbs/buy/{Id}
GET/Buy/{Id}
All Verbs/buy/{Id}/{Quantity}
GET/Buy
Buy Parameters:
NameParameterData TypeRequiredDescription
IdpathstringNo
CouponquerystringNo
Quantitypathint?No
RenewalRefquerystringNo
UpgradeRefquerystringNo
BuyResponse Parameters:
NameParameterData TypeRequiredDescription
CouponformstringNo
RenewalRefformstringNo
UpgradeRefformstringNo
SkuformSkuNo
QuoteformQuoteResponseNo
ResponseStatusformResponseStatusNo
Sku Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
ProductIdformintNo
TypeformSkuTypeNo
FeatureformLicenseFeatureNo
CodeformstringNo
NameformstringNo
NotesformstringNo
MinQtyformint?No
MaxQtyformint?No
PriceformintNo
PlanformstringNo
DiscountOffformintNo
DiscountLabelOffformstringNo
ActualPriceformintNo
IsPlanformboolNo
IsRenewalformboolNo
SubscriptionDurationDaysformint?No
ExpiryDurationDaysformint?No
TrialPeriodDaysformint?No
SupportQtyformintNo
CoresQtyformint?No
CreatedDateformDateTimeNo
ModifiedDateformDateTimeNo
LicenseTypeformLicenseTypeNo
ActiveformboolNo
SkuType Enum:
Product
PerDev
PerCore
Site
Support
Training
Register
Payment
LicenseFeature Enum:
NameValue
None0
Free0
Premium1
Text2
Client4
Common8
Redis16
RedisSku18
OrmLite32
OrmLiteSku34
ServiceStack64
Server128
Razor256
Admin512
Aws1024
AwsSku1026
All2047
LicenseType Enum:
Free
FreeIndividual
FreeOpenSource
Indie
Business
Enterprise
TextIndie
TextBusiness
OrmLiteIndie
OrmLiteBusiness
RedisIndie
RedisBusiness
AwsIndie
AwsBusiness
Trial
Site
TextSite
RedisSite
OrmLiteSite
QuoteResponse Parameters:
NameParameterData TypeRequiredDescription
SkuIdformintNo
CodeformstringNo
CustomerIdformint?No
ModifyingExistingSubscriptionformboolNo
ChangingSubscriptionsformboolNo
SwitchingLicensingModelsformboolNo
ReplacesExistingQuantityformboolNo
ExistingSubscriptionQuantityformint?No
NewSubscriptionQuantityformint?No
UnusedAmountformstringNo
ManualProratingformboolNo
UnusedDaysformintNo
QuantityformintNo
MinQuantityformintNo
MaxQuantityformint?No
SubtotalformstringNo
DiscountDescriptionformstringNo
DiscountReceivedformstringNo
DiscountformstringNo
TotalformstringNo
ExpiryDateformstringNo
RenewalDateformstringNo
IsReferrerformboolNo
ResponseStatusformResponseStatusNo

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

HTTP + OTHER

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

POST /buy/{Id} HTTP/1.1 
Host: account.servicestack.net 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

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

{"coupon":"String","renewalRef":"String","upgradeRef":"String","sku":{"id":0,"productId":0,"type":"Product","feature":0,"code":"String","name":"String","notes":"String","maxQty":0,"price":0,"plan":"String","discountOff":0,"discountLabelOff":"String","actualPrice":0,"isPlan":false,"isRenewal":false,"subscriptionDurationDays":0,"expiryDurationDays":0,"trialPeriodDays":0,"supportQty":0,"coresQty":0,"createdDate":"\/Date(-62135596800000-0000)\/","modifiedDate":"\/Date(-62135596800000-0000)\/","licenseType":"Free","active":false},"quote":{"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"}}},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}