Withdraw Offer
Lets an expert take back one of their own offers while the testimony is still in the pending or offered state and the client has not paid for the offer. There is no endpoint to change an offer: to correct a price or a delivery time, withdraw the offer and create a new one.
The offer id comes from List Own Offers or from the response of Create Offer.
HTTP Request
DELETE /api/v1/testimonies/offers/{offer}
The request has no body.
Response
204 No Content
The offer is withdrawn:
- It disappears from the testimony's
offersand from List Own Offers, and can no longer be checked out or accepted. - The testimony returns to the expert's offerable testimonies, so a new offer can be made on it.
- If it was the last offer the client could see, the testimony moves from
offeredback topending. - A client who could see the offer is notified by email. An offer that was still hidden (its expert is not approved yet, or is suspended) is withdrawn silently.
- A Stripe checkout session the client had open for this offer is expired before the offer is withdrawn, so it can no longer be paid. If the client has already paid through it, the offer is not withdrawn (
409, below).
Authentication
Requires authentication via Bearer token, a verified email and the expert role. Only the expert who made the offer may withdraw it (403 Forbidden otherwise).
401 Unauthorized
{
"message": "Unauthenticated."
}Error Handling
Unknown Offer
404 Not Found when no offer has the given id — or when it was already withdrawn, so repeating the request is safe.
Conflict
409 Conflict — one of:
- The testimony is no longer open: the client has accepted an offer (this one or another) or cancelled the testimony.
- The client has just paid for this offer. The testimony stays
offeredfor the moment it takes to confirm the payment, and then becomesacceptedwith this offer.
{
"message": "Ponuku už nie je možné stiahnuť."
}Payment Provider Error
502 Bad Gateway — the client has a checkout session open for this offer and Stripe could not be reached to close it. Nothing was changed; retry later. A request Stripe rejects answers 422 Unprocessable Content with the same message.
{
"message": "Pri spracovaní platby nastala chyba. Skúste to znova."
}Rate Limit
429 Too Many Requests — more than 10 withdrawals per hour for this user. Creating offers is limited as well, to 5 attempts per hour on the same testimony, so an offer cannot be replaced over and over (see Create Offer).