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.*;

public class dtos
{

    public static class SubmitThunderBoltAction extends ApiServiceRequest
    {
        public Integer actionId = null;
        public ContactInteractionPlatform platform = null;
        public String number = null;
        public String email = null;
        public String notes = null;
        public Date dateTime = null;
        public Integer contactId = null;
        
        public Integer getActionId() { return actionId; }
        public SubmitThunderBoltAction setActionId(Integer value) { this.actionId = value; return this; }
        public ContactInteractionPlatform getPlatform() { return platform; }
        public SubmitThunderBoltAction setPlatform(ContactInteractionPlatform value) { this.platform = value; return this; }
        public String getNumber() { return number; }
        public SubmitThunderBoltAction setNumber(String value) { this.number = value; return this; }
        public String getEmail() { return email; }
        public SubmitThunderBoltAction setEmail(String value) { this.email = value; return this; }
        public String getNotes() { return notes; }
        public SubmitThunderBoltAction setNotes(String value) { this.notes = value; return this; }
        public Date getDateTime() { return dateTime; }
        public SubmitThunderBoltAction setDateTime(Date value) { this.dateTime = value; return this; }
        public Integer getContactId() { return contactId; }
        public SubmitThunderBoltAction setContactId(Integer value) { this.contactId = value; return this; }
    }

    public static class ApiServiceRequest implements IServiceRequest, IHasApiKey, IHasDeviceInfo
    {
        /**
        * The API Key required for authentication
        */
        @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
        public String apiKey = null;

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

        /**
        * Longitude of the user making this request
        */
        @ApiMember(DataType="double", Description="Longitude of the user making this request")
        public Double longitude = null;
        
        public String getApiKey() { return apiKey; }
        public ApiServiceRequest setApiKey(String value) { this.apiKey = value; return this; }
        public Double getLatitude() { return latitude; }
        public ApiServiceRequest setLatitude(Double value) { this.latitude = value; return this; }
        public Double getLongitude() { return longitude; }
        public ApiServiceRequest setLongitude(Double value) { this.longitude = value; return this; }
    }

    public static enum ContactInteractionPlatform
    {
        @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);

        private final int value;
        ContactInteractionPlatform(final int intValue) { value = intValue; }
        public int getValue() { return value; }
    }

    public static class SubmitThunderBoltActionResponse extends GetThunderBoltActionsResponse
    {
        public Integer thunderboltActionEventId = null;
        
        public Integer getThunderboltActionEventId() { return thunderboltActionEventId; }
        public SubmitThunderBoltActionResponse setThunderboltActionEventId(Integer value) { this.thunderboltActionEventId = value; return this; }
    }

    public static class GetThunderBoltActionsResponse extends ApiServiceResponse
    {
        public Integer dailyActionsNumber = null;
        public Integer supportingDocumentProbability = null;
        public ArrayList<ThunderBoltActionData> thunderBoltActions = null;
        public ArrayList<ThunderBoltActionEventData> thunderBoltActionEvents = null;
        public ArrayList<ContactData> contacts = null;
        
        public Integer getDailyActionsNumber() { return dailyActionsNumber; }
        public GetThunderBoltActionsResponse setDailyActionsNumber(Integer value) { this.dailyActionsNumber = value; return this; }
        public Integer getSupportingDocumentProbability() { return supportingDocumentProbability; }
        public GetThunderBoltActionsResponse setSupportingDocumentProbability(Integer value) { this.supportingDocumentProbability = value; return this; }
        public ArrayList<ThunderBoltActionData> getThunderBoltActions() { return thunderBoltActions; }
        public GetThunderBoltActionsResponse setThunderBoltActions(ArrayList<ThunderBoltActionData> value) { this.thunderBoltActions = value; return this; }
        public ArrayList<ThunderBoltActionEventData> getThunderBoltActionEvents() { return thunderBoltActionEvents; }
        public GetThunderBoltActionsResponse setThunderBoltActionEvents(ArrayList<ThunderBoltActionEventData> value) { this.thunderBoltActionEvents = value; return this; }
        public ArrayList<ContactData> getContacts() { return contacts; }
        public GetThunderBoltActionsResponse setContacts(ArrayList<ContactData> value) { this.contacts = value; return this; }
    }

    public static class ApiServiceResponse implements IServiceResponse
    {
        public String description = null;
        public String heading = null;
        public Boolean wasSuccessful = null;
        public Object modelState = null;
        
        public String getDescription() { return description; }
        public ApiServiceResponse setDescription(String value) { this.description = value; return this; }
        public String getHeading() { return heading; }
        public ApiServiceResponse setHeading(String value) { this.heading = value; return this; }
        public Boolean isWasSuccessful() { return wasSuccessful; }
        public ApiServiceResponse setWasSuccessful(Boolean value) { this.wasSuccessful = value; return this; }
        public Object getModelState() { return modelState; }
        public ApiServiceResponse setModelState(Object value) { this.modelState = value; return this; }
    }

    public static class ThunderBoltActionData
    {
        public Integer id = null;
        public String actionName = null;
        public String color = null;
        public Integer dailyActionCount = null;
        public Boolean showNumberInput = null;
        public Boolean showEmailInput = null;
        public Boolean showPlatformInput = null;
        public Boolean showDateTimeInput = null;
        public ArrayList<EnumOption> contactInteractionPlatforms = null;
        
        public Integer getId() { return id; }
        public ThunderBoltActionData setId(Integer value) { this.id = value; return this; }
        public String getActionName() { return actionName; }
        public ThunderBoltActionData setActionName(String value) { this.actionName = value; return this; }
        public String getColor() { return color; }
        public ThunderBoltActionData setColor(String value) { this.color = value; return this; }
        public Integer getDailyActionCount() { return dailyActionCount; }
        public ThunderBoltActionData setDailyActionCount(Integer value) { this.dailyActionCount = value; return this; }
        public Boolean isShowNumberInput() { return showNumberInput; }
        public ThunderBoltActionData setShowNumberInput(Boolean value) { this.showNumberInput = value; return this; }
        public Boolean isShowEmailInput() { return showEmailInput; }
        public ThunderBoltActionData setShowEmailInput(Boolean value) { this.showEmailInput = value; return this; }
        public Boolean isShowPlatformInput() { return showPlatformInput; }
        public ThunderBoltActionData setShowPlatformInput(Boolean value) { this.showPlatformInput = value; return this; }
        public Boolean isShowDateTimeInput() { return showDateTimeInput; }
        public ThunderBoltActionData setShowDateTimeInput(Boolean value) { this.showDateTimeInput = value; return this; }
        public ArrayList<EnumOption> getContactInteractionPlatforms() { return contactInteractionPlatforms; }
        public ThunderBoltActionData setContactInteractionPlatforms(ArrayList<EnumOption> value) { this.contactInteractionPlatforms = value; return this; }
    }

    public static class EnumOption
    {
        public Integer value = null;
        public String label = null;
        
        public Integer getValue() { return value; }
        public EnumOption setValue(Integer value) { this.value = value; return this; }
        public String getLabel() { return label; }
        public EnumOption setLabel(String value) { this.label = value; return this; }
    }

    public static class ThunderBoltActionEventData
    {
        public Integer id = null;
        public String createdDate = null;
        public Integer actionId = null;
        public String actionName = null;
        public String color = null;
        public String notes = null;
        
        public Integer getId() { return id; }
        public ThunderBoltActionEventData setId(Integer value) { this.id = value; return this; }
        public String getCreatedDate() { return createdDate; }
        public ThunderBoltActionEventData setCreatedDate(String value) { this.createdDate = value; return this; }
        public Integer getActionId() { return actionId; }
        public ThunderBoltActionEventData setActionId(Integer value) { this.actionId = value; return this; }
        public String getActionName() { return actionName; }
        public ThunderBoltActionEventData setActionName(String value) { this.actionName = value; return this; }
        public String getColor() { return color; }
        public ThunderBoltActionEventData setColor(String value) { this.color = value; return this; }
        public String getNotes() { return notes; }
        public ThunderBoltActionEventData setNotes(String value) { this.notes = value; return this; }
    }

    public static class ContactData
    {
        public Integer contactId = null;
        public String contactName = null;
        public String email = null;
        public String phoneNumber = null;
        
        public Integer getContactId() { return contactId; }
        public ContactData setContactId(Integer value) { this.contactId = value; return this; }
        public String getContactName() { return contactName; }
        public ContactData setContactName(String value) { this.contactName = value; return this; }
        public String getEmail() { return email; }
        public ContactData setEmail(String value) { this.email = value; return this; }
        public String getPhoneNumber() { return phoneNumber; }
        public ContactData setPhoneNumber(String value) { this.phoneNumber = value; return this; }
    }

}

Java SubmitThunderBoltAction DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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: application/json
Content-Type: application/json
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: application/json
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":{}}