| PUT | /api/contactrolegroups |
|---|
import Foundation
import ServiceStack
/**
* Update contact role group
*/
// @Api(Description="Update contact role group")
public class UpdateContactRoleGroup : Codable
{
/**
* Guid of the Contact Role Group to be updated.
*/
// @ApiMember(DataType="Guid", Description="Guid of the Contact Role Group to be updated.", IsRequired=true, Name="RoleGroupId", ParameterType="query")
public var roleGroupId:String
/**
* Contact role group name to be updated
*/
// @ApiMember(DataType="string", Description="Contact role group name to be updated", IsRequired=true, Name="Name", ParameterType="query")
public var name:String
public var roles:[ListItemModel]
required public init(){}
}
public class ListItemModel : Codable
{
public var listItemId:String
public var name:String
public var Description:String
public var shortName:String
public var isDefault:Bool
public var order:Int
public var listItemTrafficLightId:String
public var primaryListItemImageId:String
public var primaryListItemImageUrl:String
public var primaryImageThumbnailUrl:String
public var ownerContactId:String
public var recordStatus:String
required public init(){}
}
Swift UpdateContactRoleGroup 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 /api/contactrolegroups HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Name: String,
Roles:
[
{
Name: String,
Description: String,
ShortName: String,
IsDefault: False,
Order: 0,
PrimaryListItemImageUrl: String,
PrimaryImageThumbnailUrl: String,
RecordStatus: String
}
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}