Greyhounds.WebApi

<back to all web services

CancelBet

The following routes are available for this service:
POST/bets/cancel
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 BettingApp:
    name: Optional[str] = None
    version: Optional[str] = None


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


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Origin:
    application: Optional[BettingApp] = None
    ip: Optional[str] = None
    organization: Optional[Reference] = None
    device: Optional[Reference] = None
    location: Optional[Reference] = None
    location_group: Optional[Reference] = None
    clerk: Optional[Reference] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CancelBet:
    id: Optional[str] = None
    slip_id: Optional[str] = None
    origin: Optional[Origin] = None

Python CancelBet DTOs

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

HTTP + OTHER

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

POST /bets/cancel HTTP/1.1 
Host: grh1.api.bettor.webhop.biz 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"id":"String","slipId":"String","origin":{"application":{"name":"String","version":"String"},"ip":"String","organization":{"id":"String","value":"String"},"device":{"id":"String","value":"String"},"location":{"id":"String","value":"String"},"locationGroup":{"id":"String","value":"String"},"clerk":{"id":"String","value":"String"}}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

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