Six4Win.WebApi

<back to all web services

RequestPoolTransaction

Requires Authentication
The following routes are available for this service:
POST/cmd/pool-transaction/request
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')


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PoolRef:
    id: int = 0
    name: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PoolTransaction:
    source: Optional[PoolRef] = None
    destination: Optional[PoolRef] = None
    amount: Decimal = decimal.Decimal(0)


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RequestPoolTransaction:
    id: Optional[str] = None
    transaction: Optional[PoolTransaction] = None

Python RequestPoolTransaction DTOs

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

HTTP + CSV

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

POST /cmd/pool-transaction/request HTTP/1.1 
Host: s4w1.api.bettor.webhop.biz 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"id":"String","transaction":{"source":{"id":0,"name":"String"},"destination":{"id":0,"name":"String"},"amount":0}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

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