Trendsic Platform Service

<back to all web services

VisitExceptionsRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/visits/exceptions
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 ExceptionItem:
    kind: Optional[str] = None
    visit_key: Optional[str] = None
    job_i_d: int = 0
    project_i_d: int = 0
    agreement_i_d: Optional[int] = None
    agreement_job_i_d: Optional[int] = None
    occurrence_date: Optional[str] = None
    customer_name: Optional[str] = None
    location_name: Optional[str] = None
    city: Optional[str] = None
    lat: Optional[float] = None
    lng: Optional[float] = None
    age_days: int = 0
    reason: Optional[str] = None
    duration_minutes: int = 0
    is_commercial: bool = False
    preferred_crew_i_d: Optional[int] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class VisitExceptionsResponse:
    items: List[ExceptionItem] = field(default_factory=list)
    missed_count: int = 0
    sla_count: int = 0
    skipped_count: int = 0
    at_risk_count: int = 0
    response_status: Optional[ResponseStatus] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class VisitExceptionsRequest:
    pass

Python VisitExceptionsRequest DTOs

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

HTTP + OTHER

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

GET /v1/visits/exceptions HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Items":[{"Kind":"String","VisitKey":"String","JobID":0,"ProjectID":0,"AgreementID":0,"AgreementJobID":0,"OccurrenceDate":"String","CustomerName":"String","LocationName":"String","City":"String","Lat":0,"Lng":0,"AgeDays":0,"Reason":"String","DurationMinutes":0,"IsCommercial":false,"PreferredCrewID":0}],"MissedCount":0,"SlaCount":0,"SkippedCount":0,"AtRiskCount":0,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}