Skip to main content

Delete contract

DELETE 

/api/auction/contract/:serviceCode

Permanently deletes 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 signatures

Actions performed:

  1. Deletes the contract PDF document from storage
  2. Clears contract references in the auction
  3. Logs the action in the audit history
  4. Notifies the carrier if they had already been informed

Validations performed:

  1. Verifies the auction exists and is closed
  2. Checks that there are no in-progress deliveries
  3. Validates user permissions
  4. Confirms there are no digital signatures

Usage example:

DELETE /api/auction/contract/ABC123

The response confirms successful deletion.

Request

Responses

Contract successfully deleted