openapi: 3.2.0 info: title: Purplebricks.Valuations.Api 2 - Core Valuation API description: '### The new home for accessing the valuations service library ### [Purplebricks.Valuations.Api Git Repository](https://dev.azure.com/purplebricks/BackEnd/_git/valuations-api)' version: '2' servers: - url: https://api.purplebricks.co.uk/valuations-api security: - Bearer: [] tags: - name: Valuation paths: /v2/valuations/{propertyId}/save: get: tags: - Valuation summary: Fetch saved form data for a property. parameters: - name: propertyId in: path required: true schema: type: integer format: int32 responses: '200': description: Success content: text/plain: schema: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Dtos.SavedValuationDto' application/json: schema: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Dtos.SavedValuationDto' text/json: schema: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Dtos.SavedValuationDto' '403': description: Forbidden content: text/plain: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' application/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' text/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' '404': description: Not Found content: text/plain: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' application/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' text/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' '500': description: Server Error content: text/plain: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' application/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' text/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' post: tags: - Valuation parameters: - name: propertyId in: path required: true schema: type: integer format: int32 requestBody: content: application/json: schema: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Dtos.SavedValuationDto' text/json: schema: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Dtos.SavedValuationDto' application/*+json: schema: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Dtos.SavedValuationDto' responses: '201': description: Created content: text/plain: schema: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Entities.Valuation' application/json: schema: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Entities.Valuation' text/json: schema: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Entities.Valuation' '400': description: Bad Request content: text/plain: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' application/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' text/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' '403': description: Forbidden content: text/plain: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' application/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' text/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' '500': description: Server Error content: text/plain: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' application/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' text/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' /v2/valuations/{propertyId}: get: tags: - Valuation summary: Fetch Sprift valuation data for a property. parameters: - name: propertyId in: path required: true schema: type: integer format: int32 responses: '200': description: Success content: text/plain: schema: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Dtos.ValuationDataDto' application/json: schema: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Dtos.ValuationDataDto' text/json: schema: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Dtos.ValuationDataDto' '204': description: No Content '400': description: Bad Request content: text/plain: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' application/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' text/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' '403': description: Forbidden content: text/plain: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' application/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' text/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' '500': description: Server Error content: text/plain: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' application/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' text/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' post: tags: - Valuation summary: Send off the report data for real. parameters: - name: propertyId in: path required: true schema: type: integer format: int32 - name: sendAuctionReferral in: query schema: type: boolean default: false responses: '200': description: Success '400': description: Bad Request content: text/plain: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' application/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' text/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' '403': description: Forbidden content: text/plain: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' application/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' text/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' '404': description: Not Found content: text/plain: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' application/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' text/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' /v2/valuations/{propertyId}/status: get: tags: - Valuation summary: Fetch status and sent date for the latest valuation of a property. parameters: - name: propertyId in: path required: true schema: type: integer format: int32 responses: '200': description: Success content: text/plain: schema: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Dtos.ValuationStatusAndSentDateDto' application/json: schema: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Dtos.ValuationStatusAndSentDateDto' text/json: schema: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Dtos.ValuationStatusAndSentDateDto' '400': description: Bad Request content: text/plain: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' application/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' text/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' '403': description: Forbidden content: text/plain: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' application/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' text/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' '404': description: Not Found content: text/plain: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' application/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' text/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' '500': description: Server Error content: text/plain: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' application/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' text/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' /v2/valuations/report-view: post: tags: - Valuation requestBody: content: application/json: schema: $ref: '#/components/schemas/Purplebricks.Valuations.Api.Models.RecordValuationReportViewRequest' text/json: schema: $ref: '#/components/schemas/Purplebricks.Valuations.Api.Models.RecordValuationReportViewRequest' application/*+json: schema: $ref: '#/components/schemas/Purplebricks.Valuations.Api.Models.RecordValuationReportViewRequest' responses: '200': description: Success '400': description: Bad Request content: text/plain: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' application/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' text/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' '403': description: Forbidden content: text/plain: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' application/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' text/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' '404': description: Not Found content: text/plain: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' application/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' text/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' components: schemas: Purplebricks.Valuations.Domains.Models.Enums.ValuationLocation: enum: - RuralLocation - InnerCity - PrestigiousLocation - QuietLocation - SoughtAfter - LocalAmenities - TransportLinks - SchoolCatchmentArea type: string Purplebricks.Valuations.Domains.Models.Enums.ValuationFeature: enum: - OffRoadParking - LargeGarden - Extension - NeedModernization - ExcellentViews - NewKitchen - GamesRoom - ModernInterior - Garage - Conservatory - SolarPanels - ExcellentFinish - LargeKitchen - NewBathroom - Basement - Spacious - Tenure - Furnished - Unfurnished - PartFurnished - EnSuite - DoubleGarage - TripleGarage type: string Purplebricks.Valuations.Repository.Entities.ValuationHistory: type: object properties: id: type: integer format: int32 valuationId: type: integer format: int32 valuation: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Entities.Valuation' achieveLowPrice: type: number format: double additionalProperties: false Purplebricks.Valuations.Repository.Dtos.SavedValuationDto: required: - propertyId type: object properties: propertyId: type: integer format: int32 valuationDate: type: - string - 'null' comparables: type: - array - 'null' items: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Dtos.SavedValuationComparableDto' location: type: - array - 'null' items: type: string typeOfBuyer: type: - array - 'null' items: type: string noSuitableComparables: type: boolean pricingFrom: type: number format: double pricingTo: type: number format: double recommendedMarketingPrice: type: number format: double similarPropertiesRecentlySold: type: - integer - 'null' format: int32 similarPropertiesForSale: type: - integer - 'null' format: int32 excludeMarketData: type: boolean addPersonalisedMessage: type: boolean personalisedMessage: type: - string - 'null' comments: type: - string - 'null' rightmoveBestPriceGuideUrl: type: - string - 'null' excludeBestPriceGuide: type: boolean newVersion: type: - integer - 'null' format: int32 additionalProperties: false Purplebricks.Valuations.Repository.Entities.Property: type: object properties: id: type: integer format: int32 addressId: type: - integer - 'null' format: int32 address: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Entities.Address' bookings: type: - array - 'null' items: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Entities.BookingDiary' userId: type: integer format: int32 toLet: type: boolean expertId: type: integer format: int32 expert: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Entities.User' accompaniedViewingExpertId: type: - integer - 'null' format: int32 accompaniedViewingExpert: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Entities.User' locationOwnerExpertId: type: - integer - 'null' format: int32 locationOwnerExpert: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Entities.User' accountManagerExpertId: type: - integer - 'null' format: int32 accountManagerExpert: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Entities.User' negotiationExpertId: type: - integer - 'null' format: int32 negotiationExpert: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Entities.User' additionalProperties: false Purplebricks.Valuations.Repository.Entities.Valuation: type: object properties: id: type: integer format: int32 status: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Enums.ValuationStatus' formVersion: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Enums.ValuationFormVersion' personalisedMessage: maxLength: 2000 minLength: 0 type: - string - 'null' featureExtra1: maxLength: 60 minLength: 0 type: - string - 'null' featureExtra2: maxLength: 60 minLength: 0 type: - string - 'null' propertiesInArea: type: integer format: int32 propertiesSameBedrooms: type: integer format: int32 numberOfBuyersInArea: type: integer format: int32 propertiesLowPrice: type: number format: double propertiesHighPrice: type: number format: double listPrice: type: number format: double achieveLowPrice: type: number format: double achieveHighPrice: type: number format: double propertyId: type: integer format: int32 property: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Entities.Property' valuationBuyerType: $ref: '#/components/schemas/Purplebricks.Valuations.Domains.Models.Enums.ValuationBuyerType' valuationLocation: $ref: '#/components/schemas/Purplebricks.Valuations.Domains.Models.Enums.ValuationLocation' valuationFeature: $ref: '#/components/schemas/Purplebricks.Valuations.Domains.Models.Enums.ValuationFeature' comments: maxLength: 1000 minLength: 0 type: - string - 'null' rightmoveBestPriceGuideUrl: maxLength: 2000 minLength: 0 type: - string - 'null' excludeBestPriceGuide: type: boolean valuationDate: type: string format: date-time bookingDiaryId: type: - integer - 'null' format: int32 allowPurplebricksPlusAddOn: type: boolean modificationDate: type: - string - 'null' format: date-time modifiedByUserId: type: - integer - 'null' format: int32 followUpOutcome: $ref: '#/components/schemas/Purplebricks.Valuations.Contract.Enums.ValuationFollowUpOutcome' followUpOutcomeDate: type: - string - 'null' format: date-time followUpOutcomeUserId: type: - integer - 'null' format: int32 isCompleted: type: - boolean - 'null' userViewCount: type: integer format: int32 lastViewedByCustomer: type: - string - 'null' format: date-time valuationCompletedDate: type: - string - 'null' format: date-time createdDate: type: - string - 'null' format: date-time version: type: - integer - 'null' format: int32 nextFollowUpDate: type: - string - 'null' format: date-time nextFollowUpUserId: type: - integer - 'null' format: int32 sentDate: type: - string - 'null' format: date-time valuationFollowupHistories: type: - array - 'null' items: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Entities.ValuationFollowupHistory' otherEADetails: type: - string - 'null' leadTemperature: $ref: '#/components/schemas/Purplebricks.Valuations.Contract.Enums.LeadTemperature' valuationHistories: type: - array - 'null' items: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Entities.ValuationHistory' booking: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Entities.BookingDiary' additionalProperties: false Purplebricks.Valuations.Repository.Dtos.SavedValuationComparableDto: type: object properties: id: type: - string - 'null' isSprift: type: boolean address: type: - string - 'null' propertyType: type: - string - 'null' bedrooms: type: integer format: int32 price: type: integer format: int32 status: type: - string - 'null' dateOfSale: type: - string - 'null' additionalProperties: false Purplebricks.Valuations.Api.Models.RecordValuationReportViewRequest: type: object properties: valuationId: type: integer format: int32 userId: type: integer format: int32 additionalProperties: false Purplebricks.Valuations.Repository.Entities.User: type: object properties: userId: type: integer format: int32 forename: type: - string - 'null' surname: type: - string - 'null' fullName: type: - string - 'null' email: type: - string - 'null' publicUserId: type: string format: uuid additionalProperties: false Purplebricks.Valuations.Repository.Entities.ValuationFollowupHistory: type: object properties: id: type: integer format: int32 valuationId: type: integer format: int32 valuation: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Entities.Valuation' followUpOutcome: $ref: '#/components/schemas/Purplebricks.Valuations.Contract.Enums.ValuationFollowUpOutcome' followUpOutcomeUserId: type: - integer - 'null' format: int32 followUpOutcomeDate: type: - string - 'null' format: date-time nextFollowUpDate: type: - string - 'null' format: date-time nextFollowUpUserId: type: - integer - 'null' format: int32 otherEADetails: type: - string - 'null' additionalProperties: false Purplebricks.Valuations.Repository.Enums.ValuationFormVersion: enum: - Legacy - New type: string Purplebricks.Valuations.Contract.Enums.ValuationFollowUpOutcome: enum: - NotSet - NotInterested - InstructingWithinAMonth - InstructingWithinThreeMonths - InstructingWithinSixMonths - InstructingAfterSixMonths - Instructed - NoAnswer - Campaign_03_ValuationToInstruct_C - Campaign_03_ValuationToInstruct_W8_C - Campaign_03_ValuationToInstruct_W12_C - OtherEA type: string Purplebricks.Valuations.Repository.Entities.BookingDiary: type: object properties: id: type: integer format: int32 propertyId: type: integer format: int32 property: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Entities.Property' start: type: string format: date-time eventType: $ref: '#/components/schemas/Purplebricks.Valuations.Domains.Models.Enums.EventType' isByCancelled: type: boolean isToCancelled: type: boolean isToConfirm: type: boolean additionalProperties: false Purplebricks.Valuations.Domains.Models.Enums.ValuationBuyerType: enum: - FirstTime - Landlords - Investors - ProfessionalCouples - Families - Sharers - DssTenants - SingleLets - Retirement type: string Purplebricks.Valuations.Repository.Dtos.ValuationDataDto: type: object properties: collectedAtUtc: type: - string - 'null' format: date-time uprn: type: integer format: int64 salesComparables: type: - array - 'null' items: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Dtos.SalesComparable' lettingComparables: type: - array - 'null' items: $ref: '#/components/schemas/Purplebricks.Valuations.Repository.Dtos.LettingComparable' estimatedPrice: type: integer format: int32 upperConfidence: type: integer format: int32 lowerConfidence: type: integer format: int32 estimatedRentPrice: type: integer format: int32 rentUpperConfidence: type: integer format: int32 rentLowerConfidence: type: integer format: int32 grossRentalYieldPercentage: type: number format: double confidenceBand: type: - string - 'null' rentConfidenceBand: type: - string - 'null' floorAreaM2: type: integer format: int32 floorAreaSqft: type: number format: double plotSizeAcres: type: number format: double lastSoldPrice: type: - integer - 'null' format: int32 lastSoldDate: type: - string - 'null' salePriceChange: type: - integer - 'null' format: int32 lastRentedPrice: type: - integer - 'null' format: int32 lastRentedDate: type: - string - 'null' rentalPriceChange: type: - integer - 'null' format: int32 additionalProperties: false Purplebricks.Valuations.Repository.Dtos.LettingComparable: type: object properties: id: type: - string - 'null' comparablesRef: type: - string - 'null' uprn: type: integer format: int64 floorAreaM2: type: integer format: int32 floorAreaSqft: type: number format: double distance: type: number format: double orzPostcode: type: - string - 'null' orzAddress: type: - string - 'null' orzPartialAddress: type: - string - 'null' orzPrice: type: integer format: int32 orzType: type: - string - 'null' orzBeds: type: integer format: int32 orzAgent: type: - string - 'null' orzFloorplanFilenames: type: - array - 'null' items: type: string orzListingImages: type: - array - 'null' items: type: string orzListingStatus: type: - string - 'null' lastStatusDate: type: - string - 'null' orzListingDate: type: - string - 'null' latitude: type: number format: double longitude: type: number format: double additionalProperties: false Microsoft.AspNetCore.Mvc.ProblemDetails: type: object properties: type: type: - string - 'null' title: type: - string - 'null' status: type: - integer - 'null' format: int32 detail: type: - string - 'null' instance: type: - string - 'null' additionalProperties: {} Purplebricks.Valuations.Repository.Dtos.ValuationStatusAndSentDateDto: type: object properties: sentDate: type: - string - 'null' format: date-time lastSavedDate: type: - string - 'null' format: date-time additionalProperties: false Purplebricks.Valuations.Repository.Enums.ValuationStatus: enum: - Draft - Sent type: string Purplebricks.Valuations.Repository.Entities.Address: type: object properties: id: type: integer format: int32 line1: type: - string - 'null' line2: type: - string - 'null' town: type: - string - 'null' county: type: - string - 'null' postcode: type: - string - 'null' addressText: type: - string - 'null' additionalProperties: false Purplebricks.Valuations.Contract.Enums.LeadTemperature: enum: - NotSet - Cold - Warm - Hot type: string Purplebricks.Valuations.Domains.Models.Enums.EventType: enum: - Valuation - Viewing - OpenDay - Busy - VirtualValuation type: string Purplebricks.Valuations.Repository.Dtos.SalesComparable: type: object properties: id: type: - string - 'null' comparablesRef: type: - string - 'null' uprn: type: integer format: int64 floorAreaM2: type: integer format: int32 floorAreaSqft: type: number format: double distance: type: number format: double postcode: type: - string - 'null' address: type: - string - 'null' partialAddress: type: - string - 'null' price: type: integer format: int32 type: type: - string - 'null' beds: type: integer format: int32 agent: type: - string - 'null' floorplanFilenames: type: - array - 'null' items: type: string listingImages: type: - array - 'null' items: type: string listingStatus: type: - string - 'null' lastStatusDate: type: - string - 'null' listingDate: type: - string - 'null' latitude: type: number format: double longitude: type: number format: double additionalProperties: false securitySchemes: Bearer: type: apiKey description: Authorization header using Bearer scheme name: Authorization in: header