| Requires any of the roles: | Client, Admin, Partner |
| PUT | /campaign/actionform | Set Campaign Action Form |
|---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SetCampaignActionFormResponse:
status: bool = False
response_status: Optional[ResponseStatus] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FormFieldOption:
value: Optional[str] = None
label: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FormField:
id: int = 0
control_type: Optional[str] = None
label: Optional[str] = None
placeholder: Optional[str] = None
help: Optional[str] = None
name: Optional[str] = None
sort_order: int = 0
options: Optional[List[FormFieldOption]] = None
validation: Optional[List[str]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SetCampaignActionForm:
# @Validate(Validator="NotNull")
campaigns_id: int = 0
campaign_actions_id: int = 0
form_meta: Optional[List[FormField]] = None
Python SetCampaignActionForm DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /campaign/actionform HTTP/1.1
Host: duengageapi.uat.scadsoftware.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
CampaignsId: 0,
CampaignActionsId: 0,
FormMeta:
[
{
Id: 0,
ControlType: String,
Label: String,
Placeholder: String,
Help: String,
Name: String,
SortOrder: 0,
Options:
[
{
Value: String,
Label: String
}
],
Validation:
[
String
]
}
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Status: False,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}