Billhighway Cloud API

<back to all web services

GetCampaign

The following routes are available for this service:
GET/v1.1/campaigns/get/{campaignId*}
GET/v1.2/campaigns/get/{campaignId*}
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BH.CloudAPI.Common4.DTO
Imports BH.CloudAPI.Common.Models

Namespace Global

    Namespace BH.CloudAPI.Common.Models

        Public Partial Class CampaignGoal
            Public Overridable Property Target As Decimal
            Public Overridable Property Actual As Decimal
        End Class

        Public Partial Class CampaignItem
            Public Sub New()
                Levels = New CampaignLevel(){}
            End Sub

            Public Overridable Property Id As Integer
            Public Overridable Property Name As String
            Public Overridable Property SubTitle As String
            Public Overridable Property Description As String
            Public Overridable Property HasGoal As Boolean
            Public Overridable Property DetailUri As String
            Public Overridable Property Theme As CampaignTheme
            Public Overridable Property Goal As CampaignGoal
            Public Overridable Property Levels As CampaignLevel()
            Public Overridable Property LogoUrl As String
            Public Overridable Property HighResolutionLogoUrl As String
            Public Overridable Property Signup As Signup
        End Class

        Public Partial Class CampaignLevel
            Public Overridable Property Sequence As Integer
            Public Overridable Property Amount As Decimal
            Public Overridable Property Description As String
        End Class

        Public Partial Class CampaignTheme
            Public Overridable Property Id As Integer
            Public Overridable Property Name As String
            Public Overridable Property MainColor As String
            Public Overridable Property SecondaryColor As String
            Public Overridable Property iPhone As CampaignThemeImage
            Public Overridable Property iPhoneRetina As CampaignThemeImage
        End Class

        Public Partial Class CampaignThemeImage
            Public Overridable Property BackgroundImage As String
            Public Overridable Property Icon As String
        End Class

        Public Partial Class Signup
            Public Overridable Property ShowOnNewMembership As Boolean
            Public Overridable Property ShowOnSignupRenewal As Boolean
            Public Overridable Property ShowOtherAmount As Boolean
        End Class
    End Namespace

    Namespace BH.CloudAPI.Common4.DTO

        Public Partial Class GetCampaign
            Inherits GetCampaign
            Implements IReturnLegacyException
        End Class
    End Namespace
End Namespace

VB.NET GetCampaign 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 /v1.1/campaigns/get/{campaignId*} 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
	}
}