Trendsic Platform Service

<back to all web services

CourierDriverVehicleRequest

Requires Authentication
The following routes are available for this service:
GET,PUT,OPTIONS/v1/worker/dispatch/od/vehicle
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 CourierVehicleClassView:
    code: Optional[str] = None
    name: Optional[str] = None
    name_es: Optional[str] = None
    hint: Optional[str] = None
    hint_es: Optional[str] = None
    cap: Decimal = decimal.Decimal(0)


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CourierDriverVehicleResponse:
    equipment_i_d: int = 0
    unit_number: Optional[str] = None
    is_own: bool = False
    set_by_office: bool = False
    class_code: Optional[str] = None
    class_name: Optional[str] = None
    class_name_es: Optional[str] = None
    cap: Optional[Decimal] = None
    unit_one: Optional[str] = None
    unit_many: Optional[str] = None
    unit_one_es: Optional[str] = None
    unit_many_es: Optional[str] = None
    classes: List[CourierVehicleClassView] = field(default_factory=list)
    saved: bool = False
    saved_text: Optional[str] = None
    saved_text_es: Optional[str] = None
    message_es: Optional[str] = None
    response_status: Optional[ResponseStatus] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CourierDriverVehicleRequest:
    class_code: Optional[str] = None

Python CourierDriverVehicleRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /v1/worker/dispatch/od/vehicle HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ClassCode: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	EquipmentID: 0,
	UnitNumber: String,
	IsOwn: False,
	SetByOffice: False,
	ClassCode: String,
	ClassName: String,
	ClassNameEs: String,
	Cap: 0,
	UnitOne: String,
	UnitMany: String,
	UnitOneEs: String,
	UnitManyEs: String,
	Classes: 
	[
		{
			Code: String,
			Name: String,
			NameEs: String,
			Hint: String,
			HintEs: String,
			Cap: 0
		}
	],
	Saved: False,
	SavedText: String,
	SavedTextEs: String,
	MessageEs: String,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}