Accept current bid
POST/api/auction/acceptCurrent/:serviceCode
Accept the current offer for an auction, closing the auction and assigning the transport to the winner.
Requirements:
- The auction must be in the 'published' state
- It must have at least one valid bid
- The user must be the owner or administrator of the company
- The auction must not already be closed or canceled
Actions performed:
- Close the auction (status = 'closed')
- Assign the winner (bidWinner)
- Generate a preliminary contract
- Create a delivery record
Usage example:
POST /api/auction/acceptCurrent/ABC123
The response includes the updated auction with status 'closed' and the assigned winner.
Request
Responses
- 200
- 400
- 401
Single Auction
Request error
Unauthorized