| All Verbs | /api/contact/{ContactId}/notifications |
|---|
export class InputSwitch
{
public Id: string;
public Name: string;
public IsDisabled: boolean;
public IsChecked: boolean;
public constructor(init?: Partial<InputSwitch>) { (Object as any).assign(this, init); }
}
export class NotificationDetails
{
public NotificationId: string;
public NotificationGroupName: string;
public NotificationValueId: string;
public Name: string;
public Description: string;
public IsMandatory: boolean;
public IsCardinality: boolean;
public IsSystem: boolean;
public IsVisibleToRecipients: boolean;
public Index: number;
public Email: InputSwitch;
public SMS: InputSwitch;
public UpdateNotification: InputSwitch;
public Push: InputSwitch;
public Phone: InputSwitch;
public constructor(init?: Partial<NotificationDetails>) { (Object as any).assign(this, init); }
}
export class NotificationGroup
{
public GroupName: string;
public Notifications: NotificationDetails[];
public constructor(init?: Partial<NotificationGroup>) { (Object as any).assign(this, init); }
}
// @ApiResponse(Description="List of contact notifications")
export class GetContactNotificationsResponse
{
public Notifications: NotificationGroup[];
public ResponseStatus: ResponseStatus;
public constructor(init?: Partial<GetContactNotificationsResponse>) { (Object as any).assign(this, init); }
}
/** @description Get notifications for the specified contact */
// @Api(Description="Get notifications for the specified contact")
export class GetContactNotifications
{
/** @description Id of contact to get notifications for */
// @ApiMember(Description="Id of contact to get notifications for", IsRequired=true, Name="ContactId")
public ContactId: string;
/** @description Id of licensee to get notifications for */
// @ApiMember(Description="Id of licensee to get notifications for", IsRequired=true, Name="LicenseeId")
public LicenseeId: string;
/** @description Id of suite to get notifications for */
// @ApiMember(Description="Id of suite to get notifications for", IsRequired=true, Name="Suite")
public SuiteId: string;
public constructor(init?: Partial<GetContactNotifications>) { (Object as any).assign(this, init); }
}
TypeScript GetContactNotifications 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.
POST /api/contact/{ContactId}/notifications HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Notifications:
[
{
GroupName: String,
Notifications:
[
{
NotificationGroupName: String,
Name: String,
Description: String,
IsMandatory: False,
IsCardinality: False,
IsSystem: False,
IsVisibleToRecipients: False,
Index: 0,
Email:
{
Id: String,
Name: String,
IsDisabled: False,
IsChecked: False
},
SMS:
{
Id: String,
Name: String,
IsDisabled: False,
IsChecked: False
},
UpdateNotification:
{
Id: String,
Name: String,
IsDisabled: False,
IsChecked: False
},
Push:
{
Id: String,
Name: String,
IsDisabled: False,
IsChecked: False
},
Phone:
{
Id: String,
Name: String,
IsDisabled: False,
IsChecked: False
}
}
]
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}