Create Testimony
Allows an authenticated client to create a new testimony with real estate details.
HTTP Request
POST /api/v1/testimonies
| Parameter | Description |
|---|---|
purpose string, enum | Testimony purpose. Valid values: mortgage, inheritance, construction, settlement, coownership, noncash, enforcement, auction, transfer, business, easement |
realEstate object, RealEstate | Associated real estate. See Real Estate Object. |
notes string, optional | Additional notes |
Response
201 Created
{
"data": {
"id": "01J5X3Y8ZK2Q4R6T8V0W2X4Y6Z",
"state": "pending",
"purpose": "mortgage",
"client": {
"firstName": "Samuel",
"lastName": "Mago",
"regions": null
},
"expert": null,
"realEstate": {
"type": "house",
"region": "nr",
"properties": {
"parcelCount": 1,
"storeyCount": 1,
"otherBuildingCount": 0,
"detachedGarageCount": 1
},
"address": {
"line1": "Trieda Andreja Hlinku",
"line2": "1/22",
"city": "Nitra",
"postalCode": "94901",
"parcelNumber": null,
"cadastralArea": null
},
"addressCoords": {
"lat": 48.30734852531308,
"lng": 18.086583509280644
},
"userCoords": null
},
"notes": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"cancellationReason": null,
"acceptedOffer": null,
"offers": null,
"createdAt": "2024-05-17T16:15:36+00:00"
}
}Asynchronous geocoding
When realEstate.region or realEstate.addressCoords are not supplied, a background job resolves them from the address (or from userCoords). The create response — and Show Testimony until the job has run — returns null for the missing values; re-fetch the testimony to pick them up. Until the region is resolved the testimony is not listed to experts and cannot receive offers.
Authentication
Requires authentication via Bearer token and the client role (403 Forbidden otherwise). Email verification is not required.
401 Unauthorized
{
"message": "Unauthenticated."
}Error Handling
422 Unprocessable Content — validation failed. The conditional address rules are described in Real Estate Address.