Trendsic Platform Service

<back to all web services

InspectionSignRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/inspections/{InspectionUID}/sign
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using CRM.AgencyPlatform.API.Internal;

namespace CRM.AgencyPlatform.API.Internal
{
    public partial class Inspection
    {
        public virtual int InspectionID { get; set; }
        public virtual Guid InspectionUID { get; set; }
        public virtual int ProjectID { get; set; }
        public virtual string ProjectName { get; set; }
        public virtual int? JobID { get; set; }
        public virtual string JobName { get; set; }
        public virtual string InspectionNo { get; set; }
        public virtual string Type { get; set; }
        public virtual string Title { get; set; }
        public virtual string Status { get; set; }
        public virtual Guid? TemplateUID { get; set; }
        public virtual int? TemplateVersionNo { get; set; }
        public virtual DateTime? ScheduledFor { get; set; }
        public virtual DateTime? StartedAt { get; set; }
        public virtual DateTime? CompletedAt { get; set; }
        public virtual DateTime? ClosedAt { get; set; }
        public virtual int? InspectorContactID { get; set; }
        public virtual string InspectorName { get; set; }
        public virtual string AgencyName { get; set; }
        public virtual string PermitNo { get; set; }
        public virtual string LocationText { get; set; }
        public virtual string Notes { get; set; }
        public virtual string WeatherJson { get; set; }
        public virtual int ItemsTotal { get; set; }
        public virtual int ItemsPassed { get; set; }
        public virtual int ItemsFailed { get; set; }
        public virtual string Outcome { get; set; }
        public virtual string OutcomeNotes { get; set; }
        public virtual int? ReinspectionOfInspectionID { get; set; }
        public virtual int? QcHoldPointID { get; set; }
        public virtual Guid? ReportAttachmentId { get; set; }
        public virtual int RequestCount { get; set; }
        public virtual int SignatureCount { get; set; }
        public virtual string CreatedBy { get; set; }
        public virtual DateTime? CreatedAt { get; set; }
        public virtual DateTime? UpdatedAt { get; set; }
        public virtual List<InspectionItem> Items { get; set; } = [];
        public virtual List<InspectionRequest> Requests { get; set; } = [];
        public virtual List<SignatureRecord> Signatures { get; set; } = [];
        public virtual List<string> Actions { get; set; } = [];
    }

    public partial class InspectionItem
    {
        public virtual int InspectionItemID { get; set; }
        public virtual int InspectionID { get; set; }
        public virtual int Seq { get; set; }
        public virtual string Section { get; set; }
        public virtual string Prompt { get; set; }
        public virtual string ResponseType { get; set; }
        public virtual bool IsRequired { get; set; }
        public virtual string Unit { get; set; }
        public virtual string Guidance { get; set; }
        public virtual string Result { get; set; }
        public virtual string Value { get; set; }
        public virtual string Notes { get; set; }
        public virtual int PhotoCount { get; set; }
        public virtual int? LinkedPunchItemID { get; set; }
        public virtual string LinkedPunchNo { get; set; }
        public virtual string LinkedPunchStatus { get; set; }
        public virtual int? LinkedNcrID { get; set; }
        public virtual string LinkedNcrNo { get; set; }
        public virtual int? LinkedActionID { get; set; }
        public virtual string AnsweredBy { get; set; }
        public virtual DateTime? AnsweredAt { get; set; }
        public virtual List<InspectionPhoto> Photos { get; set; } = [];
    }

    public partial class InspectionPhoto
    {
        public virtual Guid AttachmentId { get; set; }
        public virtual string FileName { get; set; }
        public virtual string Url { get; set; }
        public virtual string CreatedBy { get; set; }
        public virtual DateTime? CreatedDate { get; set; }
        public virtual bool HasAnnotation { get; set; }
        public virtual Guid? AnnotatedAttachmentId { get; set; }
        public virtual string AnnotatedUrl { get; set; }
    }

    public partial class InspectionRequest
    {
        public virtual int InspectionRequestID { get; set; }
        public virtual int InspectionID { get; set; }
        public virtual string Agency { get; set; }
        public virtual string ContactName { get; set; }
        public virtual string ContactPhone { get; set; }
        public virtual string PermitNo { get; set; }
        public virtual DateTime? RequestedDate { get; set; }
        public virtual string RequestedWindow { get; set; }
        public virtual string Status { get; set; }
        public virtual string ConfirmationNo { get; set; }
        public virtual string Outcome { get; set; }
        public virtual string CreatedBy { get; set; }
        public virtual DateTime? CreatedAt { get; set; }
        public virtual DateTime? UpdatedAt { get; set; }
    }

    public partial class InspectionResponse
    {
        public virtual ResponseStatus ResponseStatus { get; set; }
        public virtual Inspection Inspection { get; set; }
    }

    public partial class InspectionSignRequest
    {
        public virtual Guid InspectionUID { get; set; }
        public virtual string Role { get; set; }
        public virtual string SignerName { get; set; }
        public virtual int? SignerContactID { get; set; }
        public virtual string Method { get; set; }
        public virtual string ImageDataUrl { get; set; }
        public virtual bool ConsentAccepted { get; set; }
    }

    public partial class SignatureRecord
    {
        public virtual int SignatureRecordID { get; set; }
        public virtual string EntityType { get; set; }
        public virtual int EntityID { get; set; }
        public virtual string Role { get; set; }
        public virtual string SignerName { get; set; }
        public virtual int? SignerContactID { get; set; }
        public virtual string SignerUserId { get; set; }
        public virtual string Method { get; set; }
        public virtual Guid? ImageAttachmentId { get; set; }
        public virtual string ImageUrl { get; set; }
        public virtual string ImageHash { get; set; }
        public virtual string DocumentHash { get; set; }
        public virtual string ConsentText { get; set; }
        public virtual string IpAddress { get; set; }
        public virtual string UserAgent { get; set; }
        public virtual DateTime? SignedAt { get; set; }
    }

}

C# InspectionSignRequest 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.

POST /v1/inspections/{InspectionUID}/sign HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<InspectionSignRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <ConsentAccepted>false</ConsentAccepted>
  <ImageDataUrl>String</ImageDataUrl>
  <InspectionUID>00000000-0000-0000-0000-000000000000</InspectionUID>
  <Method>String</Method>
  <Role>String</Role>
  <SignerContactID>0</SignerContactID>
  <SignerName>String</SignerName>
</InspectionSignRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<InspectionResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Inspection>
    <Actions xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>String</d3p1: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>
  <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>
</InspectionResponse>