digitaluapi

<back to all web services

CampaignActionsAdd

Requires Authentication
Requires any of the roles:Client, Admin, Partner
The following routes are available for this service:
POST/campaign_actions
import 'package:servicestack/servicestack.dart';

class CampaignActionsAddResponse implements IConvertible
{
    // @DataMember(Order=2)
    int? CampaignsId;

    // @DataMember(Order=3)
    int? ActionsId;

    // @DataMember(Order=5)
    ResponseStatus? ResponseStatus;

    CampaignActionsAddResponse({this.CampaignsId,this.ActionsId,this.ResponseStatus});
    CampaignActionsAddResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CampaignsId = json['CampaignsId'];
        ActionsId = json['ActionsId'];
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CampaignsId': CampaignsId,
        'ActionsId': ActionsId,
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

    getTypeName() => "CampaignActionsAddResponse";
    TypeContext? context = _ctx;
}

// @DataContract
class CampaignActionsAdd implements IConvertible
{
    // @DataMember(Order=2)
    // @Validate(Validator="NotNull")
    int? CampaignsId;

    // @DataMember(Order=3)
    // @Validate(Validator="NotNull")
    int? ActionsId;

    CampaignActionsAdd({this.CampaignsId,this.ActionsId});
    CampaignActionsAdd.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CampaignsId = json['CampaignsId'];
        ActionsId = json['ActionsId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CampaignsId': CampaignsId,
        'ActionsId': ActionsId
    };

    getTypeName() => "CampaignActionsAdd";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'duengageapi.uat.scadsoftware.com', types: <String, TypeInfo> {
    'CampaignActionsAddResponse': TypeInfo(TypeOf.Class, create:() => CampaignActionsAddResponse()),
    'CampaignActionsAdd': TypeInfo(TypeOf.Class, create:() => CampaignActionsAdd()),
});

Dart CampaignActionsAdd 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 /campaign_actions HTTP/1.1 
Host: duengageapi.uat.scadsoftware.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"CampaignsId":0,"ActionsId":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"CampaignsId":0,"ActionsId":0,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}