Objects
This page gives the C# code objects used for the payloads & responses sent to/from the API.
Shared
ProblemDetails
Used with a 400 Bad request response.
public record ProblemDetails
{
public string Type { get; set; }
public string Title { get; set; }
public int? Status { get; set; }
public string Detail { get; set; }
public string Instance { get; set; }
}
SimpleResponse
Used with some methods returning 200 Ok or 201 Created responses where a boolean or string response would have sufficied. An object is used for the response from all objects which will allow for the response to be extended in the future.
public record SimpleResponse
{
public bool Success { get; set; }
public string Reference { get; set; }
}
AccessDetails
Used in the Quote service and Instruction service to return how to gain access to the property.
public record AccessDetails
{
public string AccessTypeCode { get; set; }
public string FirmName { get; set; }
public string EmailAddress { get; set; }
public string ContactName { get; set; }
public string TelephoneNumber { get; set; }
}
Address
public record Address
{
public string AddressFormatCode { get; set; } = "DEFAULT";
public string AddressLine1 { get; set; }
public string AddressLine2 { get; set; }
public string AddressLine3 { get; set; }
public string AddressLine4 { get; set; }
public string Postcode { get; set; }
public string CountryCode { get; set; }
}
Customer
public record Customer
{
public string EmailAddress { get; set; }
public string Title { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string TelephoneNumber { get; set; }
public bool ReceiveSMS { get; set; }
}
Property
public record Property
{
public decimal? PropertyValueOrPurchasePrice { get; set; }
public string PropertyValueTierCode { get; set; }
public string PropertyValueTierDescription { get; set; }
public string PropertyTypeCode { get; set; }
public string PropertyTypeDescription { get; set; }
public string PropertyAgeCode { get; set; }
public string PropertyAgeDescription { get; set; }
public string PropertyAddressDescription { get; set; }
public Address PropertyAddress { get; set; }
public string CorrespondenceAddressDescription { get; set; }
public Address CorrespondenceAddress { get; set; }
public string AccessDetailsDescription { get; set; }
public AccessDetails AccessDetails { get; set; }
}
Referrer
public record Referrer
{
public string CompanyReference { get; set; }
public string CompanyName { get; set; }
public string CompanyTelephoneNumber { get; set; }
public string CompanyEmailAddress { get; set; }
public Address Address { get; set; }
public string ContactTitle { get; set; }
public string ContactFirstName { get; set; }
public string ContactLastName { get; set; }
public string ContactTelephoneNumber { get; set; }
public string ContactMobileNumber { get; set; }
public string ContactEmailAddress { get; set; }
}
Primary customer
public record PrimaryCustomer
{
public string OrganisationName { get; set; }
public string EmailAddress { get; set; }
}
Authentication service
SignInRequest
Used in login method.
public record SignInRequest
{
public string Username { get; set; }
public string Password { get; init; }
public string Email { get; set; }
}
RefreshRequest
Used in refresh method.
public class RefreshRequest
{
public string RefreshToken { get; init; }
}
AccessTokenResponse
Returned from the login and refresh method
public record AccessTokenResponse
{
public string TokenType { get; } = "Bearer";
public required string AccessToken { get; init; }
public required long ExpiresIn { get; init; }
public required string RefreshToken { get; init; }
}
WhoAmIResponse
Returned from the whoami method.
public record WhoAmIResponse
{
public string UserName { get; set; }
public string EmailAddress { get; set; }
public string OrganisationType { get; set; }
}
Data service
DataSetItems
public record DataSetItems
{
public string DataSetCode { get; set; }
public List<DataSetItem> Items { get; set; }
public record DataSetItem
{
public int Sequence { get; set; }
public string Code { get; set; }
public string Description { get; set; }
public bool IsOther { get; set; }
public bool IsActive { get; set; }
public Dictionary<string, string> Information { get; set; }
}
}
Instruction service
Instruction
Returned when retrieving an instruction.
public record Instruction
{
public string TMPReference { get; set; }
public string TMPCustomerReference { get; set; }
public int CaseIndex { get; set; }
public string CaseStatusCode { get; set; }
public bool IsOnHold { get; set; }
public string ProductCode { get; set; }
public Dictionary<string, object> Attributes { get; set; }
public string SupplierName { get; set; }
public Dictionary<string, DateTime> Timestamps { get; set; }
public Dictionary<string, decimal> Fee { get; set; }
public List<InstructionMilestone> Milestones { get; set; }
public bool IsVisibleToCustomers { get; set; }
public PrimaryCustomer PrimaryCustomer { get; set; }
public List<Customer> Customers { get; set; }
public bool HasUnreadNotes { get; set; }
public List<InstructionNote> Notes { get; set; }
public List<InstructionFile> Files { get; set; }
public Property Property { get; set; }
public Dictionary<string, string> OtherInformation { get; set; }
public List<string> AllowedOperations { get; set; }
public Dictionary<string, object> Configuration { get; set; }
}
InstructionFile
public record InstructionFile
{
public string FileTypeCode { get; set; }
public string FileFormatCode { get; set; }
public DateTime CreatedTimestamp { get; set; }
public string FileReference { get; set; }
}
InstructionMilestone
public record InstructionMilestone
{
public string MilestoneCode { get; set; }
public DateTime? CompletedTimestamp { get; set; }
public string OrganisationTypeCode { get; set; }
public string OrganisationName { get; set; }
public string PersonName { get; set; }
public string CurrentState { get; set; }
public DateTime? ExpectedTimestamp { get; set; }
public Dictionary<string, object> Data { get; set; }
}
InstructionNote
public record InstructionNote
{
public string CaseNoteReference { get; set; }
public DateTime CreatedTimestamp { get; set; }
public string CreatedByOrganisationName { get; set; }
public string CreatedByOrganisationTypeCode { get; set; }
public string PersonName { get; set; }
public DateTime? ReadTimestamp { get; set; }
public List<string> VisibleTo { get; set; }
public Dictionary<string, DateTime> ReadTimestamps { get; set; }
public string NoteBody { get; set; }
public int Sequence { get; set; }
}
UpdateIntroducerReferencesOperationData
public record UpdateIntroducerReferencesOperation
{
public string UniqueIntegrationReference { get; set; }
public string UniqueCustomerReference { get; set; }
}
UpdateSupplierReferencesOperationData
public record UpdateSupplierReferencesOperation
{
public string UniqueIntegrationReference { get; set; }
public string UniqueCustomerReference { get; set; }
}
Instructions search service
InstructionSearchCriteria
public record InstructionSearchCriteria
{
public int PageNumber { get; set; }
public int PageSize { get; set; }
public string TMPReference { get; set; }
public string ProductCode { get; set; }
public string SearchTypeCode { get; set; }
public string PartialCustomerName { get; set; }
public string PartialPostcode { get; set; }
public string DateSearchCode { get; set; }
public DateTime? DateFromTimestamp { get; set; }
public DateTime? DateToTimestamp { get; set; }
public bool? HasUnreadNotes { get; set; }
public bool? IsOnHold { get; set; }
public string SortColumnName { get; set; }
public bool SortAscending { get; set; }
}
InstructionSearchResults
public record InstructionSearchResults
{
public List<InstructionSearchResult> SearchResults { get; set; }
public int NumberOfResults { get; set; }
public int PageSize { get; set; }
public int CurrentPage { get; set; }
}
public record InstructionSearchResult
{
public string TMPReference { get; set; }
public string TMPCustomerReference { get; set; }
public int CaseIndex { get; set; }
public string CaseStatusCode { get; set; }
public bool IsOnHold { get; set; }
public string ProductCode { get; set; }
public bool HasUnreadNotes { get; set; }
public string CustomerNames { get; set; }
public string PropertyPostcode { get; set; }
public Dictionary<string, string> OtherInformation { get; set; }
public Dictionary<string, DateTime> Timestamps { get; set; }
}
Notes service
NewNote
When a new note is sent to be added.
public record NewNote
{
public List<string> VisibleTo { get; set; }
public string NoteBody { get; set; }
public string CaseNoteReference { get; set; }
}
Quote service
Quote
When returning a quote or return from creating a quote.
public record Quote
{
public string TMPReference { get; set; }
public string Description { get; set; }
public DateTime CreatedTimestamp { get; set; }
public List<QuoteResult> Results { get; set; }
public bool IsVisibleToCustomers { get; set; }
public List<Customer> Customers { get; set; }
public PrimaryCustomer PrimaryCustomer { get; set; }
public Property Property { get; set; }
public Dictionary<string, string> OtherInformation { get; set; }
public List<string> AllowedOperations { get; set; }
public Dictionary<string, object> Configuration { get; set; }
}
QuoteResult
The result of a quote.
public record QuoteResult
{
public int Sequence { get; set; }
public bool IsPriceOnApplication { get; set; }
public string QuoteResultStatusCode { get; set; }
public string ProductCode { get; set; }
public Dictionary<string, decimal> Fee { get; set; }
public List<string> AllowedOperations { get; set; }
public DateTime ExpiryTimestamp { get; set; }
}
NewQuote
public record NewQuote
{
public List<NewQuoteCase> Cases { get; set; }
public decimal? PropertyValueOrPurchasePrice { get; set; }
public string PropertyValueTierCode { get; set; }
public string PropertyTypeCode { get; set; }
public string PropertyAgeCode { get; set; }
public int? YearBuilt { get; set; }
public Address PropertyAddress { get; set; }
public Address CorrespondenceAddress { get; set; }
public AccessDetails AccessDetails { get; set; }
public IList<Customer> Customers { get; set; }
public Referrer Referrer { get; set; }
}
public record NewQuoteCase
{
public string UniqueIntegrationReference { get; set; }
public string UniqueCustomerReference { get; set; }
public string ProductCode { get; set; }
public decimal? YourFeeInclVAT { get; set; }
}
ReferQuote
public record ReferQuote
{
public string IntroducerCustomerReference { get; set; }
public string IntroducerIntegrationReference { get; set; }
public int ResultSequence { get; set; }
}
RequestQuote
public record RequestQuote
{
public int ResultSequence { get; set; }
}
UpdateQuoteProperty
public record UpdateQuoteProperty
{
public string PropertyTypeCode { get; set; }
public string PropertyAgeCode { get; set; }
public int? YearBuilt { get; set; }
public Shared.Address PropertyAddress { get; set; }
public Shared.Address CorrespondenceAddress { get; set; }
public Shared.AccessDetails AccessDetails { get; set; }
}```
#### UpdateQuoteFee
public record UpdateQuoteFee
{
public int ResultSequence { get; set; }
public decimal YourFeeInclVAT { get; set; }
}
Quotes search service
QuoteSearchCriteria
public record QuoteSearchCriteria
{
public int PageNumber { get; set; }
public int PageSize { get; set; }
public string TMPReference { get; set; }
public string ProductCode { get; set; }
public string PartialCustomerName { get; set; }
public string PartialPostcode { get; set; }
public string SearchTypeCode { get; set; }
public string DateSearchCode { get; set; }
public DateTime? DateFromTimestamp { get; set; }
public DateTime? DateToTimestamp { get; set; }
public string SortColumnName { get; set; }
public bool SortAscending { get; set; }
}
QuoteSearchResults
public record QuoteSearchResult
{
public string TMPReference { get; set; }
public string TMPCustomerReference { get; set; }
public string CustomerNames { get; set; }
public string PropertyPostcode { get; set; }
public List<QuoteSearchQuoteResult> Results { get; set; }
public Dictionary<string, string> OtherInformation { get; set; }
public Dictionary<string, DateTime> Timestamps { get; set; }
}
public record QuoteSearchQuoteResult
{
public int Sequence { get; set; }
public string ProductCode { get; set; }
public string QuoteResultStatusCode { get; set; }
}
Referral service
NewReferral
When a new referral is sent.
public record NewReferral
{
public List<NewReferralCase> Cases { get; set; }
public decimal? PropertyValueOrPurchasePrice { get; set; }
public string PropertyValueTierCode { get; set; }
public string PropertyTypeCode { get; set; }
public string PropertyAgeCode { get; set; }
public int? YearBuilt { get; set; }
public Address PropertyAddress { get; set; }
public Address CorrespondenceAddress { get; set; }
public AccessDetails AccessDetails { get; set; }
public IList<Customer> Customers { get; set; }
public Referrer Referrer { get; set; }
}
public record NewReferralCase
{
public string UniqueIntegrationReference { get; set; }
public string UniqueCustomerReference { get; set; }
public string ProductCode { get; set; }
public decimal? TotalFeeInclVAT { get; set; }
public decimal? YourFeeInclVAT { get; set; }
public bool IsLead { get; set; }
}
Supplier operations service
AcceptCaseOperation
public record AcceptCaseOperation
{
public decimal YourFeeInclVAT { get; set; }
}
TermsUpdateOperation
public record TermsUpdateOperation
{
public bool TermsSent { get; set; }
public DateTime? SentTimestamp { get; set; }
public bool TermsReceived { get; set; }
public DateTime? ReceivedTimestamp { get; set; }
}
BookAppointmentOperation
public record BookAppointmentOperation
{
public DateTime AppointmentDate { get; set; }
public string AppointmentTimeslotCode { get; set; }
public bool SupplierConfirmedTermsAndConditionsAgreed { get; set; }
}
CompleteCaseOperation
public record CompleteCaseOperation
{
public bool ReportHasBeenEmailed { get; set; }
public List<string> RecommendedProductCodes { get; set; }
}
ConfirmAppointmentCompletedOperation
public record ConfirmAppointmentCompletedOperation
{
// TODO
}
ConfirmAppointmentUncompletedOperation
public record ConfirmAppointmentUncompletedOperation
{
// TODO
}
DeclineCaseOperation
public record DeclineCaseOperation
{
public string ReasonCode { get; set; }
public string OtherReason { get; set; }
}
RebookAppointmentOperation
public record RebookAppointmentOperation
{
public string ReasonCode { get; set; }
public string OtherReason { get; set; }
public DateTime AppointmentDate { get; set; }
public string AppointmentTimeslotCode { get; set; }
public bool SupplierConfirmedTermsAndConditionsAgreed { get; set; }
}
ReplaceReportOperation
public record ReplaceReportOperation
{
public bool ReportHasBeenEmailed { get; set; }
public byte[] FileContent { get; set; }
public List<string> RecommendedProductCodes { get; set; }
}
UploadReportOperation
public record UploadReportOperation
{
public bool ReportHasBeenEmailed { get; set; }
public byte[] FileContent { get; set; }
public List<string> RecommendedProductCodes { get; set; }
}
Instruction Notifications service
InstructionsWithNotifications
public record InstructionsWithNotifications
{
public int NumberOfInstructions { get; set; }
public List<InstructionWithNotifications> Instructions { get; set; }
}
public record InstructionWithNotifications
{
public string TMPReference { get; set; }
public string TMPCustomerReference { get; set; }
public int CaseIndex { get; set; }
public string CaseStatusCode { get; set; }
public int NumberOfNotifications { get; set; }
public DateTime FirstNotificationTimestamp { get; set; }
public DateTime LastNotificationTimestamp { get; set; }
public DateTime LatestCreatedTimestamp { get; set; }
public Dictionary<string, string> OtherInformation { get; set; }
public bool HasUnreadNotes { get; set; }
}
InstructionNotifications
public record InstructionNotifications
{
public string TMPReference { get; set; }
public string TMPCustomerReference { get; set; }
public int CaseIndex { get; set; }
public int NumberOfNotifications { get; set; }
public DateTime FirstNotificationTimestamp { get; set; }
public DateTime LastNotificationTimestamp { get; set; }
public DateTime LatestCreatedTimestamp { get; set; }
public List<InstructionNotification> Notifications { get; set; }
}
public record InstructionNotification
{
public string TMPReference { get; set; }
public string TMPCustomerReference { get; set; }
public int CaseIndex { get; set; }
public string NotificationTypeCode { get; set; }
public DateTime NotificationTimestamp { get; set; }
public DateTime CreatedTimestamp { get; set; }
public string CaseStatusCode { get; set; }
public Dictionary<string, object> Information { get; set; }
public Dictionary<string, DateTime> Timestamps { get; set; }
public Dictionary<string, decimal> Fees { get; set; }
}
Testing service
Development of this service is on hold.
