| GET | /v1/VehicleSwap/Active | Get Active Vehicle Swap records | This endpoint calls the same named endpoint in the Agency API to return active 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 VehicleSwapActive:
id: int = 0
reference: Optional[str] = None
order_type: Optional[str] = None
vehicle_swap_guid: Optional[str] = None
order_guid: Optional[str] = None
showroom: Optional[str] = None
commission_number: Optional[str] = None
request_reason: Optional[str] = None
sent_to_cesar: bool = False
creation_date: datetime.datetime = datetime.datetime(1, 1, 1)
maintenance_date: Optional[datetime.datetime] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class VehicleSwapActiveResponse:
active_vehicle_swaps: List[VehicleSwapActive] = field(default_factory=list)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class VehicleSwapActiveRequest(IGet):
pass
Python VehicleSwapActiveRequest 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/Active 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
{"ActiveVehicleSwaps":[{"Id":0,"Reference":"String","OrderType":"String","VehicleSwapGuid":"00000000000000000000000000000000","OrderGuid":"00000000000000000000000000000000","Showroom":"String","CommissionNumber":"String","RequestReason":"String","SentToCesar":false,"CreationDate":"\/Date(-62135596800000-0000)\/","MaintenanceDate":"\/Date(-62135596800000-0000)\/"}]}