Six4Win.WebApi

<back to all web services

RequestSuperWinReschedule

Requires Authentication
The following routes are available for this service:
POST/cmd/reschedule/super-win
package dtos

import (
	"time"
)

type SuperWinPoolState int

const (
	SuperWinPoolStateIdle         SuperWinPoolState = 0
	SuperWinPoolStateAccumulating SuperWinPoolState = 1
	SuperWinPoolStateAwarding     SuperWinPoolState = 2
)

type BettingApp struct {
	Name    *string `json:"name,omitempty"`
	Version *string `json:"version,omitempty"`
}

type Ref struct {
	Id  string `json:"id"`
	Val string `json:"val"`
}

type RefEx struct {
	Ref
	Data RecordDictionary[string, string] `json:"data"`
}

type Origin struct {
	Application   *BettingApp `json:"application,omitempty"`
	Ip            *string     `json:"ip,omitempty"`
	Organization  *RefEx      `json:"organization,omitempty"`
	Region        *Ref        `json:"region,omitempty"`
	LocationGroup *Ref        `json:"locationGroup,omitempty"`
	Location      *RefEx      `json:"location,omitempty"`
	Device        *RefEx      `json:"device,omitempty"`
	Clerk         *Ref        `json:"clerk,omitempty"`
}

type SuperWinWinner struct {
	IsDrawn                     bool      `json:"isDrawn,omitempty"`
	DrawnAtUtc                  time.Time `json:"drawnAtUtc,omitempty"`
	RoundId                     *string   `json:"roundId,omitempty"`
	BetId                       *string   `json:"betId,omitempty"`
	SlipId                      *string   `json:"slipId,omitempty"`
	Origin                      *Origin   `json:"origin,omitempty"`
	Bettor                      *Ref      `json:"bettor,omitempty"`
	Code                        *string   `json:"code,omitempty"`
	Amount                      float64   `json:"amount,omitempty"`
	LocationAddressOrBettorInfo *string   `json:"locationAddressOrBettorInfo,omitempty"`
}

type SuperWinPrize struct {
	Id          int             `json:"id,omitempty"`
	Amount      float64         `json:"amount,omitempty"`
	ScheduledAt time.Time       `json:"scheduledAt,omitempty"`
	Winner      *SuperWinWinner `json:"winner,omitempty"`
}

type SuperWinPool struct {
	Id       int                        `json:"id,omitempty"`
	State    SuperWinPoolState          `json:"state,omitempty"`
	Amount   float64                    `json:"amount,omitempty"`
	Schedule *RecordList[SuperWinPrize] `json:"schedule,omitempty"`
}

type SuperWinState struct {
	CurrentDate     *string                              `json:"currentDate,omitempty"`
	AvailableAmount float64                              `json:"availableAmount,omitempty"`
	Pools           *RecordDictionary[int, SuperWinPool] `json:"pools,omitempty"`
}

type RequestSuperWinReschedule struct {
	Id    *string        `json:"id,omitempty"`
	State *SuperWinState `json:"state,omitempty"`
}

type RecordDictionary[TKey any, TVal any] map[TKey]TVal

type RecordList[T any] []T

Go RequestSuperWinReschedule 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

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /cmd/reschedule/super-win HTTP/1.1 
Host: s4w1.api.bettor.webhop.biz 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"id":"String","state":{"currentDate":"String","availableAmount":0,"pools":{"0":{"id":0,"state":0,"amount":0,"schedule":[{"id":0,"amount":0,"scheduledAt":"0001-01-01T00:00:00.0000000Z","winner":{"isDrawn":false,"drawnAtUtc":"0001-01-01T00:00:00.0000000Z","roundId":"String","betId":"String","slipId":"String","origin":{"application":{"name":"String","version":"String"},"ip":"String","organization":{"data":{"String":"String"},"id":"String","val":"String"},"region":{"id":"String","val":"String"},"locationGroup":{"id":"String","val":"String"},"location":{"data":{"String":"String"},"id":"String","val":"String"},"device":{"data":{"String":"String"},"id":"String","val":"String"},"clerk":{"id":"String","val":"String"}},"bettor":{"id":"String","val":"String"},"code":"String","amount":0,"locationAddressOrBettorInfo":"String"}}]}}}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}