| All Verbs | /qry/users/notifications |
|---|
package dtos
import (
"time"
)
type Severity int
const (
SeveritySuccess Severity = 0
SeverityInfo Severity = 1
SeverityWarning Severity = 2
SeverityError Severity = 3
)
type NotificationType int
const (
NotificationTypeDefault NotificationType = 0
NotificationTypeSlipDeliveryConfirmationRequest NotificationType = 1
NotificationTypeSlipDeliveryIssueResolved NotificationType = 2
)
type Notification struct {
Severity Severity `json:"severity,omitempty"`
Type NotificationType `json:"type,omitempty"`
Data *RecordDictionary[string, string] `json:"data,omitempty"`
}
type UserNotification struct {
Id *string `json:"id,omitempty"`
Notification *Notification `json:"notification,omitempty"`
DispatchedAt time.Time `json:"dispatchedAt,omitempty"`
}
type UserNotifications struct {
IsOverflown bool `json:"isOverflown,omitempty"`
Id *string `json:"id,omitempty"`
N int `json:"n,omitempty"`
S int `json:"s,omitempty"`
I int `json:"i,omitempty"`
W int `json:"w,omitempty"`
E int `json:"e,omitempty"`
Notifications map[string]UserNotification `json:"notifications,omitempty"`
}
type GetUserNotifications struct {
Id *string `json:"id,omitempty"`
}
type RecordDictionary[TKey any, TVal any] map[TKey]TVal
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
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/jsonl
Content-Type: text/jsonl
Content-Length: length
{"id":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
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-01T00:00:00.0000000Z"}}}