| POST | /api/sendmessage | ||
|---|---|---|---|
| POST | /api/sendmessage/immediate | ||
| POST | /api/send | ||
| POST | /api/sms/send | ||
| POST | /api/send/immediate | ||
| POST | /api/sms/send/immediate |
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Eros.Subtle.Dvaravartman.Common.Model.ServiceModel;
using Eros.Subtle.Dvaravartman.Common.Model;
using Eros.Saguna.Common.Library.ServiceModels;
namespace Eros.Saguna.Common.Library.ServiceModels
{
public partial class BaseLicenseeEnforcedServiceModel
{
public virtual Guid LicenseeId { get; set; }
}
}
namespace Eros.Subtle.Dvaravartman.Common.Model
{
public partial class CommResponse
{
public virtual Guid CommId { get; set; }
public virtual string Reference { get; set; }
public virtual bool Status { get; set; }
public virtual string Message { get; set; }
}
public partial class SMSContact
{
public virtual string Name { get; set; }
public virtual string PhoneNumber { get; set; }
public virtual Guid ContactId { get; set; }
}
public partial class SMSModel
: BaseLicenseeEnforcedServiceModel
{
public virtual SMSContact From { get; set; }
public virtual List<SMSContact> To { get; set; }
public virtual string MessageBody { get; set; }
public virtual bool ReplyIsAllowed { get; set; }
public virtual bool ReplyIsRequired { get; set; }
public virtual string Notes { get; set; }
public virtual Guid LinkedObjectId { get; set; }
public virtual Guid SuiteId { get; set; }
}
}
namespace Eros.Subtle.Dvaravartman.Common.Model.ServiceModel
{
///<summary>
///Saves the specified SMS and sends it for background processing
///</summary>
[Api(Description="Saves the specified SMS and sends it for background processing")]
public partial class SMSSend
{
public virtual SMSModel SMSModel { get; set; }
public virtual bool CreateCommunicationReferencesImmediately { get; set; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/sendmessage HTTP/1.1
Host: production-eros-gateway-api-sms-wa.azurewebsites.net
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"SMSModel":{"From":{"Name":"String","PhoneNumber":"String","ContactId":"00000000000000000000000000000000"},"To":[{"Name":"String","PhoneNumber":"String","ContactId":"00000000000000000000000000000000"}],"MessageBody":"String","ReplyIsAllowed":false,"ReplyIsRequired":false,"Notes":"String","LinkedObjectId":"00000000000000000000000000000000","SuiteId":"00000000000000000000000000000000","LicenseeId":"00000000000000000000000000000000"},"CreateCommunicationReferencesImmediately":false}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"CommId":"00000000000000000000000000000000","Reference":"String","Status":false,"Message":"String"}