Appearance
Requested Assessments API
Create
typescript
/requested-assessment/createCreate a new requested assessment.
Body
The body should contain the following JSON structure that defines the requested assessment to create:
WARNING
When creating you need to supply at minimum one of the contact and one of the location properties or it will not be created. location must either contain addressFull OR line, city, state, postcode AND country. contact must contain names, email and phone.
typescript
interface RequestedAssessmentCreateType = {
contact?: {
firstName?: string;
lastName?: string;
email?: string;
phone?: string;
type?: 'owner' | 'tenant' | 'property_manager' | 'other' | string;
};
location?: {
addressFull?: string;
addressLine1?: string;
addressLine2?: string;
addressCity?: string;
addressState?: string;
addressPostalCode?: string;
addressCounty?: string;
addressCountry?: string;
lat?: number;
lon?: number;
};
mailingAddress?: {
addressFull?: string;
addressLine1?: string;
addressLine2?: string;
addressCity?: string;
addressState?: string;
addressPostalCode?: string;
addressCounty?: string;
addressCountry?: string;
lat?: number;
lon?: number;
};
job?: {
jobTypeId?: number;
schedule?: ZodPossibleJobScheduleTypeSchema;
};
note?: string;
extra?: Record<string, any>;
externalIdentifier?: string;
externalIdentifierType?: string;
}Returns
json
{
"error": "false",
"data": 3256 // ID of the created requested assessment
}