Skip to main content

Update existing auction

PUT 

/company/auction

Allows modification of an existing auction. Only auctions in the 'draft' state can be edited.

Provides the ability to edit auctions before their publication.

Objective

Allow adjustments and corrections to auction data while it remains in draft.

Use Cases

  • Correct errors in addresses or dates before publishing
  • Adjust load weight, volume, or type
  • Modify starting or award price
  • Update description or additional notes
  • Change status to 'published' to start the bidding period

Automatic Publication Logic

When the status is updated to published, the system automatically executes:

flowchart LR
A[Status = published] --> B{Valid date_start?}
B -->|Not defined| C[date_start = NOW]
B -->|In the past| C
B -->|Future| D[Keep date_start]
C --> E[Validate complete data]
D --> E
E --> F{Validation OK?}
F -->|No| G[400 Validation Error]
F -->|Yes| H[Send notifications]
H --> I[Publish to marketplace]

Automatic date_start adjustment:

  • If date_start is not defined OR date_start < current date
  • Set date_start = new Date() (current date/time)
  • Ensures published auctions have a valid start date

Additional validations when publishing:

  • date_start and date_end must exist and be in the future
  • etl_date and etd_date must be valid
  • Load weight and height must be positive
  • Addresses must exist and be valid

Important restriction:

  • Only auctions in the 'draft' state can be edited
  • Once published, locked, or awarded, it CANNOT be edited
  • To modify a published auction, use draft-from-empty

Request

Responses

Auction updated successfully