FBiHBetting.Aggregator.WebApi

<back to all web services

ReportBetCancelations

The following routes are available for this service:
POST/bets/cancel
import Foundation
import ServiceStack

public class ReportBetCancelations : Codable
{
    public var betCancelations:[BetCancelation]

    required public init(){}
}

public class BetCancelation : Codable
{
    public var id:String
    public var origin:Origin
    public var betCanceledAt:Date
    public var paymentOrigin:PaymentOrigin
    public var payinRecap:PayinRecap

    required public init(){}
}

public class Origin : Codable
{
    public var device:Reference
    public var location:Reference
    public var locationGroup:Reference
    public var organization:Reference
    public var productInstance:ProductInstanceRef

    required public init(){}
}

public class Reference : Codable
{
    public var id:String
    public var value:String

    required public init(){}
}

public class ProductInstanceRef : Codable
{
    public var id:String
    public var name:String
    public var product:ProductReference

    required public init(){}
}

public class ProductReference : Codable
{
    public var id:String
    public var value:String
    public var category:ProductCategory
    public var productProvider:Reference

    required public init(){}
}

public enum ProductCategory : Int, Codable
{
    case Sportsbook = 0
    case RNG = 1
}

public enum PaymentOrigin : Int, Codable
{
    case POS = 0
    case SMS = 1
    case Internet = 2
}

public class PayinRecap : Codable
{
    public var payin:Double
    public var taxAmount:Double
    public var stake:Double

    required public init(){}
}


Swift ReportBetCancelations 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 /bets/cancel HTTP/1.1 
Host: fbihtaapi.bettor.webhop.biz 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"betCancelations":[{"id":"String","origin":{"device":{"id":"String","value":"String"},"location":{"id":"String","value":"String"},"locationGroup":{"id":"String","value":"String"},"organization":{"id":"String","value":"String"},"productInstance":{"id":"String","name":"String","product":{"id":"String","value":"String","category":0,"productProvider":{"id":"String","value":"String"}}}},"betCanceledAt":"0001-01-01T00:00:00.0000000Z","paymentOrigin":0,"payinRecap":{"payin":0,"taxAmount":0,"stake":0}}]}
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"}}