| GET,OPTIONS | /v1/dispatch/track/{Token}/json |
|---|
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
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DispatchTrackStepView:
name: Optional[str] = None
at: Optional[datetime.datetime] = None
done: bool = False
current: bool = False
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DispatchTrackResponse:
kind: Optional[str] = None
code: Optional[str] = None
what: Optional[str] = None
from_loc: Optional[str] = None
to_loc: Optional[str] = None
bags: Optional[int] = None
fare: Optional[Decimal] = None
pay_mode: Optional[str] = None
card_last4: Optional[str] = None
charged: bool = False
stage: Optional[str] = None
headline: Optional[str] = None
sub: Optional[str] = None
is_closed: bool = False
eta: Optional[str] = None
driver_name: Optional[str] = None
customer_name: Optional[str] = None
steps: List[DispatchTrackStepView] = field(default_factory=list)
expired: bool = False
invalid: bool = False
response_status: Optional[ResponseStatus] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DispatchTrackRequest:
token: Optional[str] = None
Python DispatchTrackRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/dispatch/track/{Token}/json HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Kind: String,
Code: String,
What: String,
FromLoc: String,
ToLoc: String,
Bags: 0,
Fare: 0,
PayMode: String,
CardLast4: String,
Charged: False,
Stage: String,
Headline: String,
Sub: String,
IsClosed: False,
Eta: String,
DriverName: String,
CustomerName: String,
Steps:
[
{
Name: String,
At: 0001-01-01,
Done: False,
Current: False
}
],
Expired: False,
Invalid: False,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}