POST api/HGInspections/ValidateInspection

It is the first API call that must be raised in order to submit the inspection details. It validates the submitted inspection details, if the submitted inspection details are valid, then it will generates a batchid, which is a GUID, it must be used in all subsequent API calls.

Request Information

URI Parameters

None.

Body Parameters

HGReportDataEntity
NameDescriptionTypeAdditional information
HGInspectionData

This entity represents set of fields which must be updated when user submits a inspection.

HGInspectionDataModel

None.

ReportPictures

This entity represents collection of selected pictures which must be added to a inspection.

Collection of HGReportPicture

None.

ReportDescriptions

This entity represents collection of selected descriptions which must be added to a inspection.

Collection of HGReportDescription

None.

ReportObservations

This entity represents collection of selected observations which must be added to a inspection.

Collection of HGReportObservation

None.

ReportNotes

This entity represents collection of notes that inspector wants to send to customer service rep.

Collection of HGReportNotesModel

None.

Request Formats

application/json

Sample:
{
  "HGInspectionData": {
    "ShownIPadSummary": true,
    "YearBuilt": 13,
    "InspectionTypeID": 12,
    "PaymentMethod": 8,
    "OrderID": 1,
    "DroneUsed": 1,
    "TemplateID": 1,
    "CashAmount": 1,
    "PaymentAmount": 1,
    "SupplementalSP": "sample string 16",
    "DroneNotUsedReason": "sample string 15",
    "GeneralDescription": "sample string 14",
    "ReasonNotShownIPadSummary": "sample string 11",
    "IPadSummaryShownTo": "sample string 10",
    "CheckNumber": "sample string 7",
    "SupplementalNotes": "sample string 6",
    "Scope": "sample string 5",
    "Weather": "sample string 4",
    "UserEnterHomeTypeText": "sample string 3",
    "HomeTypeName": "sample string 2"
  },
  "ReportPictures": [
    {
      "PhotoType": 64,
      "OrderID": 1,
      "HasFinding": 1,
      "FigureID": 1,
      "ChapterID": 1,
      "SP": 1,
      "Caption": "sample string 3",
      "FileName": "sample string 2"
    },
    {
      "PhotoType": 64,
      "OrderID": 1,
      "HasFinding": 1,
      "FigureID": 1,
      "ChapterID": 1,
      "SP": 1,
      "Caption": "sample string 3",
      "FileName": "sample string 2"
    }
  ],
  "ReportDescriptions": [
    {
      "PageID": 3,
      "OrderID": 1,
      "SP": 1,
      "Sort": 1.1,
      "ChapterID": 1,
      "DescriptionLabel": "sample string 5",
      "RptDescription": "sample string 4",
      "DivisionID": "sample string 2"
    },
    {
      "PageID": 3,
      "OrderID": 1,
      "SP": 1,
      "Sort": 1.1,
      "ChapterID": 1,
      "DescriptionLabel": "sample string 5",
      "RptDescription": "sample string 4",
      "DivisionID": "sample string 2"
    }
  ],
  "ReportObservations": [
    {
      "NeedtoEdit": true,
      "OrderID": 1,
      "FindingTypeID": 1,
      "DSP": 1,
      "ChapterID": 1,
      "PageID": 1,
      "ActionItem": true,
      "SP": 1.1,
      "FindingPhotos": "sample string 7",
      "Location": "sample string 6",
      "FindingText": "sample string 4",
      "SectionID": "sample string 3",
      "DivisionID": "sample string 2"
    },
    {
      "NeedtoEdit": true,
      "OrderID": 1,
      "FindingTypeID": 1,
      "DSP": 1,
      "ChapterID": 1,
      "PageID": 1,
      "ActionItem": true,
      "SP": 1.1,
      "FindingPhotos": "sample string 7",
      "Location": "sample string 6",
      "FindingText": "sample string 4",
      "SectionID": "sample string 3",
      "DivisionID": "sample string 2"
    }
  ],
  "ReportNotes": [
    {
      "NoteDate": "2025-06-24T10:33:07.2943644Z",
      "ReportID": 1,
      "OrderID": 1,
      "NoteTypeID": "sample string 2",
      "NoteText": "sample string 1"
    },
    {
      "NoteDate": "2025-06-24T10:33:07.2943644Z",
      "ReportID": 1,
      "OrderID": 1,
      "NoteTypeID": "sample string 2",
      "NoteText": "sample string 1"
    }
  ]
}

application/xml, text/xml

Sample:
<HGReportDataEntity xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HomeguardApp.BusinessObjects.Inspection">
  <HGInspectionData>
    <CashAmount>1</CashAmount>
    <CheckNumber>sample string 7</CheckNumber>
    <DroneNotUsedReason>sample string 15</DroneNotUsedReason>
    <DroneUsed>1</DroneUsed>
    <GeneralDescription>sample string 14</GeneralDescription>
    <HomeTypeName>sample string 2</HomeTypeName>
    <IPadSummaryShownTo>sample string 10</IPadSummaryShownTo>
    <InspectionTypeID>12</InspectionTypeID>
    <OrderID>1</OrderID>
    <PaymentAmount>1</PaymentAmount>
    <PaymentMethod>8</PaymentMethod>
    <ReasonNotShownIPadSummary>sample string 11</ReasonNotShownIPadSummary>
    <Scope>sample string 5</Scope>
    <ShownIPadSummary>true</ShownIPadSummary>
    <SupplementalNotes>sample string 6</SupplementalNotes>
    <SupplementalSP>sample string 16</SupplementalSP>
    <TemplateID>1</TemplateID>
    <UserEnterHomeTypeText>sample string 3</UserEnterHomeTypeText>
    <Weather>sample string 4</Weather>
    <YearBuilt>13</YearBuilt>
  </HGInspectionData>
  <ReportDescriptions>
    <HGReportDescription>
      <ChapterID>1</ChapterID>
      <DescriptionLabel>sample string 5</DescriptionLabel>
      <DivisionID>sample string 2</DivisionID>
      <OrderID>1</OrderID>
      <PageID>3</PageID>
      <RptDescription>sample string 4</RptDescription>
      <SP>1</SP>
      <Sort>1.1</Sort>
    </HGReportDescription>
    <HGReportDescription>
      <ChapterID>1</ChapterID>
      <DescriptionLabel>sample string 5</DescriptionLabel>
      <DivisionID>sample string 2</DivisionID>
      <OrderID>1</OrderID>
      <PageID>3</PageID>
      <RptDescription>sample string 4</RptDescription>
      <SP>1</SP>
      <Sort>1.1</Sort>
    </HGReportDescription>
  </ReportDescriptions>
  <ReportNotes>
    <HGReportNotesModel>
      <NoteDate>2025-06-24T03:33:07.2943644-07:00</NoteDate>
      <NoteText>sample string 1</NoteText>
      <NoteTypeID>sample string 2</NoteTypeID>
      <OrderID>1</OrderID>
      <ReportID>1</ReportID>
    </HGReportNotesModel>
    <HGReportNotesModel>
      <NoteDate>2025-06-24T03:33:07.2943644-07:00</NoteDate>
      <NoteText>sample string 1</NoteText>
      <NoteTypeID>sample string 2</NoteTypeID>
      <OrderID>1</OrderID>
      <ReportID>1</ReportID>
    </HGReportNotesModel>
  </ReportNotes>
  <ReportObservations>
    <HGReportObservation>
      <ActionItem>true</ActionItem>
      <ChapterID>1</ChapterID>
      <DSP>1</DSP>
      <DivisionID>sample string 2</DivisionID>
      <FindingPhotos>sample string 7</FindingPhotos>
      <FindingText>sample string 4</FindingText>
      <FindingTypeID>1</FindingTypeID>
      <Location>sample string 6</Location>
      <NeedtoEdit>true</NeedtoEdit>
      <OrderID>1</OrderID>
      <PageID>1</PageID>
      <SP>1.1</SP>
      <SectionID>sample string 3</SectionID>
    </HGReportObservation>
    <HGReportObservation>
      <ActionItem>true</ActionItem>
      <ChapterID>1</ChapterID>
      <DSP>1</DSP>
      <DivisionID>sample string 2</DivisionID>
      <FindingPhotos>sample string 7</FindingPhotos>
      <FindingText>sample string 4</FindingText>
      <FindingTypeID>1</FindingTypeID>
      <Location>sample string 6</Location>
      <NeedtoEdit>true</NeedtoEdit>
      <OrderID>1</OrderID>
      <PageID>1</PageID>
      <SP>1.1</SP>
      <SectionID>sample string 3</SectionID>
    </HGReportObservation>
  </ReportObservations>
  <ReportPictures>
    <HGReportPicture>
      <Caption>sample string 3</Caption>
      <ChapterID>1</ChapterID>
      <FigureID>1</FigureID>
      <FileName>sample string 2</FileName>
      <HasFinding>1</HasFinding>
      <OrderID>1</OrderID>
      <PhotoType>64</PhotoType>
      <SP>1</SP>
    </HGReportPicture>
    <HGReportPicture>
      <Caption>sample string 3</Caption>
      <ChapterID>1</ChapterID>
      <FigureID>1</FigureID>
      <FileName>sample string 2</FileName>
      <HasFinding>1</HasFinding>
      <OrderID>1</OrderID>
      <PhotoType>64</PhotoType>
      <SP>1</SP>
    </HGReportPicture>
  </ReportPictures>
</HGReportDataEntity>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'HGReportDataEntity'.

Response Information

Resource Description

It is the first API call that must be raised in order to submit the inspection details. It validates the submitted inspection details, if the submitted inspection details are valid, then it will generates a batchid, which is a GUID, it must be used in all subsequent API calls.

InspValidationResponseModel
NameDescriptionTypeAdditional information
Status

It represents the status of current API call. status can be either "success" or "failed"

string

None.

Message

It represents the some description about the API response.

string

None.

BatchID

It represents the batchid.

string

None.

Validations

It represents the list of validations that user needs to resolve.

Collection of string

None.

Response Formats

application/json

Sample:
{
  "Validations": [
    "sample string 1",
    "sample string 2"
  ],
  "BatchID": "sample string 3",
  "Message": "sample string 2",
  "Status": "sample string 1"
}

application/xml, text/xml

Sample:
<InspValidationResponseModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HomeguardApp.Models">
  <BatchID>sample string 3</BatchID>
  <Message>sample string 2</Message>
  <Status>sample string 1</Status>
  <Validations xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </Validations>
</InspValidationResponseModel>