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*}

export class CampaignThemeImage
{
    public BackgroundImage?: string;
    public Icon?: string;

    public constructor(init?: Partial<CampaignThemeImage>) { (Object as any).assign(this, init); }
}

export class CampaignTheme
{
    public Id?: number;
    public Name?: string;
    public MainColor?: string;
    public SecondaryColor?: string;
    public iPhone?: CampaignThemeImage;
    public iPhoneRetina?: CampaignThemeImage;

    public constructor(init?: Partial<CampaignTheme>) { (Object as any).assign(this, init); }
}

export class CampaignGoal
{
    public Target?: number;
    public Actual?: number;

    public constructor(init?: Partial<CampaignGoal>) { (Object as any).assign(this, init); }
}

export class Signup
{
    public ShowOnNewMembership?: boolean;
    public ShowOnSignupRenewal?: boolean;
    public ShowOtherAmount?: boolean;

    public constructor(init?: Partial<Signup>) { (Object as any).assign(this, init); }
}

export class CampaignItem
{
    public Id?: number;
    public Name?: string;
    public SubTitle?: string;
    public Description?: string;
    public HasGoal?: boolean;
    public DetailUri?: string;
    public Theme?: CampaignTheme;
    public Goal?: CampaignGoal;
    public Levels?: CampaignLevel[];
    public LogoUrl?: string;
    public HighResolutionLogoUrl?: string;
    public Signup?: Signup;

    public constructor(init?: Partial<CampaignItem>) { (Object as any).assign(this, init); }
}

export class GetCampaign extends GetCampaign implements IReturnLegacyException
{

    public constructor(init?: Partial<GetCampaign>) { super(init); (Object as any).assign(this, init); }
}

export class CampaignLevel
{
    public Sequence?: number;
    public Amount?: number;
    public Description?: string;

    public constructor(init?: Partial<CampaignLevel>) { (Object as any).assign(this, init); }
}

TypeScript GetCampaign DTOs

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

HTTP + XML

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: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CampaignItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common.Models">
  <Description>String</Description>
  <Goal>
    <Actual>0</Actual>
    <Target>0</Target>
  </Goal>
  <HasGoal>false</HasGoal>
  <HighResolutionLogoUrl>String</HighResolutionLogoUrl>
  <Id>0</Id>
  <Levels>
    <CampaignLevel>
      <Amount>0</Amount>
      <Description>String</Description>
      <Sequence>0</Sequence>
    </CampaignLevel>
  </Levels>
  <LogoUrl>String</LogoUrl>
  <Name>String</Name>
  <Signup>
    <ShowOnNewMembership>false</ShowOnNewMembership>
    <ShowOnSignupRenewal>false</ShowOnSignupRenewal>
    <ShowOtherAmount>false</ShowOtherAmount>
  </Signup>
  <SubTitle>String</SubTitle>
  <Theme>
    <Id>0</Id>
    <MainColor>String</MainColor>
    <Name>String</Name>
    <SecondaryColor>String</SecondaryColor>
    <iPhone>
      <BackgroundImage>String</BackgroundImage>
      <Icon>String</Icon>
    </iPhone>
    <iPhoneRetina>
      <BackgroundImage>String</BackgroundImage>
      <Icon>String</Icon>
    </iPhoneRetina>
  </Theme>
</CampaignItem>