Betting.WebApi

<back to all web services

SettleBets

Requires Authentication
The following routes are available for this service:
POST/cmd/slips/bets/settle/batch
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class SettleBets
    {
        public String id = null;
        public ArrayList<Bet> bets = null;
        
        public String getId() { return id; }
        public SettleBets setId(String value) { this.id = value; return this; }
        public ArrayList<Bet> getBets() { return bets; }
        public SettleBets setBets(ArrayList<Bet> value) { this.bets = value; return this; }
    }

    public static class Bet
    {
        public String id = null;
        public BetPlacementStatus placementStatus = null;
        public HashMap<String,String> payload = null;
        
        public String getId() { return id; }
        public Bet setId(String value) { this.id = value; return this; }
        public BetPlacementStatus getPlacementStatus() { return placementStatus; }
        public Bet setPlacementStatus(BetPlacementStatus value) { this.placementStatus = value; return this; }
        public HashMap<String,String> getPayload() { return payload; }
        public Bet setPayload(HashMap<String,String> value) { this.payload = value; return this; }
    }

    public static enum BetPlacementStatus
    {
        @SerializedName("0") Pending(0),
        @SerializedName("2") Accepted(2),
        @SerializedName("3") Rejected(3),
        @SerializedName("4") Failed(4);

        private final int value;
        BetPlacementStatus(final int intValue) { value = intValue; }
        public int getValue() { return value; }
    }

}

Java SettleBets DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

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

POST /cmd/slips/bets/settle/batch HTTP/1.1 
Host: api.sbbet.ath.cx 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"id":"String","bets":[{"id":"String","outcome":0,"winnings":0,"results":{"String":"String"}}]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

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