Skip to main content

Get Auction by ID

Retrieves details of a specific auction by its unique identifier.

  • URI: /api/Auctions/{id}
  • Method: GET
  • Authentication: Required (JWT)
  • Permission Required: Auctions.Read (default value: "AuctionR:Auctions:Read")

🔐 Permission values are configurable via the Permissions section in appsettings.json.


Path Parameters

NameTypeRequiredDescription
idintYesUnique identifier of the auction

Sample Request

GET /api/Auctions/789 HTTP/1.1
Authorization: Bearer {your_jwt_token}

Response

Status Code: 200 OK

Response Body Example

{
"success": true,
"message": "Auction retrieved successfully.",
"data": {
"id": 789,
"productId": 123,
"ownerId": 456,
"title": "Vintage Guitar Auction",
"description": "A well-preserved vintage guitar from the 1960s.",
"startingPrice": 1500.0,
"minimumBidIncrement": 100.0,
"currency": "USD",
"startTime": "2025-06-10T14:00:00Z",
"endTime": "2025-06-12T14:00:00Z",
"status": "Pending"
}
}

Possible Error Responses

Status CodeMeaningWhen it Happens
400Bad RequestInput validation fails (e.g., missing/invalid fields)
401UnauthorizedJWT is missing or invalid
403ForbiddenCaller does not have permission to read auctions
429Too Many RequestsRate limiting exceeded
500Internal Server ErrorUnexpected server-side error