| POST | /cmd/slips |
|---|
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
open class SubmitSlip
{
open var id:String? = null
open var bettor:Ref? = null
open var origin:Origin? = null
open var betRequests:ArrayList<BetRequest>? = null
open var headerData:HashMap<String,String>? = null
}
open class Ref
{
open var id:String? = null
@SerializedName("val") open var Val:String? = null
}
open class Origin
{
open var application:BettingApp? = null
open var ip:String? = null
open var organization:RefEx? = null
open var region:Ref? = null
open var locationGroup:Ref? = null
open var location:RefEx? = null
open var device:RefEx? = null
open var clerk:Ref? = null
}
open class BettingApp
{
open var name:String? = null
open var version:String? = null
}
open class RefEx : Ref()
{
@SerializedName("data") open var Data:RecordDictionary<String, String>? = null
}
open class RecordDictionary<TKey, TVal> : HashMap<TKey,TVal>()
{
}
open class BetRequest
{
open var betId:String? = null
open var productInstance:ProductInstanceRef? = null
open var payload:HashMap<String,String>? = null
open var payinRecap:PayinRecap? = null
open var possiblePayoutRecap:PayoutRecap? = null
}
open class ProductInstanceRef
{
open var id:String? = null
open var name:String? = null
open var title:String? = null
open var product:ProductReference? = null
}
open class ProductReference
{
open var id:String? = null
open var value:String? = null
open var category:String? = null
open var productProvider:Ref? = null
}
open class PayinRecap
{
open var currency:String? = null
open var payin:BigDecimal? = null
open var payinTaxationPolicyRef:Ref? = null
open var taxAmount:BigDecimal? = null
open var stake:BigDecimal? = null
}
open class PayoutRecap
{
open var currency:String? = null
open var winnings:BigDecimal? = null
open var winningsTaxationPolicyRef:Ref? = null
open var taxAmount:BigDecimal? = null
open var payout:BigDecimal? = null
}
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 /cmd/slips HTTP/1.1
Host: api.sbbet.ath.cx
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
id: String,
bettor:
{
id: String,
val: 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
}
},
betRequests:
[
{
betId: String,
productInstance:
{
id: String,
name: String,
title: String,
product:
{
id: String,
value: String,
category: String,
productProvider:
{
id: String,
val: String
}
}
},
payload:
{
String: String
},
payinRecap:
{
currency: String,
payin: 0,
payinTaxationPolicyRef:
{
id: String,
val: String
},
taxAmount: 0,
stake: 0
},
possiblePayoutRecap:
{
currency: String,
winnings: 0,
winningsTaxationPolicyRef:
{
id: String,
val: String
},
taxAmount: 0,
payout: 0
}
}
],
headerData:
{
String: String
}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}