| POST,OPTIONS | /v1/inspections/{InspectionUID}/items/{InspectionItemID}/photos/sync |
|---|
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 InspectionPhotoSyncRequest() =
member val InspectionUID:Guid = new Guid() with get,set
member val InspectionItemID:Int32 = new Int32() with get,set
F# InspectionPhotoSyncRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/inspections/{InspectionUID}/items/{InspectionItemID}/photos/sync HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<InspectionPhotoSyncRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<InspectionItemID>0</InspectionItemID>
<InspectionUID>00000000-0000-0000-0000-000000000000</InspectionUID>
</InspectionPhotoSyncRequest>
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>