| GET | /campaigns |
|---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BH.CloudAPI.Common4.DTO;
using BH.CloudAPI.Common.Models;
namespace BH.CloudAPI.Common.Models
{
public partial class CampaignGoal
{
public virtual decimal Target { get; set; }
public virtual decimal Actual { get; set; }
}
public partial class CampaignItem
{
public CampaignItem()
{
Levels = new CampaignLevel[]{};
}
public virtual int Id { get; set; }
public virtual string Name { get; set; }
public virtual string SubTitle { get; set; }
public virtual string Description { get; set; }
public virtual bool HasGoal { get; set; }
public virtual string DetailUri { get; set; }
public virtual CampaignTheme Theme { get; set; }
public virtual CampaignGoal Goal { get; set; }
public virtual CampaignLevel[] Levels { get; set; }
public virtual string LogoUrl { get; set; }
public virtual string HighResolutionLogoUrl { get; set; }
public virtual Signup Signup { get; set; }
}
public partial class CampaignLevel
{
public virtual int Sequence { get; set; }
public virtual decimal Amount { get; set; }
public virtual string Description { get; set; }
}
public partial class CampaignTheme
{
public virtual int Id { get; set; }
public virtual string Name { get; set; }
public virtual string MainColor { get; set; }
public virtual string SecondaryColor { get; set; }
public virtual CampaignThemeImage iPhone { get; set; }
public virtual CampaignThemeImage iPhoneRetina { get; set; }
}
public partial class CampaignThemeImage
{
public virtual string BackgroundImage { get; set; }
public virtual string Icon { get; set; }
}
public partial class Signup
{
public virtual bool ShowOnNewMembership { get; set; }
public virtual bool ShowOnSignupRenewal { get; set; }
public virtual bool ShowOtherAmount { get; set; }
}
}
namespace BH.CloudAPI.Common4.DTO
{
public partial class CampaignRq
{
public virtual string groupId { get; set; }
public virtual bool? signUp { get; set; }
public virtual bool? payment { get; set; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=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
}
}