Update existing contract
PUT/api/auction/contract/:serviceCode
Updates the terms of an existing contract for a closed auction.
Requirements:
- The auction must be in the 'closed' state
- It must have a previously generated contract
- The user must be a company administrator
- There must be no delivery in the 'in_progress' or 'completed' state
Updatable fields:
- award_price: Agreed price (requires confirmation)
- special_conditions: Special terms
- payment_terms: Payment conditions
- insurance_details: Insurance details
- etl_date/etd_date: Dates (with consistency validation)
Validations performed:
- Verifies the auction exists and is closed
- Checks user permissions
- Validates date and price consistency
- Updates the contract and regenerates the PDF
Example request body:
{
award_price: 1200,
special_conditions: Fragile cargo - handle with care,
payment_terms: 50% advance, 50% upon delivery,
insurance_details: Full insurance included
}
The response includes the updated contract.
Request
Responses
- 200
- 400
- 401
- 409
Single Auction
Request error
Unauthorized
Conflict. Possible causes:
- Contract already signed by both parties
- Delivery in progress or completed
- Outdated version (concurrent update)