Trendsic Platform Service

<back to all web services

InspectionPhotoSyncRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/inspections/{InspectionUID}/items/{InspectionItemID}/photos/sync

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 InspectionResponse
{
    public ResponseStatus: ResponseStatus;
    public Inspection: Inspection;

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

export class InspectionPhotoSyncRequest
{
    public InspectionUID: string;
    public InspectionItemID: number;

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

TypeScript InspectionPhotoSyncRequest 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}/photos/sync HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	InspectionUID: 00000000000000000000000000000000,
	InspectionItemID: 0
}
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
		]
	}
}