Betting.WebApi

<back to all web services

RegisterOrganizationIntegrations

Requires Authentication
The following routes are available for this service:
POST/cmd/organizations/register/integrations
"use strict";
/** @typedef {number} */
export var OrganizationNature;
(function (OrganizationNature) {
    OrganizationNature[OrganizationNature["FirstParty"] = 1] = "FirstParty"
    OrganizationNature[OrganizationNature["Partner"] = 2] = "Partner"
})(OrganizationNature || (OrganizationNature = {}));
export class IntegrationConnection {
    /** @param {{url?:string,credentialsRef?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?string} */
    url;
    /** @type {?string} */
    credentialsRef;
}
export class IntegrationInstance {
    /** @param {{id?:string,integrationId?:string,wallet?:IntegrationConnection,partnerApi?:IntegrationConnection,slipForwardingEnabled?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?string} */
    id;
    /** @type {?string} */
    integrationId;
    /** @type {?IntegrationConnection} */
    wallet;
    /** @type {?IntegrationConnection} */
    partnerApi;
    /** @type {boolean} */
    slipForwardingEnabled;
}
export class OrganizationIntegrations {
    /** @param {{firstParty?:IntegrationInstance,partner?:IntegrationInstance}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?IntegrationInstance} */
    firstParty;
    /** @type {?IntegrationInstance} */
    partner;
}
/** @typedef {number} */
export var WalletPayoutMode;
(function (WalletPayoutMode) {
    WalletPayoutMode[WalletPayoutMode["RealTime"] = 0] = "RealTime"
    WalletPayoutMode[WalletPayoutMode["BatchPayout"] = 1] = "BatchPayout"
})(WalletPayoutMode || (WalletPayoutMode = {}));
export class PayoutPolicy {
    /** @param {{selfService?:WalletPayoutMode,personal?:WalletPayoutMode}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {WalletPayoutMode} */
    selfService;
    /** @type {WalletPayoutMode} */
    personal;
}
export class RegisterOrganizationIntegrations {
    /** @param {{id?:string,nature?:OrganizationNature,integrations?:OrganizationIntegrations,payoutPolicy?:PayoutPolicy}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?string} */
    id;
    /** @type {OrganizationNature} */
    nature;
    /** @type {?OrganizationIntegrations} */
    integrations;
    /** @type {?PayoutPolicy} */
    payoutPolicy;
}

JavaScript RegisterOrganizationIntegrations DTOs

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

HTTP + JSV

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

POST /cmd/organizations/register/integrations HTTP/1.1 
Host: api.bettor.webhop.biz 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	id: String,
	nature: 1,
	integrations: 
	{
		firstParty: 
		{
			id: String,
			integrationId: String,
			wallet: 
			{
				url: String,
				credentialsRef: String
			},
			partnerApi: 
			{
				url: String,
				credentialsRef: String
			},
			slipForwardingEnabled: False
		},
		partner: 
		{
			id: String,
			integrationId: String,
			wallet: 
			{
				url: String,
				credentialsRef: String
			},
			partnerApi: 
			{
				url: String,
				credentialsRef: String
			},
			slipForwardingEnabled: False
		}
	},
	payoutPolicy: 
	{
		selfService: 0,
		personal: 0
	}
}
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
	}
}