| POST,OPTIONS | /v1/dispatch/quote/{Token}/answer |
|---|
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 DispatchQuoteView:
code: Optional[str] = None
customer_name: Optional[str] = None
cargo: Optional[str] = None
units: int = 0
from_loc: Optional[str] = None
to_loc: Optional[str] = None
miles: Optional[int] = None
window_text: Optional[str] = None
is_urgent: bool = False
loads_needed: Optional[int] = None
units_per_truck: Optional[int] = None
rate_per_load: Optional[Decimal] = None
urgency_pct: Decimal = decimal.Decimal(0)
quote_total: Optional[Decimal] = None
quote_version: int = 0
status: Optional[str] = None
quoted_utc: Optional[datetime.datetime] = None
expires_utc: Optional[datetime.datetime] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DispatchQuoteResponse:
quote: Optional[DispatchQuoteView] = None
response_status: Optional[ResponseStatus] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DispatchQuoteAnswerRequest:
token: Optional[str] = None
accept: bool = False
reason: Optional[str] = None
Python DispatchQuoteAnswerRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/dispatch/quote/{Token}/answer HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"Token":"String","Accept":false,"Reason":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Quote":{"Code":"String","CustomerName":"String","Cargo":"String","Units":0,"FromLoc":"String","ToLoc":"String","Miles":0,"WindowText":"String","IsUrgent":false,"LoadsNeeded":0,"UnitsPerTruck":0,"RatePerLoad":0,"UrgencyPct":0,"QuoteTotal":0,"QuoteVersion":0,"Status":"String","QuotedUtc":"0001-01-01T00:00:00.0000000","ExpiresUtc":"0001-01-01T00:00:00.0000000"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}