| POST,OPTIONS | /v1/inspections/{InspectionUID}/{Action} |
|---|
namespace CRM.AgencyPlatform.API.Internal
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type InspectionPhoto() =
member val AttachmentId:Guid = new Guid() with get,set
member val FileName:String = null with get,set
member val Url:String = null with get,set
member val CreatedBy:String = null with get,set
member val CreatedDate:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val HasAnnotation:Boolean = new Boolean() with get,set
member val AnnotatedAttachmentId:Nullable<Guid> = new Nullable<Guid>() with get,set
member val AnnotatedUrl:String = null with get,set
[<AllowNullLiteral>]
type InspectionItem() =
member val InspectionItemID:Int32 = new Int32() with get,set
member val InspectionID:Int32 = new Int32() with get,set
member val Seq:Int32 = new Int32() with get,set
member val Section:String = null with get,set
member val Prompt:String = null with get,set
member val ResponseType:String = null with get,set
member val IsRequired:Boolean = new Boolean() with get,set
member val Unit:String = null with get,set
member val Guidance:String = null with get,set
member val Result:String = null with get,set
member val Value:String = null with get,set
member val Notes:String = null with get,set
member val PhotoCount:Int32 = new Int32() with get,set
member val LinkedPunchItemID:Nullable<Int32> = new Nullable<Int32>() with get,set
member val LinkedPunchNo:String = null with get,set
member val LinkedPunchStatus:String = null with get,set
member val LinkedNcrID:Nullable<Int32> = new Nullable<Int32>() with get,set
member val LinkedNcrNo:String = null with get,set
member val LinkedActionID:Nullable<Int32> = new Nullable<Int32>() with get,set
member val AnsweredBy:String = null with get,set
member val AnsweredAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val Photos:ResizeArray<InspectionPhoto> = new ResizeArray<InspectionPhoto>() with get,set
[<AllowNullLiteral>]
type InspectionRequest() =
member val InspectionRequestID:Int32 = new Int32() with get,set
member val InspectionID:Int32 = new Int32() with get,set
member val Agency:String = null with get,set
member val ContactName:String = null with get,set
member val ContactPhone:String = null with get,set
member val PermitNo:String = null with get,set
member val RequestedDate:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val RequestedWindow:String = null with get,set
member val Status:String = null with get,set
member val ConfirmationNo:String = null with get,set
member val Outcome:String = null with get,set
member val CreatedBy:String = null with get,set
member val CreatedAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val UpdatedAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
[<AllowNullLiteral>]
type SignatureRecord() =
member val SignatureRecordID:Int32 = new Int32() with get,set
member val EntityType:String = null with get,set
member val EntityID:Int32 = new Int32() with get,set
member val Role:String = null with get,set
member val SignerName:String = null with get,set
member val SignerContactID:Nullable<Int32> = new Nullable<Int32>() with get,set
member val SignerUserId:String = null with get,set
member val Method:String = null with get,set
member val ImageAttachmentId:Nullable<Guid> = new Nullable<Guid>() with get,set
member val ImageUrl:String = null with get,set
member val ImageHash:String = null with get,set
member val DocumentHash:String = null with get,set
member val ConsentText:String = null with get,set
member val IpAddress:String = null with get,set
member val UserAgent:String = null with get,set
member val SignedAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
[<AllowNullLiteral>]
type Inspection() =
member val InspectionID:Int32 = new Int32() with get,set
member val InspectionUID:Guid = new Guid() with get,set
member val ProjectID:Int32 = new Int32() with get,set
member val ProjectName:String = null with get,set
member val JobID:Nullable<Int32> = new Nullable<Int32>() with get,set
member val JobName:String = null with get,set
member val InspectionNo:String = null with get,set
member val Type:String = null with get,set
member val Title:String = null with get,set
member val Status:String = null with get,set
member val TemplateUID:Nullable<Guid> = new Nullable<Guid>() with get,set
member val TemplateVersionNo:Nullable<Int32> = new Nullable<Int32>() with get,set
member val ScheduledFor:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val StartedAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val CompletedAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val ClosedAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val InspectorContactID:Nullable<Int32> = new Nullable<Int32>() with get,set
member val InspectorName:String = null with get,set
member val AgencyName:String = null with get,set
member val PermitNo:String = null with get,set
member val LocationText:String = null with get,set
member val Notes:String = null with get,set
member val WeatherJson:String = null with get,set
member val ItemsTotal:Int32 = new Int32() with get,set
member val ItemsPassed:Int32 = new Int32() with get,set
member val ItemsFailed:Int32 = new Int32() with get,set
member val Outcome:String = null with get,set
member val OutcomeNotes:String = null with get,set
member val ReinspectionOfInspectionID:Nullable<Int32> = new Nullable<Int32>() with get,set
member val QcHoldPointID:Nullable<Int32> = new Nullable<Int32>() with get,set
member val ReportAttachmentId:Nullable<Guid> = new Nullable<Guid>() with get,set
member val RequestCount:Int32 = new Int32() with get,set
member val SignatureCount:Int32 = new Int32() with get,set
member val CreatedBy:String = null with get,set
member val CreatedAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val UpdatedAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val Items:ResizeArray<InspectionItem> = new ResizeArray<InspectionItem>() with get,set
member val Requests:ResizeArray<InspectionRequest> = new ResizeArray<InspectionRequest>() with get,set
member val Signatures:ResizeArray<SignatureRecord> = new ResizeArray<SignatureRecord>() with get,set
member val Actions:ResizeArray<String> = new ResizeArray<String>() with get,set
[<AllowNullLiteral>]
type InspectionResponse() =
member val ResponseStatus:ResponseStatus = null with get,set
member val Inspection:Inspection = null with get,set
[<AllowNullLiteral>]
type InspectionActionRequest() =
member val InspectionUID:Guid = new Guid() with get,set
member val Action:String = null with get,set
member val OutcomeNotes:String = null with get,set
member val ReleaseHoldPoint:Boolean = new Boolean() with get,set
member val ScheduledFor:Nullable<DateTime> = new Nullable<DateTime>() with get,set
F# InspectionActionRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/inspections/{InspectionUID}/{Action} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"InspectionUID":"00000000000000000000000000000000","Action":"String","OutcomeNotes":"String","ReleaseHoldPoint":false,"ScheduledFor":"0001-01-01T00:00:00.0000000"}
HTTP/1.1 200 OK
Content-Type: text/csv
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-01T00:00:00.0000000","StartedAt":"0001-01-01T00:00:00.0000000","CompletedAt":"0001-01-01T00:00:00.0000000","ClosedAt":"0001-01-01T00:00:00.0000000","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-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000","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-01T00:00:00.0000000","Photos":[{"AttachmentId":"00000000000000000000000000000000","FileName":"String","Url":"String","CreatedBy":"String","CreatedDate":"0001-01-01T00:00:00.0000000","HasAnnotation":false,"AnnotatedAttachmentId":"00000000000000000000000000000000","AnnotatedUrl":"String"}]}],"Requests":[{"InspectionRequestID":0,"InspectionID":0,"Agency":"String","ContactName":"String","ContactPhone":"String","PermitNo":"String","RequestedDate":"0001-01-01T00:00:00.0000000","RequestedWindow":"String","Status":"String","ConfirmationNo":"String","Outcome":"String","CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000"}],"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-01T00:00:00.0000000"}],"Actions":["String"]}}