SMS Gateway API

<back to all web services

SendTask

Requires Authentication
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Eros.Saguna.Common.GatewayClient.ServiceModel
Imports Eros.Saguna.Common.Library
Imports Eros.Saguna.Common.Library.Queuing

Namespace Global

    Namespace Eros.Saguna.Common.GatewayClient.ServiceModel

        Public Partial Class SendTask
            Public Overridable Property GatewayTask As GatewayTask
        End Class
    End Namespace

    Namespace Eros.Saguna.Common.Library

        Public Enum GatewayResponseStatus
            Initiated
            Successful
            JobError
        End Enum

        Public Partial Class GatewayTask
            Inherits BaseQueueMessage
            Public Overridable Property ReferenceId As Guid
            Public Overridable Property JobTypeId As Guid
            Public Overridable Property IsBeingProcessed As Boolean
            Public Overridable Property Payload As String
            Public Overridable Property ContentStoredExternally As Boolean
            Public Overridable Property ResendRequest As Boolean
        End Class

        Public Partial Class GatewayTaskResponse
            Public Overridable Property ReferenceId As Guid
            Public Overridable Property GatewayTaskResponseStatus As GatewayResponseStatus
            Public Overridable Property Payload As String
        End Class
    End Namespace

    Namespace Eros.Saguna.Common.Library.Queuing

        Public Partial Class BaseQueueMessage
            Public Overridable Property LicenseeId As Guid
        End Class
    End Namespace
End Namespace

VB.NET SendTask DTOs

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

HTTP + OTHER

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

POST /jsonl/reply/SendTask HTTP/1.1 
Host: production-eros-gateway-api-sms-wa.azurewebsites.net 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"GatewayTask":{"ReferenceId":"00000000000000000000000000000000","JobTypeId":"00000000000000000000000000000000","IsBeingProcessed":false,"Payload":"String","ContentStoredExternally":false,"ResendRequest":false,"LicenseeId":"00000000000000000000000000000000"}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"ReferenceId":"00000000000000000000000000000000","GatewayTaskResponseStatus":"Initiated","Payload":"String"}