Betting.WebApi

<back to all web services

RegisterOrganizationIntegrations

Requires Authentication
The following routes are available for this service:
POST/cmd/organizations/register/integrations
package dtos

type OrganizationNature int

const (
	OrganizationNatureFirstParty OrganizationNature = 1
	OrganizationNaturePartner    OrganizationNature = 2
)

type IntegrationConnection struct {
	Url            *string `json:"url,omitempty"`
	CredentialsRef *string `json:"credentialsRef,omitempty"`
}

type IntegrationInstance struct {
	Id                    *string                `json:"id,omitempty"`
	IntegrationId         *string                `json:"integrationId,omitempty"`
	Wallet                *IntegrationConnection `json:"wallet,omitempty"`
	PartnerApi            *IntegrationConnection `json:"partnerApi,omitempty"`
	SlipForwardingEnabled bool                   `json:"slipForwardingEnabled,omitempty"`
}

type OrganizationIntegrations struct {
	FirstParty *IntegrationInstance `json:"firstParty,omitempty"`
	Partner    *IntegrationInstance `json:"partner,omitempty"`
}

type WalletPayoutMode int

const (
	WalletPayoutModeRealTime    WalletPayoutMode = 0
	WalletPayoutModeBatchPayout WalletPayoutMode = 1
)

type PayoutPolicy struct {
	SelfService WalletPayoutMode `json:"selfService,omitempty"`
	Personal    WalletPayoutMode `json:"personal,omitempty"`
}

type RegisterOrganizationIntegrations struct {
	Id           *string                   `json:"id,omitempty"`
	Nature       OrganizationNature        `json:"nature,omitempty"`
	Integrations *OrganizationIntegrations `json:"integrations,omitempty"`
	PayoutPolicy *PayoutPolicy             `json:"payoutPolicy,omitempty"`
}

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