Перейти к основному содержимому

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

ParameterTypeInDescription
idintegerpathThe 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

StatusCodeDescription
401UNAUTHORIZEDMissing or invalid token
403FORBIDDENAuthenticated user is not the ad owner
404NOT_FOUNDAd with the given ID does not exist
409HAS_OPEN_ORDERSAd has open orders and cannot be deleted