| Required role: | Admin |
| POST | /SurveyCampaign/{CampaignId}/Recipients |
|---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using TicketUserServices.ServiceModel;
namespace TicketUserServices.ServiceModel
{
public partial class SurveyRecipientImportRequest
{
public SurveyRecipientImportRequest()
{
Rows = new List<SurveyRecipientImportRow>{};
}
public virtual int CampaignId { get; set; }
public virtual List<SurveyRecipientImportRow> Rows { get; set; }
}
public partial class SurveyRecipientImportResult
{
public SurveyRecipientImportResult()
{
InvalidRows = new List<string>{};
}
public virtual int Inserted { get; set; }
public virtual int Skipped { get; set; }
public virtual int Invalid { get; set; }
public virtual List<string> InvalidRows { get; set; }
public virtual int StatusCode { get; set; }
public virtual string Message { get; set; }
}
public partial class SurveyRecipientImportRow
{
public virtual string Email { get; set; }
public virtual string Segment { get; set; }
public virtual string SurveyUrl { get; set; }
}
}
C# SurveyRecipientImportRequest DTOs
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.
POST /SurveyCampaign/{CampaignId}/Recipients HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
campaignId: 0,
rows:
[
{
email: String,
segment: String,
surveyUrl: String
}
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
inserted: 0,
skipped: 0,
invalid: 0,
invalidRows:
[
String
],
statusCode: 0,
message: String
}