Skip to main content

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:

  1. Close the auction (status = 'closed')
  2. Assign the winner (bidWinner)
  3. Generate a preliminary contract
  4. 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

Single Auction