Trendsic Platform Service

<back to all web services

InspectionDueRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/inspections/due

export class InspectionPhoto
{
    public AttachmentId: string;
    public FileName: string;
    public Url: string;
    public CreatedBy: string;
    public CreatedDate?: string;
    public HasAnnotation: boolean;
    public AnnotatedAttachmentId?: string;
    public AnnotatedUrl: string;

    public constructor(init?: Partial<InspectionPhoto>) { (Object as any).assign(this, init); }
}

export class InspectionItem
{
    public InspectionItemID: number;
    public InspectionID: number;
    public Seq: number;
    public Section: string;
    public Prompt: string;
    public ResponseType: string;
    public IsRequired: boolean;
    public Unit: string;
    public Guidance: string;
    public Result: string;
    public Value: string;
    public Notes: string;
    public PhotoCount: number;
    public LinkedPunchItemID?: number;
    public LinkedPunchNo: string;
    public LinkedPunchStatus: string;
    public LinkedNcrID?: number;
    public LinkedNcrNo: string;
    public LinkedActionID?: number;
    public AnsweredBy: string;
    public AnsweredAt?: string;
    public Photos: InspectionPhoto[] = [];

    public constructor(init?: Partial<InspectionItem>) { (Object as any).assign(this, init); }
}

export class InspectionRequest
{
    public InspectionRequestID: number;
    public InspectionID: number;
    public Agency: string;
    public ContactName: string;
    public ContactPhone: string;
    public PermitNo: string;
    public RequestedDate?: string;
    public RequestedWindow: string;
    public Status: string;
    public ConfirmationNo: string;
    public Outcome: string;
    public CreatedBy: string;
    public CreatedAt?: string;
    public UpdatedAt?: string;

    public constructor(init?: Partial<InspectionRequest>) { (Object as any).assign(this, init); }
}

export class SignatureRecord
{
    public SignatureRecordID: number;
    public EntityType: string;
    public EntityID: number;
    public Role: string;
    public SignerName: string;
    public SignerContactID?: number;
    public SignerUserId: string;
    public Method: string;
    public ImageAttachmentId?: string;
    public ImageUrl: string;
    public ImageHash: string;
    public DocumentHash: string;
    public ConsentText: string;
    public IpAddress: string;
    public UserAgent: string;
    public SignedAt?: string;

    public constructor(init?: Partial<SignatureRecord>) { (Object as any).assign(this, init); }
}

export class Inspection
{
    public InspectionID: number;
    public InspectionUID: string;
    public ProjectID: number;
    public ProjectName: string;
    public JobID?: number;
    public JobName: string;
    public InspectionNo: string;
    public Type: string;
    public Title: string;
    public Status: string;
    public TemplateUID?: string;
    public TemplateVersionNo?: number;
    public ScheduledFor?: string;
    public StartedAt?: string;
    public CompletedAt?: string;
    public ClosedAt?: string;
    public InspectorContactID?: number;
    public InspectorName: string;
    public AgencyName: string;
    public PermitNo: string;
    public LocationText: string;
    public Notes: string;
    public WeatherJson: string;
    public ItemsTotal: number;
    public ItemsPassed: number;
    public ItemsFailed: number;
    public Outcome: string;
    public OutcomeNotes: string;
    public ReinspectionOfInspectionID?: number;
    public QcHoldPointID?: number;
    public ReportAttachmentId?: string;
    public RequestCount: number;
    public SignatureCount: number;
    public CreatedBy: string;
    public CreatedAt?: string;
    public UpdatedAt?: string;
    public Items: InspectionItem[] = [];
    public Requests: InspectionRequest[] = [];
    public Signatures: SignatureRecord[] = [];
    public Actions: string[] = [];

    public constructor(init?: Partial<Inspection>) { (Object as any).assign(this, init); }
}

export class InspectionSummary
{
    public Total: number;
    public DueToday: number;
    public Overdue: number;
    public InProgress: number;
    public Failed: number;
    public Conditional: number;
    public PassedOpen: number;
    public Closed: number;
    public Completed30d: number;
    public Passed30d: number;
    public Headline: string;

    public constructor(init?: Partial<InspectionSummary>) { (Object as any).assign(this, init); }
}

export class InspectionListResponse
{
    public ResponseStatus: ResponseStatus;
    public Inspections: Inspection[] = [];
    public Summary: InspectionSummary;

    public constructor(init?: Partial<InspectionListResponse>) { (Object as any).assign(this, init); }
}

export class InspectionDueRequest
{
    public ProjectID?: number;

    public constructor(init?: Partial<InspectionDueRequest>) { (Object as any).assign(this, init); }
}

TypeScript InspectionDueRequest DTOs

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

HTTP + XML

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

GET /v1/inspections/due HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<InspectionListResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Inspections>
    <Inspection>
      <Actions xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </Actions>
      <AgencyName>String</AgencyName>
      <ClosedAt>0001-01-01T00:00:00</ClosedAt>
      <CompletedAt>0001-01-01T00:00:00</CompletedAt>
      <CreatedAt>0001-01-01T00:00:00</CreatedAt>
      <CreatedBy>String</CreatedBy>
      <InspectionID>0</InspectionID>
      <InspectionNo>String</InspectionNo>
      <InspectionUID>00000000-0000-0000-0000-000000000000</InspectionUID>
      <InspectorContactID>0</InspectorContactID>
      <InspectorName>String</InspectorName>
      <Items>
        <InspectionItem>
          <AnsweredAt>0001-01-01T00:00:00</AnsweredAt>
          <AnsweredBy>String</AnsweredBy>
          <Guidance>String</Guidance>
          <InspectionID>0</InspectionID>
          <InspectionItemID>0</InspectionItemID>
          <IsRequired>false</IsRequired>
          <LinkedActionID>0</LinkedActionID>
          <LinkedNcrID>0</LinkedNcrID>
          <LinkedNcrNo>String</LinkedNcrNo>
          <LinkedPunchItemID>0</LinkedPunchItemID>
          <LinkedPunchNo>String</LinkedPunchNo>
          <LinkedPunchStatus>String</LinkedPunchStatus>
          <Notes>String</Notes>
          <PhotoCount>0</PhotoCount>
          <Photos>
            <InspectionPhoto>
              <AnnotatedAttachmentId>00000000-0000-0000-0000-000000000000</AnnotatedAttachmentId>
              <AnnotatedUrl>String</AnnotatedUrl>
              <AttachmentId>00000000-0000-0000-0000-000000000000</AttachmentId>
              <CreatedBy>String</CreatedBy>
              <CreatedDate>0001-01-01T00:00:00</CreatedDate>
              <FileName>String</FileName>
              <HasAnnotation>false</HasAnnotation>
              <Url>String</Url>
            </InspectionPhoto>
          </Photos>
          <Prompt>String</Prompt>
          <ResponseType>String</ResponseType>
          <Result>String</Result>
          <Section>String</Section>
          <Seq>0</Seq>
          <Unit>String</Unit>
          <Value>String</Value>
        </InspectionItem>
      </Items>
      <ItemsFailed>0</ItemsFailed>
      <ItemsPassed>0</ItemsPassed>
      <ItemsTotal>0</ItemsTotal>
      <JobID>0</JobID>
      <JobName>String</JobName>
      <LocationText>String</LocationText>
      <Notes>String</Notes>
      <Outcome>String</Outcome>
      <OutcomeNotes>String</OutcomeNotes>
      <PermitNo>String</PermitNo>
      <ProjectID>0</ProjectID>
      <ProjectName>String</ProjectName>
      <QcHoldPointID>0</QcHoldPointID>
      <ReinspectionOfInspectionID>0</ReinspectionOfInspectionID>
      <ReportAttachmentId>00000000-0000-0000-0000-000000000000</ReportAttachmentId>
      <RequestCount>0</RequestCount>
      <Requests>
        <InspectionRequest>
          <Agency>String</Agency>
          <ConfirmationNo>String</ConfirmationNo>
          <ContactName>String</ContactName>
          <ContactPhone>String</ContactPhone>
          <CreatedAt>0001-01-01T00:00:00</CreatedAt>
          <CreatedBy>String</CreatedBy>
          <InspectionID>0</InspectionID>
          <InspectionRequestID>0</InspectionRequestID>
          <Outcome>String</Outcome>
          <PermitNo>String</PermitNo>
          <RequestedDate>0001-01-01T00:00:00</RequestedDate>
          <RequestedWindow>String</RequestedWindow>
          <Status>String</Status>
          <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
        </InspectionRequest>
      </Requests>
      <ScheduledFor>0001-01-01T00:00:00</ScheduledFor>
      <SignatureCount>0</SignatureCount>
      <Signatures>
        <SignatureRecord>
          <ConsentText>String</ConsentText>
          <DocumentHash>String</DocumentHash>
          <EntityID>0</EntityID>
          <EntityType>String</EntityType>
          <ImageAttachmentId>00000000-0000-0000-0000-000000000000</ImageAttachmentId>
          <ImageHash>String</ImageHash>
          <ImageUrl>String</ImageUrl>
          <IpAddress>String</IpAddress>
          <Method>String</Method>
          <Role>String</Role>
          <SignatureRecordID>0</SignatureRecordID>
          <SignedAt>0001-01-01T00:00:00</SignedAt>
          <SignerContactID>0</SignerContactID>
          <SignerName>String</SignerName>
          <SignerUserId>String</SignerUserId>
          <UserAgent>String</UserAgent>
        </SignatureRecord>
      </Signatures>
      <StartedAt>0001-01-01T00:00:00</StartedAt>
      <Status>String</Status>
      <TemplateUID>00000000-0000-0000-0000-000000000000</TemplateUID>
      <TemplateVersionNo>0</TemplateVersionNo>
      <Title>String</Title>
      <Type>String</Type>
      <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
      <WeatherJson>String</WeatherJson>
    </Inspection>
  </Inspections>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
  <Summary>
    <Closed>0</Closed>
    <Completed30d>0</Completed30d>
    <Conditional>0</Conditional>
    <DueToday>0</DueToday>
    <Failed>0</Failed>
    <Headline>String</Headline>
    <InProgress>0</InProgress>
    <Overdue>0</Overdue>
    <Passed30d>0</Passed30d>
    <PassedOpen>0</PassedOpen>
    <Total>0</Total>
  </Summary>
</InspectionListResponse>