Trendsic Platform Service

<back to all web services

PostInspectionReportResponse

Requires Authentication
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 Employee:
    first_name: Optional[str] = None
    middle_name: Optional[str] = None
    last_name: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class InspectionReport:
    agent_u_i_d: Optional[str] = None
    contact_u_i_d: Optional[str] = None
    inspection_report_u_i_d: Optional[str] = None
    trade_name: Optional[str] = None
    business_phone: Optional[str] = None
    street_address: Optional[str] = None
    zip_code: Optional[str] = None
    owners_name: Optional[str] = None
    compliance_status: int = 0
    is_business_class_a_beer: bool = False
    is_business_class_b_beer: bool = False
    is_business_class_a_liquor: bool = False
    is_business_class_b_liquor: bool = False
    is_business_class_d: bool = False
    is_business_class_m: bool = False
    is_business_class_p: bool = False
    is_business_class_r: bool = False
    is_business_class_r_a_h: bool = False
    class_beer_account_num: Optional[str] = None
    class_beer_state_num: Optional[str] = None
    class_liquor_account_num: Optional[str] = None
    class_liquor_state_num: Optional[str] = None
    licensed_employees: List[Employee] = field(default_factory=list)
    agent_name: Optional[str] = None
    manager_signature: Optional[Object] = None
    manager_name: Optional[str] = None
    manager_phone: Optional[str] = None
    inspection_date: datetime.datetime = datetime.datetime(1, 1, 1)


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PostInspectionReportResponse:
    result: Optional[InspectionReport] = None
    response_status: Optional[ResponseStatus] = None

Python PostInspectionReportResponse 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.

POST /jsv/oneway/PostInspectionReportResponse HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Result: 
	{
		AgentUID: 00000000000000000000000000000000,
		ContactUID: 00000000000000000000000000000000,
		InspectionReportUID: 00000000000000000000000000000000,
		TradeName: String,
		BusinessPhone: String,
		StreetAddress: String,
		ZipCode: String,
		OwnersName: String,
		ComplianceStatus: 0,
		IsBusinessClassABeer: False,
		IsBusinessClassBBeer: False,
		IsBusinessClassALiquor: False,
		IsBusinessClassBLiquor: False,
		IsBusinessClassD: False,
		IsBusinessClassM: False,
		IsBusinessClassP: False,
		IsBusinessClassR: False,
		IsBusinessClassRAH: False,
		ClassBeerAccountNum: String,
		ClassBeerStateNum: String,
		ClassLiquorAccountNum: String,
		ClassLiquorStateNum: String,
		LicensedEmployees: 
		[
			{
				FirstName: String,
				MiddleName: String,
				LastName: String
			}
		],
		AgentName: String,
		ManagerSignature: {},
		ManagerName: String,
		ManagerPhone: String,
		InspectionDate: 0001-01-01
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}