POST api/Audits

Posts an audit and all associated models.

Request Information

URI Parameters

None.

Body Parameters

The audit record and all of its associated models.

AuditHierarchy
NameDescriptionTypeAdditional information
AuditHouseMarkers

The audit house markers for the audit.

Collection of AuditHouseMarker

None.

AuditHouseSections

The audit house sections for the audit.

Collection of AuditHouseSection

None.

AuditItemHierarchies

The hierarchy of audit items associated with the audit.

Collection of AuditItemHierarchy

None.

ID

The ID of the record.

integer

None.

AuditorID

The ID of the auditor that performed the audit.

integer

None.

AuditOrganizationID

The ID of the organization the audit is for.

integer

None.

FlockManagementID

The ID of the flock (if any) the audit is for.

integer

None.

GrowerHouseID

The ID of the grower house (if any) the audit is for.

integer

None.

OrganizationScore

The final score of the audit.

integer

None.

InternalScore

The final score of all internal audit item's of the audit.

integer

None.

AuditDate

The date the audit was performed.

date

None.

OtherPersonnelPresent

Any other personnel that was present during the audit.

string

None.

GeneralComments

Comments about the audit.

string

None.

PassingPercent

The percentage that is required in order to pass the audit.

decimal number

None.

AuditTypeName

The name of the audit type.

string

None.

AuditTypeDescription

The description of the audit type.

string

None.

WorkroomXCoordinate

The X coordinate within the house diagram image where the workroom is located.

integer

None.

WorkroomYCoordinate

The Y coordinate within the house diagram image where the workroom is located.

integer

None.

IsOutOfCompliance

Whether or not the grower is out of compliance based on the audit.

boolean

None.

ComplianceFixByDate

The date the compliance must be fixed by.

date

None.

ComplianceResolutionDate

The date the out of compliance status was resolved.

date

None.

HouseDiagramImage

The house diagram that shows the layout of the house if a house is relevant for this audit.

Collection of byte

None.

LastModifiedLatitude

The latitude of where the last time this record was saved.

decimal number

None.

LastModifiedLongitude

The longitude of where the last time this record was saved.

decimal number

None.

UniqueIdentifier

The unique identifier of the audit.

string

None.

HadContactWithGrower

Whether or not the auditor had contact with the grower during the audit.

boolean

None.

PdfGenerationDate

The date and time the PDF for this audit was generated.

date

None.

Request Formats

application/json, text/json

Sample:
{
  "AuditHouseMarkers": [
    {
      "ID": 1,
      "AuditID": 2,
      "Note": "sample string 3",
      "X": 4,
      "Y": 5,
      "UniqueIdentifier": "sample string 6"
    },
    {
      "ID": 1,
      "AuditID": 2,
      "Note": "sample string 3",
      "X": 4,
      "Y": 5,
      "UniqueIdentifier": "sample string 6"
    }
  ],
  "AuditHouseSections": [
    {
      "ID": 1,
      "AuditID": 2,
      "X": 3,
      "UniqueIdentifier": "sample string 4"
    },
    {
      "ID": 1,
      "AuditID": 2,
      "X": 3,
      "UniqueIdentifier": "sample string 4"
    }
  ],
  "AuditItemHierarchies": [
    {
      "AuditItemHouseMarkers": [
        {
          "ID": 1,
          "AuditItemID": 2,
          "Note": "sample string 3",
          "X": 4,
          "Y": 5,
          "UniqueIdentifier": "sample string 6"
        },
        {
          "ID": 1,
          "AuditItemID": 2,
          "Note": "sample string 3",
          "X": 4,
          "Y": 5,
          "UniqueIdentifier": "sample string 6"
        }
      ],
      "ID": 1,
      "AuditID": 2,
      "QuestionNumber": "sample string 3",
      "QuestionOrdinal": 4,
      "Question": "sample string 5",
      "Guidance": "sample string 6",
      "IsRequired": true,
      "IsCoreCriteria": true,
      "IsInternalQuestion": true,
      "IsScoreNumeric": true,
      "LowestScore": 1,
      "HighestScore": 1,
      "Comment": "sample string 11",
      "ScoreNumeric": 1,
      "ScoreBool": true,
      "LastModifiedLatitude": 12.0,
      "LastModifiedLongitude": 13.0,
      "UniqueIdentifier": "sample string 14"
    },
    {
      "AuditItemHouseMarkers": [
        {
          "ID": 1,
          "AuditItemID": 2,
          "Note": "sample string 3",
          "X": 4,
          "Y": 5,
          "UniqueIdentifier": "sample string 6"
        },
        {
          "ID": 1,
          "AuditItemID": 2,
          "Note": "sample string 3",
          "X": 4,
          "Y": 5,
          "UniqueIdentifier": "sample string 6"
        }
      ],
      "ID": 1,
      "AuditID": 2,
      "QuestionNumber": "sample string 3",
      "QuestionOrdinal": 4,
      "Question": "sample string 5",
      "Guidance": "sample string 6",
      "IsRequired": true,
      "IsCoreCriteria": true,
      "IsInternalQuestion": true,
      "IsScoreNumeric": true,
      "LowestScore": 1,
      "HighestScore": 1,
      "Comment": "sample string 11",
      "ScoreNumeric": 1,
      "ScoreBool": true,
      "LastModifiedLatitude": 12.0,
      "LastModifiedLongitude": 13.0,
      "UniqueIdentifier": "sample string 14"
    }
  ],
  "ID": 1,
  "AuditorID": 2,
  "AuditOrganizationID": 3,
  "FlockManagementID": 1,
  "GrowerHouseID": 1,
  "OrganizationScore": 1,
  "InternalScore": 1,
  "AuditDate": "2026-03-06T22:30:17.6595202-05:00",
  "OtherPersonnelPresent": "sample string 5",
  "GeneralComments": "sample string 6",
  "PassingPercent": 1.0,
  "AuditTypeName": "sample string 7",
  "AuditTypeDescription": "sample string 8",
  "WorkroomXCoordinate": 1,
  "WorkroomYCoordinate": 1,
  "IsOutOfCompliance": true,
  "ComplianceFixByDate": "2026-03-06T22:30:17.6595202-05:00",
  "ComplianceResolutionDate": "2026-03-06T22:30:17.6595202-05:00",
  "HouseDiagramImage": "QEA=",
  "LastModifiedLatitude": 10.0,
  "LastModifiedLongitude": 11.0,
  "UniqueIdentifier": "sample string 12",
  "HadContactWithGrower": true,
  "PdfGenerationDate": "2026-03-06T22:30:17.6595202-05:00"
}

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 'AuditHierarchy'.

Response Information

Resource Description

A 201 if successful.

None.