Billhighway Cloud API

<back to all web services

CampaignRq

The following routes are available for this service:
GET/campaigns
import Foundation
import ServiceStack

public class CampaignRq : Codable
{
    public var groupId:String?
    public var signUp:Bool?
    public var payment:Bool?

    required public init(){}
}

public class CampaignItem : Codable
{
    public var id:Int?
    public var name:String?
    public var subTitle:String?
    public var Description:String?
    public var hasGoal:Bool?
    public var detailUri:String?
    public var theme:CampaignTheme?
    public var goal:CampaignGoal?
    public var levels:[CampaignLevel] = []
    public var logoUrl:String?
    public var highResolutionLogoUrl:String?
    public var signup:Signup?

    required public init(){}
}

public class CampaignTheme : Codable
{
    public var id:Int?
    public var name:String?
    public var mainColor:String?
    public var secondaryColor:String?
    public var iPhone:CampaignThemeImage?
    public var iPhoneRetina:CampaignThemeImage?

    required public init(){}
}

public class CampaignThemeImage : Codable
{
    public var backgroundImage:String?
    public var icon:String?

    required public init(){}
}

public class CampaignGoal : Codable
{
    public var target:Double?
    public var actual:Double?

    required public init(){}
}

public class CampaignLevel : Codable
{
    public var sequence:Int?
    public var amount:Double?
    public var Description:String?

    required public init(){}
}

public class Signup : Codable
{
    public var showOnNewMembership:Bool?
    public var showOnSignupRenewal:Bool?
    public var showOtherAmount:Bool?

    required public init(){}
}


Swift CampaignRq 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 /campaigns HTTP/1.1 
Host: devapi.billhighway.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Id: 0,
	Name: String,
	SubTitle: String,
	Description: String,
	HasGoal: False,
	DetailUri: /api/campaigns/get/0,
	Theme: 
	{
		Id: 0,
		Name: String,
		MainColor: String,
		SecondaryColor: String,
		iPhone: 
		{
			BackgroundImage: String,
			Icon: String
		},
		iPhoneRetina: 
		{
			BackgroundImage: String,
			Icon: String
		}
	},
	Goal: 
	{
		Target: 0,
		Actual: 0
	},
	Levels: 
	[
		{
			Sequence: 0,
			Amount: 0,
			Description: String
		}
	],
	LogoUrl: String,
	HighResolutionLogoUrl: String,
	Signup: 
	{
		ShowOnNewMembership: False,
		ShowOnSignupRenewal: False,
		ShowOtherAmount: False
	}
}