Create Testimony
Allows an authenticated client with a verified email to create a new testimony with real estate details. A confirmation email is sent to the client.
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, nullable | Additional notes (max 5000 chars). |
Response
201 Created
{
"data": {
"id": "01J5X3Y8ZK2Q4R6T8V0W2X4Y6Z",
"number": "2648213",
"state": "pending",
"purpose": "mortgage",
"client": {
"firstName": "Samuel",
"lastName": "Mago",
"regions": null,
"email": null,
"phone": null
},
"expert": null,
"shippingAddress": null,
"realEstate": {
"type": "house",
"region": null,
"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,
"invoices": null,
"createdAt": "2024-05-17T16:15:36+00:00",
"acceptedAt": null,
"completedAt": null
}
}Asynchronous geocoding
The region is never taken from the request: a background job resolves it — and realEstate.addressCoords when they are not supplied — from the street address, from the coordinates, or — for a property with neither — from its cadastral area. The create response — and Show Testimony until the job has run — returns null for the region and the missing coordinates; re-fetch the testimony to pick them up. While the region is unknown — before the job has run, or for good when geocoding finds none — the testimony is listed to every expert and any of them may send an offer. Once a region is known, only the experts of that region see it, and those who keep testimony alerts on are notified by e-mail.
Authentication
Requires authentication via Bearer token, a verified email and the client role (403 Forbidden otherwise).
401 Unauthorized
{
"message": "Unauthenticated."
}Error Handling
422 Unprocessable Content — validation failed. The conditional address rules are described in Real Estate Address.
429 Too Many Requests — more than 10 testimonies created per hour or 20 per day by this user (on top of the general limit of 120 requests per minute).