Betting.WebApi

<back to all web services

RegisterOrganizationIntegrations

Requires Authentication
The following routes are available for this service:
POST/cmd/organizations/register/integrations
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
Object = TypeVar('Object')


class OrganizationNature(IntEnum):
    FIRST_PARTY = 1
    PARTNER = 2


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class IntegrationConnection:
    url: Optional[str] = None
    credentials_ref: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class IntegrationInstance:
    id: Optional[str] = None
    integration_id: Optional[str] = None
    wallet: Optional[IntegrationConnection] = None
    partner_api: Optional[IntegrationConnection] = None
    slip_forwarding_enabled: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class OrganizationIntegrations:
    first_party: Optional[IntegrationInstance] = None
    partner: Optional[IntegrationInstance] = None


class WalletPayoutMode(IntEnum):
    REAL_TIME = 0
    BATCH_PAYOUT = 1


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PayoutPolicy:
    self_service: Optional[WalletPayoutMode] = None
    personal: Optional[WalletPayoutMode] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RegisterOrganizationIntegrations:
    id: Optional[str] = None
    nature: Optional[OrganizationNature] = None
    integrations: Optional[OrganizationIntegrations] = None
    payout_policy: Optional[PayoutPolicy] = None

Python RegisterOrganizationIntegrations DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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: application/json
Content-Type: application/json
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: application/json
Content-Length: length

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