Skip to content

Cancel Testimony ​

Clients can cancel their own testimony while it is in the pending or offered state. Once an offer has been accepted (paid), the testimony can no longer be cancelled.

HTTP Request ​

POST /api/v1/testimonies/{testimony}/cancel

ParameterDescription
cancellationReason string, optionalReason for cancellation (max 5000 chars). Omit the field when there is no reason — an empty string or null is rejected with 422.

Response ​

204 No Content

The testimony is successfully transitioned to cancelled state. The client receives a confirmation email, every expert holding an offer on the testimony is notified, and a still-open Stripe checkout session for it is expired. To verify:

Authentication ​

Requires authentication via Bearer token, a verified email and the client role. Only the testimony's client may cancel it (403 Forbidden otherwise). An unknown testimony ID answers 404 Not Found.

401 Unauthorized

json
{
  "message": "Unauthenticated."
}

Error Handling ​

409 Conflict — the testimony is not in a cancellable state (already accepted, completed or cancelled):

json
{
  "message": "Prechod zo stavu „Prijatý“ do stavu „Zrušený“ nie je možný."
}

The message names the states by their Slovak labels (Čaká na ponuky, S ponukami, Prijatý, Hotový, Zrušený).

409 Conflict — another request changed the testimony at the same moment. Re-fetch it and retry if cancelling still makes sense:

json
{
  "message": "Záznam bol medzitým zmenený. Skúste to znova."
}

422 Unprocessable Content — cancellationReason is not a string or exceeds 5000 characters.