Skip to main content
DELETE
/
api
/
claims
/
{id}
Delete Claim
curl --request DELETE \
  --url https://harbor-parking.vercel.app/api/claims/{id}
{
  "message": "Claim cancelled successfully",
  "deleted_claim_id": "abc123de-e89b-12d3-a456-426614174003"
}

Overview

This endpoint allows users to delete (cancel) their parking spot claims.
Deleting a claim will free up the associated availability for other users to claim.

Authentication

Path Parameters

id
string
required
Unique identifier of the claim to delete

Response

message
string
required
Confirmation message
deleted_claim_id
string
required
ID of the deleted claim

Example Request

curl -X DELETE "https://harbor-parking.vercel.app/api/claims/abc123de-e89b-12d3-a456-426614174003" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json"

Example Response

{
  "message": "Claim cancelled successfully",
  "deleted_claim_id": "abc123de-e89b-12d3-a456-426614174003"
}

Side Effects

When a claim is deleted:
  • The associated availability becomes available for other users to claim
  • Any notifications related to this claim are marked as resolved
  • The parking spot owner is notified of the cancellation

Error Responses

{
  "error": "You can only delete your own claims"
}