Trendsic Platform Service

<back to all web services

InspectionAnswerRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/inspections/{InspectionUID}/items/{InspectionItemID}
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


open class InspectionAnswerRequest
{
    open var InspectionUID:UUID? = null
    open var InspectionItemID:Int? = null
    open var Result:String? = null
    open var Value:String? = null
    open var Notes:String? = null
}

open class InspectionResponse
{
    open var ResponseStatus:ResponseStatus? = null
    open var Inspection:Inspection? = null
}

open class Inspection
{
    open var InspectionID:Int? = null
    open var InspectionUID:UUID? = null
    open var ProjectID:Int? = null
    open var ProjectName:String? = null
    open var JobID:Int? = null
    open var JobName:String? = null
    open var InspectionNo:String? = null
    open var Type:String? = null
    open var Title:String? = null
    open var Status:String? = null
    open var TemplateUID:UUID? = null
    open var TemplateVersionNo:Int? = null
    open var ScheduledFor:Date? = null
    open var StartedAt:Date? = null
    open var CompletedAt:Date? = null
    open var ClosedAt:Date? = null
    open var InspectorContactID:Int? = null
    open var InspectorName:String? = null
    open var AgencyName:String? = null
    open var PermitNo:String? = null
    open var LocationText:String? = null
    open var Notes:String? = null
    open var WeatherJson:String? = null
    open var ItemsTotal:Int? = null
    open var ItemsPassed:Int? = null
    open var ItemsFailed:Int? = null
    open var Outcome:String? = null
    open var OutcomeNotes:String? = null
    open var ReinspectionOfInspectionID:Int? = null
    open var QcHoldPointID:Int? = null
    open var ReportAttachmentId:UUID? = null
    open var RequestCount:Int? = null
    open var SignatureCount:Int? = null
    open var CreatedBy:String? = null
    open var CreatedAt:Date? = null
    open var UpdatedAt:Date? = null
    open var Items:ArrayList<InspectionItem> = ArrayList<InspectionItem>()
    open var Requests:ArrayList<InspectionRequest> = ArrayList<InspectionRequest>()
    open var Signatures:ArrayList<SignatureRecord> = ArrayList<SignatureRecord>()
    open var Actions:ArrayList<String> = ArrayList<String>()
}

open class InspectionItem
{
    open var InspectionItemID:Int? = null
    open var InspectionID:Int? = null
    open var Seq:Int? = null
    open var Section:String? = null
    open var Prompt:String? = null
    open var ResponseType:String? = null
    open var IsRequired:Boolean? = null
    open var Unit:String? = null
    open var Guidance:String? = null
    open var Result:String? = null
    open var Value:String? = null
    open var Notes:String? = null
    open var PhotoCount:Int? = null
    open var LinkedPunchItemID:Int? = null
    open var LinkedPunchNo:String? = null
    open var LinkedPunchStatus:String? = null
    open var LinkedNcrID:Int? = null
    open var LinkedNcrNo:String? = null
    open var LinkedActionID:Int? = null
    open var AnsweredBy:String? = null
    open var AnsweredAt:Date? = null
    open var Photos:ArrayList<InspectionPhoto> = ArrayList<InspectionPhoto>()
}

open class InspectionPhoto
{
    open var AttachmentId:UUID? = null
    open var FileName:String? = null
    open var Url:String? = null
    open var CreatedBy:String? = null
    open var CreatedDate:Date? = null
    open var HasAnnotation:Boolean? = null
    open var AnnotatedAttachmentId:UUID? = null
    open var AnnotatedUrl:String? = null
}

open class InspectionRequest
{
    open var InspectionRequestID:Int? = null
    open var InspectionID:Int? = null
    open var Agency:String? = null
    open var ContactName:String? = null
    open var ContactPhone:String? = null
    open var PermitNo:String? = null
    open var RequestedDate:Date? = null
    open var RequestedWindow:String? = null
    open var Status:String? = null
    open var ConfirmationNo:String? = null
    open var Outcome:String? = null
    open var CreatedBy:String? = null
    open var CreatedAt:Date? = null
    open var UpdatedAt:Date? = null
}

open class SignatureRecord
{
    open var SignatureRecordID:Int? = null
    open var EntityType:String? = null
    open var EntityID:Int? = null
    open var Role:String? = null
    open var SignerName:String? = null
    open var SignerContactID:Int? = null
    open var SignerUserId:String? = null
    open var Method:String? = null
    open var ImageAttachmentId:UUID? = null
    open var ImageUrl:String? = null
    open var ImageHash:String? = null
    open var DocumentHash:String? = null
    open var ConsentText:String? = null
    open var IpAddress:String? = null
    open var UserAgent:String? = null
    open var SignedAt:Date? = null
}

Kotlin InspectionAnswerRequest 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 /v1/inspections/{InspectionUID}/items/{InspectionItemID} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	InspectionUID: 00000000000000000000000000000000,
	InspectionItemID: 0,
	Result: String,
	Value: String,
	Notes: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	Inspection: 
	{
		InspectionID: 0,
		InspectionUID: 00000000000000000000000000000000,
		ProjectID: 0,
		ProjectName: String,
		JobID: 0,
		JobName: String,
		InspectionNo: String,
		Type: String,
		Title: String,
		Status: String,
		TemplateUID: 00000000000000000000000000000000,
		TemplateVersionNo: 0,
		ScheduledFor: 0001-01-01,
		StartedAt: 0001-01-01,
		CompletedAt: 0001-01-01,
		ClosedAt: 0001-01-01,
		InspectorContactID: 0,
		InspectorName: String,
		AgencyName: String,
		PermitNo: String,
		LocationText: String,
		Notes: String,
		WeatherJson: String,
		ItemsTotal: 0,
		ItemsPassed: 0,
		ItemsFailed: 0,
		Outcome: String,
		OutcomeNotes: String,
		ReinspectionOfInspectionID: 0,
		QcHoldPointID: 0,
		ReportAttachmentId: 00000000000000000000000000000000,
		RequestCount: 0,
		SignatureCount: 0,
		CreatedBy: String,
		CreatedAt: 0001-01-01,
		UpdatedAt: 0001-01-01,
		Items: 
		[
			{
				InspectionItemID: 0,
				InspectionID: 0,
				Seq: 0,
				Section: String,
				Prompt: String,
				ResponseType: String,
				IsRequired: False,
				Unit: String,
				Guidance: String,
				Result: String,
				Value: String,
				Notes: String,
				PhotoCount: 0,
				LinkedPunchItemID: 0,
				LinkedPunchNo: String,
				LinkedPunchStatus: String,
				LinkedNcrID: 0,
				LinkedNcrNo: String,
				LinkedActionID: 0,
				AnsweredBy: String,
				AnsweredAt: 0001-01-01,
				Photos: 
				[
					{
						AttachmentId: 00000000000000000000000000000000,
						FileName: String,
						Url: String,
						CreatedBy: String,
						CreatedDate: 0001-01-01,
						HasAnnotation: False,
						AnnotatedAttachmentId: 00000000000000000000000000000000,
						AnnotatedUrl: String
					}
				]
			}
		],
		Requests: 
		[
			{
				InspectionRequestID: 0,
				InspectionID: 0,
				Agency: String,
				ContactName: String,
				ContactPhone: String,
				PermitNo: String,
				RequestedDate: 0001-01-01,
				RequestedWindow: String,
				Status: String,
				ConfirmationNo: String,
				Outcome: String,
				CreatedBy: String,
				CreatedAt: 0001-01-01,
				UpdatedAt: 0001-01-01
			}
		],
		Signatures: 
		[
			{
				SignatureRecordID: 0,
				EntityType: String,
				EntityID: 0,
				Role: String,
				SignerName: String,
				SignerContactID: 0,
				SignerUserId: String,
				Method: String,
				ImageAttachmentId: 00000000000000000000000000000000,
				ImageUrl: String,
				ImageHash: String,
				DocumentHash: String,
				ConsentText: String,
				IpAddress: String,
				UserAgent: String,
				SignedAt: 0001-01-01
			}
		],
		Actions: 
		[
			String
		]
	}
}