Skip to main content

Update favorite auction metadata

PUT 

/api/auction/favorites/:id

Updates the metadata of an auction marked as a favorite, allowing:

  • Modification of the descriptive name (fav_name)
  • Updating the description
  • Adding/editing classification tags
  • Changing other custom fields

Requirements:

  • The favorite ID must be valid and exist
  • The user must be the owner or an administrator
  • The associated auction must still exist
  • Only specific fields can be updated (not the auction itself)

Validations performed:

  1. Verifies that the favorite exists and belongs to the company
  2. Checks that the associated auction still exists
  3. Validates the updatable fields

Updatable fields:

  • fav_name: New descriptive name (mandatory)
  • description: Extended description (optional)
  • tags: Array of tags for classification
  • is_recurrent: Flag indicating if it is a recurrent route

Example of a complete request body:

{
fav_name: Madrid-Barcelona monthly,
description: Recurrent load every first Monday of the month,
tags: [recurrent, urgent],
is_recurrent: true
}

The response includes the updated favorite with the new values.

Request

Responses

Favorite updated successfully