| GET | /v1/VehicleSwap/Historical | Get Historical Vehicle Records | This endpoint calls the same named endpoint in the Agency API to return historical Vehicle Swap records. |
|---|
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 VehicleSwapHistorical:
reference: Optional[str] = None
order_type: Optional[str] = None
vehicle_swap_guid: Optional[str] = None
order_guid: Optional[str] = None
showroom: Optional[str] = None
gas_user_id: Optional[str] = None
old_commission_number: Optional[str] = None
new_commission_number: Optional[str] = None
request_reason: Optional[str] = None
sent_to_cesar: bool = False
status_id: int = 0
status: Optional[str] = None
swap_created: datetime.datetime = datetime.datetime(1, 1, 1)
swap_updated: Optional[datetime.datetime] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class VehicleSwapHistoricalResponse:
historical_vehicle_swaps: List[VehicleSwapHistorical] = field(default_factory=list)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class VehicleSwapHistoricalRequest(IPost):
pass
Python VehicleSwapHistoricalRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/VehicleSwap/Historical HTTP/1.1 Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"HistoricalVehicleSwaps":[{"Reference":"String","OrderType":"String","VehicleSwapGuid":"00000000000000000000000000000000","OrderGuid":"00000000000000000000000000000000","Showroom":"String","GasUserId":"String","OldCommissionNumber":"String","NewCommissionNumber":"String","RequestReason":"String","SentToCesar":false,"StatusId":0,"SwapCreated":"\/Date(-62135596800000-0000)\/","SwapUpdated":"\/Date(-62135596800000-0000)\/"}]}