ServiceStack Home (Live)

<back to all web services

GetFreeLicense

The following routes are available for this service:
GET/freelicense/{Ref}
GET/GetFreeLicense
import Foundation
import ServiceStack

public class GetFreeLicense : IGet, Codable
{
    public var ref:String

    required public init(){}
}

public class FreeLicenseResponse : Codable
{
    public var licenseName:String
    public var licenseRef:String
    public var licenseKey:String
    public var licenseType:LicenseType?
    public var createdDate:Date?
    public var expiryDate:Date?
    public var externalRef:String
    public var responseStatus:ResponseStatus

    required public init(){}
}

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


Swift GetFreeLicense 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.

GET /freelicense/{Ref} HTTP/1.1 
Host: account.servicestack.net 
Accept: text/jsv
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
		}
	}
}