| GET | /v1/vehicle/MotabilityVehicles | Get motability eligible vehicles | Get motability eligible vehicles |
|---|
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 GetMotabilityVehiclesRequest:
pass
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Package:
id: int = 0
description: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class MotabilityVehicle(IPackages, IMotabilityFilterFields):
commission_number: Optional[str] = None
vin: Optional[str] = None
vtn: Optional[str] = None
description: Optional[str] = None
model: Optional[str] = None
b_m7_n_s_t: Optional[str] = None
model_year_code: Optional[str] = None
half_model_year_code: Optional[str] = None
full_model_year_code: Optional[str] = None
fuel: Optional[str] = None
primary_paint_colour_code: Optional[str] = None
colour: Optional[str] = None
primary_upholstery_code: Optional[str] = None
upholstery: Optional[str] = None
packages: Optional[List[Package]] = None
account: Optional[str] = None
location: Optional[str] = None
is_display_stock: bool = False
display_stock_agent: Optional[str] = None
is_sellable: bool = False
T = TypeVar('T')
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class MotabilityStockResponse(Generic[T]):
total_vehicles: int = 0
vehicles: List[MotabilityVehicle] = field(default_factory=list)
Python GetMotabilityVehiclesRequest 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/vehicle/MotabilityVehicles HTTP/1.1 Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
TotalVehicles: 0,
Vehicles:
[
{
CommissionNumber: String,
Vin: String,
Vtn: String,
Description: String,
Model: String,
BM7NST: String,
ModelYearCode: String,
HalfModelYearCode: String,
FullModelYearCode: String.String,
Fuel: String,
PrimaryPaintColourCode: String,
Colour: String,
PrimaryUpholsteryCode: String,
Upholstery: String,
Account: String,
Location: String,
IsDisplayStock: False,
DisplayStockAgent: String,
IsSellable: False
}
]
}