ServiceStack Home (Live)

<back to all web services

CreateIndividualLicense

The following routes are available for this service:
POST/freelicense/individual
POST/CreateIndividualLicense
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using MyApp.ServiceInterface;

namespace MyApp.ServiceInterface
{
    public partial class CreateIndividualLicense
        : IPost
    {
        public virtual string LicenseName { get; set; }
        public virtual bool AgreeTerms { get; set; }
    }

    public partial class FreeLicenseResponse
    {
        public virtual string LicenseName { get; set; }
        public virtual string LicenseRef { get; set; }
        public virtual string LicenseKey { get; set; }
        public virtual LicenseType? LicenseType { get; set; }
        public virtual DateTime? CreatedDate { get; set; }
        public virtual DateTime? ExpiryDate { get; set; }
        public virtual string ExternalRef { get; set; }
        public virtual ResponseStatus ResponseStatus { get; set; }
    }

}

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

}

C# CreateIndividualLicense 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 /freelicense/individual HTTP/1.1 
Host: account.servicestack.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	licenseName: String,
	agreeTerms: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	licenseName: String,
	licenseRef: String,
	licenseKey: String,
	licenseType: Free,
	createdDate: 0001-01-01,
	expiryDate: 0001-01-01,
	externalRef: String,
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}