| All Verbs | /qry/users/notifications |
|---|
const std = @import("std");
pub const Severity = enum(i32) {
Success = 0,
Info = 1,
Warning = 2,
Error = 3,
};
pub const NotificationType = enum(i32) {
Default = 0,
SlipDeliveryConfirmationRequest = 1,
SlipDeliveryIssueResolved = 2,
};
pub const Notification = struct {
severity: ?Severity = null,
type: ?NotificationType = null,
data: ?RecordDictionary = null,
};
pub const UserNotification = struct {
id: ?[]const u8 = null,
notification: ?Notification = null,
dispatchedAt: ?[]const u8 = null,
};
pub const UserNotifications = struct {
isOverflown: bool = false,
id: ?[]const u8 = null,
n: i32 = 0,
s: i32 = 0,
i: i32 = 0,
w: i32 = 0,
e: i32 = 0,
notifications: ?std.json.Value = null,
};
pub const GetUserNotifications = struct {
id: ?[]const u8 = null,
};
pub fn RecordDictionary(comptime TKey: type, comptime TVal: type) type {
_ = TKey;
_ = TVal;
return struct {};
}
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 /qry/users/notifications HTTP/1.1
Host: api.bettor.webhop.biz
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
id: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
isOverflown: False,
id: String,
n: 1,
s: 1,
i: 0,
w: 0,
e: 0,
notifications:
{
String:
{
id: String,
notification:
{
severity: 0,
type: 0,
data:
{
String: String
}
},
dispatchedAt: 0001-01-01
}
}
}