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:
- Generate unique service_code based on addresses
- Validate schedules and dates
- Verify cargo dimensions
- 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
- 200
- 400
- 401
Single Auction
Request error
Unauthorized