Delete contract
DELETE/api/auction/contract/:serviceCode
Permanently delete the contract associated with an auction.Requirements:- The auction must be in 'closed' status- There must be no associated delivery in 'in_progress' or 'completed' status- The user must be a company administrator- There must be no registered digital signaturesActions performed:1. Deletes the contract PDF document from storage2. Clears contract references in the auction3. Logs the action in the audit history4. Notifies the carrier if they had already been informedValidations performed:1. Verifies the auction exists and is closed2. Checks that there are no deliveries in progress3. Validates user permissions4. Confirms there are no digital signaturesUsage example:DELETE /api/auction/contract/ABC123The response confirms successful deletion.
Request
Responses
- 200
- 400
- 401
- 409
Contract successfully deleted
Request error
Unauthorized
Conflict. Possible causes:- Contract already signed by one party- Delivery in progress or completed- Concurrent operation in progress