SMS Gateway API

<back to all web services

SendTask

Requires Authentication
namespace Eros.Saguna.Common.GatewayClient.ServiceModel

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    type GatewayResponseStatus =
        | Initiated = 0
        | Successful = 1
        | JobError = 2

    [<AllowNullLiteral>]
    type GatewayTaskResponse() = 
        member val ReferenceId:Guid = new Guid() with get,set
        member val GatewayTaskResponseStatus:GatewayResponseStatus = new GatewayResponseStatus() with get,set
        member val Payload:String = null with get,set

    [<AllowNullLiteral>]
    type BaseQueueMessage() = 
        member val LicenseeId:Guid = new Guid() with get,set

    [<AllowNullLiteral>]
    type GatewayTask() = 
        inherit BaseQueueMessage()
        member val ReferenceId:Guid = new Guid() with get,set
        member val JobTypeId:Guid = new Guid() with get,set
        member val IsBeingProcessed:Boolean = new Boolean() with get,set
        member val Payload:String = null with get,set
        member val ContentStoredExternally:Boolean = new Boolean() with get,set
        member val ResendRequest:Boolean = new Boolean() with get,set

    [<AllowNullLiteral>]
    type SendTask() = 
        member val GatewayTask:GatewayTask = null with get,set

F# 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"}