Skip to main content

Generate contract for auction

POST 

/api/auction/contract

Create a preliminary contract for a closed auction with an assigned winner.

Requirements:

  • The auction must be in 'closed' status
  • Must have an assigned winner (bidWinner)
  • The user must be a company administrator
  • No previous contract should exist

Internal process:

  1. Validate that the auction meets the requirements
  2. Generate a PDF document using the 'file_contract' template
  3. Store the PDF in S3/local storage
  4. Update the auction with a reference to the contract
  5. Notify the winning carrier

Mandatory fields in body:

  • serviceCode: Auction identifier. Format: 3 letters of origin, 3 letters of destination and 5 random alphanumeric characters (e.g.: VIGMURnT4FN).
  • award_price: Agreed price (must be >= bid_current)
  • special_conditions: Special terms (optional)
  • payment_terms: Payment conditions (optional)

Example of body request:

{
serviceCode: ABC123,
award_price: 1200,
special_conditions: Fragile cargo - handle with care,
payment_terms: 50% advance, 50% upon delivery
}

The response includes the updated auction with the contract data.

Request

Responses

Single Auction