TicketUserServices

<back to all web services

SurveyCampaignCreateRequest

Requires Authentication
Required role:Admin
The following routes are available for this service:
POST/SurveyCampaign

export class SurveyCampaign
{
    public id?: number;
    // @StringLength(200)
    public name?: string;

    // @StringLength(16)
    public status?: string;

    // @StringLength(300)
    public subject?: string;

    // @StringLength(2147483647)
    public bodyHtml?: string;

    // @StringLength(300)
    public reminderSubject?: string;

    // @StringLength(2147483647)
    public reminderBodyHtml?: string;

    // @StringLength(320)
    public fromEmail?: string;

    // @StringLength(200)
    public fromName?: string;

    // @StringLength(8)
    public language?: string;

    public reminderAfterDays?: number;
    public maxReminders?: number;
    public createdAt?: string;
    public sentAt?: string;
    public closedAt?: string;

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

export class SurveyCampaignStats
{
    public recipients?: number;
    public pending?: number;
    public queued?: number;
    public sent?: number;
    public bounced?: number;
    public rejected?: number;
    public opened?: number;
    public clicked?: number;
    public responded?: number;
    public remindersSent?: number;
    public dueForReminder?: number;

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

export class SurveyCampaignResult
{
    public item?: SurveyCampaign;
    public stats?: SurveyCampaignStats;
    public statusCode?: number;
    public message?: string;

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

export class SurveyCampaignCreateRequest
{
    public item?: SurveyCampaign;

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

TypeScript SurveyCampaignCreateRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /SurveyCampaign HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"item":{"id":0,"name":"String","status":"String","subject":"String","bodyHtml":"String","reminderSubject":"String","reminderBodyHtml":"String","fromEmail":"String","fromName":"String","language":"String","reminderAfterDays":0,"maxReminders":0,"createdAt":"0001-01-01T00:00:00.0000000","sentAt":"0001-01-01T00:00:00.0000000","closedAt":"0001-01-01T00:00:00.0000000"}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"item":{"id":0,"name":"String","status":"String","subject":"String","bodyHtml":"String","reminderSubject":"String","reminderBodyHtml":"String","fromEmail":"String","fromName":"String","language":"String","reminderAfterDays":0,"maxReminders":0,"createdAt":"0001-01-01T00:00:00.0000000","sentAt":"0001-01-01T00:00:00.0000000","closedAt":"0001-01-01T00:00:00.0000000"},"stats":{"recipients":0,"pending":0,"queued":0,"sent":0,"bounced":0,"rejected":0,"opened":0,"clicked":0,"responded":0,"remindersSent":0,"dueForReminder":0},"statusCode":0,"message":"String"}