Platitun · API · Listings · Remove a listing
Remove a listing
DELETE /api/v1/listings/{number}Key scope: listings · changes data, the Idempotency-Key header is required
Deletion works only while the listing has no orders: an order must stay self-contained for a dispute a month later. A listing with history is SWITCHED OFF, and the response says so plainly.
Look at the result field rather than the status code: 200 comes in both cases, and “deleted” without checking the field is lying to yourself.
Response fields
| Field | Type | What it is |
|---|---|---|
result | string | “deleted” — removed; “hidden” — switched off because it had orders. |
Refusal reasons
A rule refusal arrives as {"error":"rejected","refusal":{"kind":"…"}} with status 409. Refusals common to all endpoints are in the rules section.
| Code | What happened and what to do |
|---|---|
not_found | The record does not exist or is not yours. The ownership condition is in the database query itself, so someone else’s record looks like a missing one. |
has_questions | The listing had orders or questions — it cannot be deleted, it gets switched off. Look at the result field. |
Nearby in this section
GET /api/v1/listings— My listingsPOST /api/v1/listings— Create a listingGET /api/v1/listings/{number}— One of my listingsPATCH /api/v1/listings/{number}— Update a listingPOST /api/v1/listings/{number}/state— Switch on, switch off, auto-deliveryPOST /api/v1/listings/{number}/copy— Copy a listingPOST /api/v1/listings/{number}/test— Mark a listing as testPUT /api/v1/listings/{number}/image— The listing imageDELETE /api/v1/listings/{number}/image— Remove the imageGET /api/v1/questions— Questions about my listingsPOST /api/v1/questions/{id}/answer— Answer a question