Delete a Quote
Overview
The Delete a Quote endpoint permanently removes a quote by its ID. This action is irreversible and will cascade delete any associated items or attachments. Only quotes in draft status can typically be deleted; others may return an error.
HTTP Method
DELETE
Endpoint URL
https://koteshen.com/api/v1/quotes/{id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
Integer | Yes | The unique ID of the quote. |
Query Parameters
None.
Request Headers
Authorization: Bearer<your_oauth2_token>(handled separately)Content-Type: application/jsonAccept: application/json
Request Body
None.
Success Response
Status Code
204 No Content
Response Body
Empty.
Response Headers
X-Request-Id: Unique request identifier
Error Responses
401 Unauthorized
If the token is invalid or expired.
{ "error": "Unauthorized", "message": "Invalid access token" }
404 Not Found
If the quote ID does not exist.
{ "error": "Not Found", "message": "Quote not found" }
422 Unprocessable Entity
If the quote cannot be deleted (e.g., status is sent or accepted).
{ "error": "Unprocessable Entity", "message": "Cannot delete a sent or accepted quote" }
Example Request (cURL)
curl -X DELETE "https://koteshen.com/api/v1/quotes/1" \ -H "Authorization: Bearer <your_oauth2_token>"
Example Response (cURL)
HTTP/1.1 204 No Content
Usage Notes
- Always confirm deletion with the user in your integration.
- After deletion, references to the quote ID in other endpoints will fail with 404.
- Webhooks may fire on deletion if subscribed (e.g.,
quote.deletedevent).