Skip to main content

Create auction

POST 

/api/auction/

Create a new public transport auction.

Requirements:

  • Authenticated user with valid company
  • Consistent dates (etl_date < etd_date)
  • Valid cargo dimensions (weight > 0, height > 0)
  • Valid load/unload addresses

Validations performed:

  1. Generate unique service_code based on addresses
  2. Validate schedules and dates
  3. Verify cargo dimensions
  4. Create database record

Mandatory fields:

  • etl_date: Load date/time
  • etd_date: Unload date/time
  • cargo_weight: Cargo weight (kg)
  • cargo_height: Cargo height (m)
  • etl_address/etd_address: Address IDs

Example request body:

{
etl_date: 2025-08-15T08:00:00Z,
etd_date: 2025-08-15T18:00:00Z,
cargo_weight: 1000,
cargo_height: 2.5,
etl_address: 60a1b2c3d4e5f6a1b2c3d4e5,
etd_address: 60a1b2c3d4e5f6a1b2c3d4e6
}

The response includes the created auction with its unique service_code.

Request

Responses

Single Auction