Cochrane+ App API

<back to all web services

SubmitThunderBoltAction

Requires Authentication
The following routes are available for this service:
POST/thunderbolt/submit
import java.math.*
import java.util.*
import net.servicestack.client.*


open class SubmitThunderBoltAction : ApiServiceRequest()
{
    var actionId:Int? = null
    var platform:ContactInteractionPlatform? = null
    var number:String? = null
    var email:String? = null
    var notes:String? = null
    var dateTime:Date? = null
    var contactId:Int? = null
}

open class ApiServiceRequest : IServiceRequest, IHasApiKey, IHasDeviceInfo
{
    /**
    * The API Key required for authentication
    */
    @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
    var apiKey:String? = null

    /**
    * Latitude of the user making this request
    */
    @ApiMember(DataType="double", Description="Latitude of the user making this request")
    var latitude:Double? = null

    /**
    * Longitude of the user making this request
    */
    @ApiMember(DataType="double", Description="Longitude of the user making this request")
    var longitude:Double? = null
}

enum class ContactInteractionPlatform(val value:Int)
{
    @SerializedName("0") None(0),
    @SerializedName("1") Whatsapp(1),
    @SerializedName("2") Linkus(2),
    @SerializedName("3") Mobile(3),
    @SerializedName("4") Outlook(4),
    @SerializedName("5") LinkedIn(5),
    @SerializedName("6") Telegram(6),
    @SerializedName("7") Signal(7),
    @SerializedName("8") Sms(8),
}

open class SubmitThunderBoltActionResponse : GetThunderBoltActionsResponse()
{
    var thunderboltActionEventId:Int? = null
}

open class GetThunderBoltActionsResponse : ApiServiceResponse()
{
    var dailyActionsNumber:Int? = null
    var supportingDocumentProbability:Int? = null
    var thunderBoltActions:ArrayList<ThunderBoltActionData> = ArrayList<ThunderBoltActionData>()
    var thunderBoltActionEvents:ArrayList<ThunderBoltActionEventData> = ArrayList<ThunderBoltActionEventData>()
    var contacts:ArrayList<ContactData> = ArrayList<ContactData>()
}

open class ApiServiceResponse : IServiceResponse
{
    var description:String? = null
    var heading:String? = null
    var wasSuccessful:Boolean? = null
    var modelState:Object? = null
}

open class ThunderBoltActionData
{
    var id:Int? = null
    var actionName:String? = null
    var color:String? = null
    var dailyActionCount:Int? = null
    var showNumberInput:Boolean? = null
    var showEmailInput:Boolean? = null
    var showPlatformInput:Boolean? = null
    var showDateTimeInput:Boolean? = null
    var contactInteractionPlatforms:ArrayList<EnumOption> = ArrayList<EnumOption>()
}

open class EnumOption
{
    var value:Int? = null
    var label:String? = null
}

open class ThunderBoltActionEventData
{
    var id:Int? = null
    var createdDate:String? = null
    var actionId:Int? = null
    var actionName:String? = null
    var color:String? = null
    var notes:String? = null
}

open class ContactData
{
    var contactId:Int? = null
    var contactName:String? = null
    var email:String? = null
    var phoneNumber:String? = null
}

Kotlin SubmitThunderBoltAction DTOs

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

HTTP + CSV

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

POST /thunderbolt/submit HTTP/1.1 
Host: cochraneplus-api-dev.happen.zone 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"actionId":0,"platform":0,"number":"String","email":"String","notes":"String","dateTime":"0001-01-01T00:00:00.0000000","contactId":0,"apiKey":"String","latitude":0,"longitude":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"thunderboltActionEventId":0,"dailyActionsNumber":0,"supportingDocumentProbability":0,"thunderBoltActions":[{"id":0,"actionName":"String","color":"String","dailyActionCount":0,"showNumberInput":false,"showEmailInput":false,"showPlatformInput":false,"showDateTimeInput":false,"contactInteractionPlatforms":[{"value":0,"label":"String"}]}],"thunderBoltActionEvents":[{"id":0,"createdDate":"String","actionId":0,"actionName":"String","color":"String","notes":"String"}],"contacts":[{}],"description":"String","heading":"String","wasSuccessful":false,"modelState":{}}