| 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 .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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: application/json
Content-Type: application/json
Content-Length: length
{"ContactId":"00000000-0000-0000-0000-000000000000","LicenseeId":"00000000-0000-0000-0000-000000000000","SuiteId":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Notifications":[{"GroupName":"String","Notifications":[{"NotificationId":"00000000-0000-0000-0000-000000000000","NotificationGroupName":"String","NotificationValueId":"00000000-0000-0000-0000-000000000000","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"}}}