DELETE /api/v1/p2p/ads/{id}
Delete a P2P advertisement. Only the ad owner can perform this action. Ads with open orders cannot be deleted.
Authentication
Required. Pass a Bearer token in the Authorization header. The authenticated user must be the ad owner.
Request
| Parameter | Type | In | Description |
|---|---|---|---|
id | integer | path | The advertisement ID |
Example
curl -X DELETE https://example.com/api/v1/p2p/ads/42 \
-H "Authorization: Bearer <token>"
Response
200 OK
Returns a success indicator.
{
"success": true
}
Errors
| Status | Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid token |
| 403 | FORBIDDEN | Authenticated user is not the ad owner |
| 404 | NOT_FOUND | Ad with the given ID does not exist |
| 409 | HAS_OPEN_ORDERS | Ad has open orders and cannot be deleted |